Automated Pendulum Demo Shows ADwin's Microsecond Response Time


ADwin-Gold Data Acquisition System

CHESTERLAND OH - CAS DataLoggers Sales Manager Pete Martin impressed attendees with a unique ADwin demonstration at a successful exhibition at the 2012 Control System Integrators Association (CSIA) Executive Conference in Scottsdale, Arizona. This demo utilizes an interesting program highlighting how to achieve microsecond response times with a measurement and control system while operating in the Microsoft Windows environment, employing an inverted pendulum, which is highly unstable unlike the balance of a regular pendulum. At the start of the demonstration, the inverted pendulum is knocked off-balance so that its weight causes it to fall. Almost immediately, however, the pendulum starts to swing and return itself to its original inverted position. The demonstration is now online at the CAS DataLoggers site at www.dataloggerinc.com/content/resources/videos/166/adwin_pendulum_demo/ and also on YouTube at http://www.youtube.com/watch?v=87sD1TI7Ujc&list=UUqsfRCECDkcAjkUwmjl2bmw&index=1&feature=plcp.

A variety of hardware was used to implement this demonstration, including a stepper motor controlled by an ADwin data acquisition board. By means of a toothed belt, the stepper motor moves a metallic plate (carriage) on which a quadrature encoder is mounted. The pendulum itself is an aluminum weight at the end of a carbon-fiber arm, which is attached in turn to the axis of the quadrature encoder.

The ADwin line of data acquisition boards are equipped with their own on-board processors, up to 64MB of internal memory, digital and analog inputs/outputs, as well as an external trigger input. ADwin boards are suitable for a diverse range of applications demanding reliable response times of only a few microseconds, including control of complex, high-speed test stands. When viewing the pendulum demo online, note that an inherent real-time operating system and a control program arranged in several processes for the demo model are running on the ADwin board. The real-time operating system manages running each process simultaneously and guarantees short and reliable response times in order to accurately balance the pendulum.

The control program for the demonstration is programmed in ADbasic, a user-friendly development environment under Windows which allows users to program in a BASIC-like programming language so that various control and measurement applications can be carried out easily. Moreover, ADbasic offers the opportunity for online debugging and data transfer with the PC.

ADbasic compiles the control program and transfers it to the board processor, where it runs completely independent of the PC operating system. As the process is being compiled, great care is taken to ensure the shortest possible runtime. The PC is only needed for operating, visualization, and logging the measurement values.

A constantly-running communication process allows for continuous data transfer between the board and the PC, even during the highest speed acquisition, without any effect on the system's reaction time.

Operation and Control of the Pendulum Program
The TestPoint application development package was used to create the graphical user interface for the operating program that starts, stops, and watches the movements of the stepper motor. Users view a window monitoring the carriage position over a chosen period, showing the actual status of the carriage as a blue line and the target status as a red line, independent of time.

A look behind the scenes shows that several individual processes run once the ADbasic pendulum program begins. To establish a reference position for the pendulum, the pendulum is brought to a standstill. After this, a reference run is made to find the zero point of the carriage. Only then will the pendulum begin to swing up and balance. The carriage is moved around the target position as long as the pendulum arm is above the carriage. After approximately 13 seconds, the pendulum is balanced above the carriage.

During balancing, 2 processes are running simultaneously on the ADwin board. The first process is the measurement and control of the pendulum at a repetition rate of 10ms, which is a fairly modest rate for the ADwin board. The second process is the control of the stepper motor, which requires exact timing of several microseconds and is divided into two control processes. One control process prevents the pendulum arm from falling down, while the other process, which overlies the first control process, helps to keep the carriage in its target position.

The target position of the carriage can be adjusted with the scrollbar on the right side of the dialog window. The ADwin board reacts immediately to any change of the target position, moving the carriage to the specified position. In the demonstration model, the control process is made more visible and obvious by slowing it down--the new target position, roughly 1000 units away from the original one, is reached after five seconds.

Windows Notes

DLLs are available for all Windows operating systems (Windows 3.1, 95, 98, NT 3.5 or 4.0) for transferring data between the ADwin board and the operating program on the PC. When using an ADwin board, neither the choice of Windows operating systems nor the control application on the PC has any influence on the real-time capability of a system. Given that the control application need not meet any real-time requirements, it can be developed very easily with any of a number of common Windows development systems, such as Visual Basic, Delphi, Visual C++ or with programs like TestPoint, MATLAB, DIAdem or LabVIEW.

The Measurement Data Acquisition Board in Industry and Engineering

While ADwin boards can easily handle simplistic applications like this pendulum demonstration, they were expressly developed for applications in industry and engineering, where they've long been popular choices. Typical ADwin applications in this field generally require very short response times, such as control of vibration test stands for testing exhaust pipes, motor bearings, couplings, car seats, steering wheels, etc. For example, consider a fast digital controller that moves a hydraulic cylinder along a track and acquires and evaluates the response signals of the device under test. In this case, cycle times of up to 20 microseconds are necessary.

Control and monitoring of scanning tunneling microscopes provide an ideal ADwin application--for example, the X-Y coordinates of a very thin needle are very precisely and quickly controlled via 2 analog outputs of the data acquisition board. At the same time, the distance (Z-coordinate) of the needle is controlled via an analog input and held at a constant height above the sample. The cycle frequency for this application must be several hundred kilohertz. The results of this testing enable the user to exactly determine the surface profiles of the sample.

Additionally, ADwin data acquisition systems can also implement applications requiring very fast digital controllers and filters up to 400kHz. Here, the present control process deviations can be observed and used to change the setting of the control parameters, which is similar to digital P, PI, and PID controllers. Production tests with on-line data evaluation and complex test sequences controlled at high speed and response times can easily be handled. Large amount of data can be acquired and distilled by the ADwin processor, and only the calculated result is sent back to the PC to free up resources on the PC. Once a value is calculated, the ADwin system can react intelligently by changing the test sequence accordingly.

Although it may seem like a novelty, the pendulum demonstration is also instructive for the way it spotlights the ADwin board's capabilities more clearly than any words or figures. It also demonstrates how system response times of less than 1 microsecond are possible in the Windows environment.

For more information on the ADwin-Gold Real-time Data Acquisition System, other sophisticated data acquisition and control solutions from ADwin, or to find the ideal solution for your application-specific needs, contact a CAS Data Logger Applications Specialist at (800) 956-4437 or visit the website at
www.DataLoggerInc.com.

Contact Information:

CAS DataLoggers, Inc.

12628 Chillicothe Road

Chesterland, Ohio 44026

(440) 729-2570

(800) 956-4437

sales@dataloggerinc.com

http://www.dataloggerinc.com

Contact This Company

All Topics