Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Multi-Device Sychronisation

Dear All:
           I got two cards, one belongs to E-series, another is M-series, NI 6221. The E-series is used to acquire data from a Force/ Torque sensor, the corresponding M-series to acquire data from an incremental encoder. How can I sychronize these two cards? Could you please provide a vi example? Thank you very much in advance!
 
 
Best regards,
zibin
0 Kudos
Message 1 of 13
(4,027 Views)

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.

 
Could you clarify whether you are looking to synchronise the E-series analogue DAQ to the M-series correlated DIO channels for your encoder measurement?
I look forward to hearing back from you.
Best regards,
National Instruments | Northern California
0 Kudos
Message 2 of 13
(4,008 Views)
Hi Rob:
         I am sorry that I did not clarify what the problems are.  I am  looking  for some ways to synchronise the E-series analog input DAQ to the M-series  DI channels for your encoder measurement ?. Could I use the vi exmple that is suitalbe for two analog inputs sychronisation (you attached ) in my case? Thank you very much!
 
 
Best regards,
zibin Song
0 Kudos
Message 3 of 13
(3,987 Views)

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.

http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=F276B304618948EDE0340003BA7CCD71&p_...

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,

National Instruments | Northern California
0 Kudos
Message 4 of 13
(3,968 Views)

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

0 Kudos
Message 5 of 13
(3,959 Views)

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,

National Instruments | Northern California
Message 6 of 13
(3,942 Views)

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

0 Kudos
Message 7 of 13
(3,945 Views)

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.

Secondly, an analogue task is set up to acquire on the first 3 channels on the M-Series. Alongside this, a task is set up for each of the counter operations. Both of these tasks are configured to follow the M-Series's sample clock, thus synchronising the different acquisitions. As with the trigger, it is possible to export the 'SampleClock' from your analogue aquisition. This signal may be routed to other devices either via a RTSI cable, certain PFI lines, or the backplane of the PXI chassis.
 
Thirdly, once these tasks are set up, they are started. The counter task begins first, then waits for the analogue trigger. The analogue task then starts, and gives out its trigger, allowing the counter's to begins counting.
 
Fourthly, now the tasks are running, the code enters the while loop and begins returning data from the buffers, and plotting them to the front panel.
 
Finally, once the stop button is pressed, or an error occurs, then the loop ceases, and the tasks are cleared, and the signal routes are disconnected.
 
---------------------------------------------
 
As I said, this VI deals with one board carrying out ALL functions, and no inter-board routing is configured.
Please try this VI out, and let me know how you get on. I will see about modifying it slightly to route trigger and clock signals between devices.
Best regards,
National Instruments | Northern California
0 Kudos
Message 8 of 13
(3,902 Views)

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,

National Instruments | Northern California
0 Kudos
Message 9 of 13
(3,901 Views)

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

0 Kudos
Message 10 of 13
(3,893 Views)