01-13-2006 09:23 AM
01-16-2006 06:48 AM
Hi Zibin,
Thanks for posting on the NI forums.
It is possible to synchronise two devices together so they acquire data at the same time, and operate from the same clock signal. However, having said this, most examples available deal with acquiring two analogue signals. One such example can be found at the link below.
01-17-2006 04:50 PM
01-18-2006 03:47 AM
Hi again Zibin,
Thanks for clarifying that, it's helped me get a good handle on the issue. There is no direct way of having a digital read task start on a trigger, however there is a way to have the digital lines correlate to trigger with a triggered analogue input task on the same device. Given that you have a M series 6221 device, you will be able to do this. Please see the link below for an example VI that carries this out.
Now, as far as sychronising the two devices together (E-series and M-series), I still have some remaining questions: How many digital lines/ports are you looking to acquire on? Do you wish this acquisition to be continuous or finite? Are you wishing to have the devices start on the same trigger, or share the same timing clock, or both? Which model E-series device are you using? Are the analogue lines on the M-series device due to be used, or are they unsuitable for your analogue acquisition needs?
If you could let me know these details I'll see where I can help.
I look forward to hearing from you. Best regards,
01-18-2006 02:18 PM
Dear Rob:
Thanks for your kind patience! For M-series, I got three analog inputs and t wo counter inputs (to get the encoder readings). I d like to this acquisiton to be continous and share the same timing clock. I am not quite sure about the model of E-series. It is suitable for my analogue acquisition. Thanks a lot for your advice!
Best regards,
zibin
01-19-2006 04:35 AM
Morning Zibin,
Okay, the analogue input should not be a problem on either of your DAQ cards. Given that your acquisition is running a small number of analogue input channels, you can use just one card for this. I would advise you use the M-Series device for this portion of the acquisition as it has a superior acquisition rate, and resolution (unless your E-series device is faster or more accurate).
The previous piece of code I referred you to dealt with triggering the correlated DIO lines, as you noted previously that you were using the DI lines on the M-Series to acquire the encoder data. However, your most recent post refers to using the counters. As these are fundamentally different operations, they require different programming to DIO operations. I can refer you to some code that helps program the device's counters if you wish?
Best regards,
01-19-2006 09:31 AM
Dear Rob:
Now I can confirm that we are using E-series, 6034E DAQ card. Two counter pins are wired to two encoders to acquire encoder readings. Could you please provide me some vi programs to sychronize them? Thank you very much!
Best regards,
zibin
01-20-2006 09:26 AM
Hi again Zibin,
Based upon what you have noted to me in the forum, this is my current understanding of your situation:
You have one 6221 DAQ card, and one 6034E DAQ card. Are these devices in a PXI chassis or a desktop PC? If they are in a PC, do they have a RTSI cable connecting them?
The signals you need to acquire are 3 analogue inputs, and 2 encoder signals. Is this list exhaustive of all the signals in your system? If there are no other signals that you need to acquire, then you can simply use one DAQ card to carry out this function. Again, I would recommend using the M-Series device.
---------------------------------------------
I have found a VI in my archive whereby the analogue, AND counter, operations are carried out on one M-Series device. The two operations start at the same time, and operate from the same sample clock. Please find the VI attached. The VI is structured such that you will just have to specify the 'Dev' number of your M-Series.
This VI deals with some advanced signal routing in order to carry out this functionality. Please read below for an explanation of the VIs programming.
Firstly, the ai/StartTrigger is routed through to the counters' 'StartArmTrigger'. This ensures that when the analogue acquisition begins, the counter begins counting at the same time. It is also possible for this signal to be routed between boards via the RTSI lines or PFI connectors.
01-20-2006 09:41 AM
Hi again Zibin,
Please find an attached VI (modified version of the previous post) that routes the clock and triggers between an M-Series and E-Series device.
Hope this helps. Best regards,
01-21-2006 05:14 AM
Dear Rob:
Thanks for your kind advice! Both E-series and M-series cards are inserted into PCI sockets of a computer with XP operating system. The RTSI cable was used to connect two cards to sychronize them. This E-series card was specially designed for acquireing the readings from Force/ Torque sensor. This card can not be utilized for the acquisition of any other analog or digital signals. The only way is to use M-series card to do the job. So I d like to acqure 3 AI and 2 DI signals using M-series card. Could I use your vi program that you latestly posted to sychronize them? Thank you very much!
Best regards,
zibin Song