01-23-2006 04:56 AM - edited 01-23-2006 04:56 AM
Morning Zibin,
So, in addition to the force/torque sensors, do you need another 3 analogue signals to be acquired, but on the M-Series device? Also, I assume by 'DI', you refer to the encoder measurements you mentioned earlier as being counter operations?
Neither of the VIs I've posted will explicitly do the above: the first VI carries out 3 AI and 2 CTR operations all on one card (M-Series); the second VI carries out 3 AI on one card (M-Series) and 2 CTR on another (E-Series), with the devices using the same trigger and clock signals. Although neither does exactly what you wish, you should be able to modify the second VI to attain what you wish.
The second VI had a small error in the wiring, which I have fixed in the newer version (attached). I have reversed the labels on the front panel, so the E-Series device is now the timing 'master', and the M-Series the 'slave'. Also, I have neatened up the VI so it is a little more graceful, and should be easier to understand.
To modify this new VI, so that you acquire AI measurements on the E-Series and CTR & AI measurements on the M-Series, you will simply have to add in an AI task for the M-Series device, and have it wait on the start trigger from the E-Series, and use the same sample clock.
- To configure the new task to use the E-Series sample clock, feed the 'Rate' and 'Source' values from the E-Series code, into the new task's DAQmx Timing VI.
- To configure the task to start on the E-Series' start trigger, then feed the 'aiStartTrigger' constant into the new task's DAQmx Start Tigger VI.
By doing the above, the signal routing will be taken care of by the drivers. Remember to have the code start all of the M-Series tasks before the E-Series tasks.
However, if you don't need the additional AI tasks, then this new VI should suit you fine.
I hope this helps. Let me know how you get along. Thanks,
Message Edited by RobS (AE) on 01-23-2006 11:02 AM
01-23-2006 06:46 AM
01-23-2006 09:14 AM
Hi Zibin,
Please find an attached .llb that should work for you. This .llb contains a VI that acquires :
-3 AI signals from an E-Series device,
-3 AI signals from an M-Series device, using the E-Series Sample Clock and aiStartTrigger,
-2 encoder signals via counters on the M-Series device, using the E-Series Sample Clock and aiStartTrigger,
-1 correlated Digital Input (DI) line on the M-Series device, using the E-Series Sample Clock and aiStartTrigger.
The top-level VI is 'M&E-Series-AI-AI-CTR-DI_NI.vi'. Please bear in mind that this code, although comprehensive, is not designed to be and end-solution, it simply demonstrates some of the ins and outs of programming multi-device, multi-function DAQ. You may well have to customise the code for your own uses.
Given the VI I have posted, I believe it would benefit you to explore the idea of attending a training course on LabVIEW and Data Acquisition. These courses teach how to use the LabVIEW programming environment, but also how to program data acquisition tasks using the DAQmx driver. Courses such as these would certainly empower you to program effectively and independently. Please visit the URL below for course information, or call NIUK on 01635-572-414 and speak to our Customer Education Manager.
http://sine.ni.com/nips/cds/view/p/lang/en/nid/10548
I hope this helps. Thanks,