03-09-2011 10:10 PM
Hi:
I am getting a 50103 error with my PCI6236 DAQ board (M series). What I am trying to do with the board is to have a retriggerable analog output and retriggerable analog input simultaneously but triggered by different source. For instance, in my application an analog voltage signal is written to AO0 every time a trigger (~1Hz) on PFI0 is received, and an analog current is measured every time a different trigger (10Hz) on PFI1 is received. To make them retriggerable, I follow the idea of using counter to output a finite pulse train that is internally routed to be used as the ai/ao sample clock. See link below.
http://digital.ni.com/public.nsf/allkb/82DAECADE90CC56F8625659200675B2A
Upon reading an article in knowledge base,
http://digital.ni.com/public.nsf/allkb/485201B647950BF886257537006CEB89#case3
I understand my DAQ just cannot handle this kind of operation. So I am wondering if there is any other way around this?
Thanks
K.C.
03-10-2011 05:51 PM
KC,
You are correct that the best way to make a retriggerable analog input task (as per the KB you linked) with the M series DAQ boards is to make a retriggerable finite counter output to serve as the analog sample clock. The issue you are going to run in to with trying to setup two retriggerable tasks in this manner is that to generate a finite counter output, we need to use 2 counters, and the M-Series boards only have 2 counters total. This is the best way to approach this to keep the retriggering hardware timed. Other than this, you could try to use software timing to start and stop tasks, but you run the risk of missing triggers depending on the speed of your signals. It may be possible with the slower signals to start a task in software, have it trigger and run, then stop the task before restarting it to wait for another trigger. Unfortunately, it does sound like you'll be hitting hardware limitations with the resources you have, but I'll let you know if I can think of any other workarounds for you to try.
03-10-2011 11:44 PM
Thanks, Timothy. I have considered your suggestions before. I have tried to use the slower trigger as the shared trigger for both task. Like you said, I have experienced a delay. So still wondering the easiest way around it. Thanks anyway.
03-11-2011 10:49 AM
I'm kinda thinking out loud here, let's see where we get:
1. I assume that since you would like to generate retriggerable finite pulse trains, your sample count and sample rate are predetermined. This further implies that your total sample duration is predetermined.
2. You *can* create 2 independent retriggerable *single* pulses with your 2 counters.
3. Set their durations according to your needed total sampling durations (per trigger).
4. Configure your AI and AO tasks to use those retriggerable single pulses as "pause triggers" so you will only
input/output samples while those pulses are high. The AI and AO tasks can use internal timing to set their
sample rates.
Seems to me like that could work, unless I'm not understanding something about your app.
-Kevin P
03-12-2011 02:36 AM
Hi Kevin:
Thanks for your reply. Your suggestion sounds correct to me. I need to implement it first and tell you how it works.
Best
KC