Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

50103 error. How to use two counter at the same time?

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.

0 Kudos
Message 1 of 5
(3,517 Views)

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.

 

Timothy S.
Senior Technical Support Engineer
0 Kudos
Message 2 of 5
(3,485 Views)

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.

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

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

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 4 of 5
(3,468 Views)

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

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