This is a demo that I help to build. It was displayed at National Instruments NI Week 2008 on the expo floor. The purpose was to demonstrate synchronization of multiple Real-Time targets doing various tasks using the IEEE 1588 protocol implemented in software. This entire application was programmed using National Instruments LabVIEW.
You will see an NI SmartCamera, which is focused on a mechanical metronome. The SmartCamera has a processor on board, and is running LabVIEW Real-Time (RT). We implemented NI Vision to analyze the image and generate a time stamp everytime the weight at the bottom of the metronome crossed a vertical line through the middle of the metronome. These timestamps are being used to calculate the time period for the motion side to interpret.
Moving farther down, we have a PXI chassis with an NI PXI-8106 dual core controller which is also running LabVIEW RT. There is a PXI-7344 motion control board which is controlling two axes of motion. On each motion axis is a NEMA 34 stepper motor and a P70360 AC stepper drive (sold by National Instruments) providing 2.5 A of current to each motor. The motors are controlling rotating cylinders on which bars from a glockenspiel (similar to a xylophone) are mounted. Doorbell solenoids are used to strike the bars and produce a tone. All of the code controlling the motors was written in LabVIEW using NI-Motion, and is running on the PXI system. We are also using an NI Switch card to actuate the solenoids since the high current required to drive them requires isolated circuitry and relays.
The device has been programmed to play "The Blue Danube" by Johann Strauss, in melody and harmony. You may recognize the tune.
The NI SmartCamera is registering timestamps each time the metronome swings to the other side. Those timestamps are then compared and processed through a low-pass filter to produce a time control that can be sent to the PXI system and control the speed of execution of the motion and switch code, which in effect, is the playing of the music. About halfway through the song, I speed the metronome up, and the system responds immediately. Since this is all happening in real time and the timing source is being shared, the system is totally synchronized on a time basis. Thus, the motion will respond very quickly to whatever input it is given by the SmartCamera.
My personal involvement in the construction of this demo was the programming of the Motion code and the Vision code. I also assisted in the synchronization aspects of the project.
Enjoy the video!
Excellent example!
williamlweaver 2 years ago