Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

2 DAQ 6115 Boards synchronized

Hi,
 
I am currrently trying to completely synchronize the acquisition on two 6115 boards connected with an RTSI cable. The ultimate goal is to write simultaneaously on the outputs 1 and 2 from card A and outputs 1 and 2 from card B and then start the acquisition on the 8 inputs ( 4 on each card )  
 
Using a software trigger I managed to synchronize:
 
outputs on card A with inputs on card B  AND outputs on card B with inputs on card A
OR
outputs on card A with inputs on card A  AND outputs on card B with inputs on card B
 
I would like to replace that OR with an AND if possible.
 
Thanks in advance,
BA Baracus
 
0 Kudos
Message 1 of 9
(4,068 Views)


 
outputs on card A with inputs on card B  AND outputs on card B with inputs on card A
OR
outputs on card A with inputs on card A  AND outputs on card B with inputs on card B
 
I would like to replace that OR with an AND if possible.






Hello BA,

I'm not exactly sure what you mean by this. It sounds like you have been able to achieve simultaneous input/output between the two 6115 cards. Are you wanting to output two signals on B and read one of those signals simultaneously on B and the other one on A? I do believe I am confused.


Garrett H
National Instruments
0 Kudos
Message 2 of 9
(4,039 Views)
Hello Garret H,
I want to generate burst-signals simultaneously on 4 outputs. (Two on device A and two on device B). This seems to work.
At the same moment I try to aquire on 8 channels simultaneaously.(4 on device  A and 4 on device B). I define the starting point of the acquisition by means of a digital softwaretrigger.
Now the problem: I can define the starting point of the acquisition only on one card. The other card starts aquiring too but not always at the same point. I can choose witch card is triggered correctly. But I cannot trigger both cards correctly. I attached my vi for better understanding. 
 
Thanks for your help,
BA
 
0 Kudos
Message 3 of 9
(4,036 Views)
From your code it seems that you have taken the correct approach for synchronizing an analog input and output on the same card. Now you just need to synchronize the two cards together. You can pass your ai/sampleclock and ai/starttrigger from one board to the other through the RTSI line. I am attaching an example that shows how to route the sampleclock through the RTSI line. In this way you should be able to synchronize the two sample clocks and also start the acquisition off of the same trigger.

Hopefully this will help!

Cheers,

Message Edited by Garrett H on 08-01-2006 04:44 PM

Garrett H
National Instruments
0 Kudos
Message 4 of 9
(4,032 Views)
Hi,
All my last attempts for simultaneous reading and writing were unsuccessful. I used your example to make sure i have a simultaneous output on the two devices but the sharing of an common starttrigger for the simultaneous acquisition didn't work.
 
In fact I am trying  a very basic thing. I am quite sure there must be an example explaining exactly my problem but I am unable to find it on the ni site nor in the labview help.
 
My mission (with reduced channels):
 
write n samples of signal x on output physical channel 0 on device 1
simultaneously
write n samples of signal y on output physical channel 0 on device 2 
 
this is solved, now the unsolved part:
 
at exactly the moment when the writing on the output channels begins
 
read n samples on input physical channel 0 on device 1
simultaneously
read n samples on input physical channel 0 on device 2
 
i manage to start the synchronized reading only on one device.
 
thanks in advance,
ba
  
 
 
 
0 Kudos
Message 5 of 9
(4,003 Views)
BA Baracus,

I am sorry you continue to have issues with getting the channels synchronized.  One way to significantly simply the issue is to include the 2 analog inputs in a single task and to include 2 analog outputs in a single task.  This is possible with S-Series cards  (61xx cards) and the 8.1 or later version of the DAQmx driver.  The DAQmx driver then will automatically synchronize the two outputs and the two inputs.  If you use this method you will only have to then worry about synchronizing the analog output to the input. 

I would take a look at Multi-Function-Synch-AI-AO.vi in the LabVIEW example finder.  You can get to the example finder from Help>>Find Examples.  If you select the browse tab you can go to Hardware Input and Output >> DAQmx >> Synchronization >> Multifunction.  This example is continuous rather than finite.  You can make it finite by removing the while loop and chaning the configuration of the DAQmx Timing vis.  You would set the Input Physical Channel to something like "Dev1/ai0,Dev2/ai0" and the output should be something like "Dev1/ao0,Dev2/ao0".

Let me know if you have any questions about this approach.

Regards,

Neil S.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 9
(3,986 Views)
If you would like to have all 4 tasks sample at the same rate for the same number of points and trigger at the same time such that they are synchronized, here is what I would recommend.  Starting with the original VI you posted, designate the top AI task as the master task.  All other tasks, will be slaved off of it's clock and trigger.  For the bottom three tasks, set the sample clock source to Dev1/ai/SampleClock in the DAQmx Timing VI.  Also, for the bottom three tasks, use the DAQmx Start Trigger (Digital Edge) VI to ensure they start at the same time as the master task by setting the trigger source to Dev1/ai/StartTrigger.  Finally, use a sequence structure to start the bottom three tasks at the same time in the first sequence followed by the master task in the second sequence.  Give this a try and see if it works for you.  If you need different sampling rates or number of points between the AI and AO tasks, this scheme will need to be modified further, but for now, see if you can get this to work.
Message 7 of 9
(3,969 Views)
YES!
Thanks a lot reddog. Exactly what I needed.  Smiley Very Happy
Proven Veteran, perfectly adequate title.
 
regards,
ba baracus
 
for the people following this thread i attached the final vi.
 
 
0 Kudos
Message 8 of 9
(3,961 Views)

Hi,

 

I wanted to synchronize two PCI-6115 boards. I tried "Acquisition_problem_reddog_solution.vi" with LabVIEW 8.6, but got the error -200802. 

 

The whole error message is below: 

 

"Error -200802 occurred at DAQmx Write (Analog 2D DBL NChan NSamp).vi:3

 

Possible reason(s):

Measurements: Write cannot be performed when the task is not started, the auto start input to DAQmx Write is false, the Sample Timing Type is something other than On Demand, and the output buffer size is zero.

Call DAQmx Start before DAQmx Write, set auto start to true, modify the Sample Timing Type, or change the output buffer size.

Task Name: _unnamedTask<179> "

 

Do anyone know what is wrong with this VI? I connected my two boards with a RTSI cable. 

 

Thanks a lot!

 

Geena

0 Kudos
Message 9 of 9
(3,338 Views)