Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Multifunction with PCI 6221

Solved!
Go to solution

Hi,

 

I want to build a multifunction program using PCI 6221 card. In the program, it generate two analog signals to trigger a CCD camera and light a LED. Meanwhile, program acquire an analog signal for specific duration and the images which are acquired by the camera should be displayed. Above activities in signal generation and acquisition happen in a user specified time (currently the time period is 1500ms) and the entire process repeats for 40 times. A time-while-loop is used so run the signal generation and acquisition, and image acquisition continuously. 

 

The analog signal acquisition should start at a point that user specifies and it should continue for a defined time period. This is currently done by using a digital signal created at the DO port and use that signal as a pause trigger for AI system. On the other hand, all these signal generating and acquiring processors should be well synchronized and precise on time. A external clock is shared (CTR0) among all the sample clocks used in the AI, AO, and DO. From the literature I understood that digital output can not be triggered in M series board, so I am using a internal triggering system (as shown in multi function examples of LabView 2010).

 

Question: Is there a proper way to trigger the analog output and digital output using another signal (lets assume a signal generated by CTR1) each and every cycle to maintain a highly synchronized system. (I do not like to run the timed-while-loop and continuous sample clock for the AI and AO).

 

0 Kudos
Message 1 of 4
(3,311 Views)

All you need to do is to specify the AO trigger and set the reference clock of the DO to AO.Reference Clock. The AO.Reference Clock will run when the start trigger is fired.

See here for more examples.

 

Felix

0 Kudos
Message 2 of 4
(3,294 Views)
Solution
Accepted by topic author RDina

The 6221 does not have a digital output timing engine, so you can't trigger it directly (or set a DO.ReferenceClock, although it doesn't sound like this is what you want to do anyway).  You can directly use a sample clock from another source, so this clock signal is what needs to be triggered.

 

I agree using software timing is not a good idea--you can likely implement this with hardware timing instead, although I'm not sure how the camera fits into the equation.

 

 

I'm assuming that you're using CTR0 as a finite, retriggerable counter output task.  Then you are using this signal as a sample clock for AO, DO, and AI?  This is probably what you will want to do.  Finite Counter Tasks require the use of both counters on M Series DAQ boards, so you wouldn't be able to use CTR1 indepdently of CTR 0 if you want to use finite retriggerable counter outputs.  You can always generate 0s if you don't want to output any voltage during part of the acquisition.

 

 

Best Regards,

John Passiak
0 Kudos
Message 3 of 4
(3,283 Views)

Hi John,

 

Thank you very much for the information. I was able to solve the problem with your guidance.

 

Regards,

RDina

0 Kudos
Message 4 of 4
(3,235 Views)