Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

continuous AI acquisition using RTSI plus finite AO generation

Hello,
 
I have the following problem:
I have two PCI-6221-M cards.
 
I want to do the following tasks with them:
continuous acquisition of 4 AI/card (2 tasks: one for each card)
finite generation of 2 AO/card (SW triggered; 4 tasks: one task for each AO)
besides I use two DO
 
as base I used the examples for these two tasks which are provided with labview. so far so good.
then I realized, that the acquisition should be synchronized: I configured a rtsi cable in max, and modified the program using the corresponding example for M-series also provided in labview.
 
here comes my problem: both VIs (acquisition & generation) can run separately; but if I let them run together, the AO-VI crashes, telling me that the clkref.src is reserved.
 
I have tried to change the constant which initializes the clkrref.source of the master AI task, but i did not get it to work.
 
enclosed I sent you the examples I have used as base.
 
could you help me with this issue?
 
 

Mensaje editado por Dani Pindado

0 Kudos
Message 1 of 5
(3,495 Views)
Hi,
 
Probably the fact is using 4 AO with analog outputs....
 
I have seen your vi's but u send:
1. Twwo card syncrhonized AI
2. Single card AI
3. Single card AO.
 
U have 1 AI sample clock (1 clock for the inputs on each card) so u can only set one clock rate for ALL the AI of that card so only 1 task for card. U also have 1 AO sample clock (1 clock for the outputs) so only 1 task for card too.
 
Then, the problem can be....
1. U try to use 2 task in each card for AO with different rates or configuring the clock twice, that is not possible coz u have only 1 clock for AO.
2. As I have seen the AI's are connected and synchronized by means of the reference clock (the internal 20 MHz clock of both boards will be the same) that goes through the RTSI cable line 7 (dedicated for that clock). And probably u want to synchronize afterwards the AO another time sharing the reference clock when it is unnecessary due to the fact that is already connected and that produces the error.
 
Pls attach the correct vi's.
 
 
Regards,

Jaime Cabrera

NI Applications Engineering Spain
Message 2 of 5
(3,480 Views)

Hello Jaime,

i have been investigating,  and i have actually both problems.

1) I have fixed the conflict between AI and AOs using the synchronisation for E devices, as explained in this document:

http://zone.ni.com/devzone/cda/tut/p/id/3615  (very interesting, it has helped a lot)

2) I do have a conflict because of two AO tasks in one single device. I could avoid it, because the both tasks have the same output rate. my concern is I can update a single channel (because I do not always writte all the channels at the same time)?

thank you

0 Kudos
Message 3 of 5
(3,477 Views)

Hi,

 

good to know u found solution to problem 1. In fact if u share once the reference clock u do not need to share it again. Just make sure u work at the same rate and send the start trigger from the master device.

 

Refering to your other question, yeah u should introduce all channels of your AO in one task and work them toghether. If you just want to update one channels just write the same level into the other output and that will solve your problem. 😉

 

 

Regards,

Jaime Cabrera

NI Applications Engineering Spain
0 Kudos
Message 4 of 5
(3,473 Views)

hmmmm not so easy, unfortunately.

I have to write two voltage ramps which are not synchronized.

when I write the second ramp, the first one might be still running so I have a conflict....

I guess there is no solution for this? I have a card 6733 too, with which I am having the same problem. it seems I need different cards for every channel?

0 Kudos
Message 5 of 5
(3,470 Views)