LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Combine read inputs and sample clock in same task on a 9401?

Can someone please expain how to combine reading the inputs and sampling a clock in same task on a NI-9401. I have an application I need to read changing inputs while the clock is sampling one of the input lines. If I configure a task to read inputs and one to sample the clock, Labview reports the - 200022 error. Is there a way to combine the 2 tasks to avoid the error?

0 Kudos
Message 1 of 5
(2,755 Views)

Hi QRP,

 

Which chassis are you using with your NI-9401? You won't be able to create two digital input tasks with the 9401. You also won't be able to use the clock to sample inputs while also sampling it on one task. It is possible however to internally route the clock signal to a counter input task which you can use to measure frequency, edges, pulse width, etc. Please refer to this knowledgebase for routing signals internally http://digital.ni.com/public.nsf/allkb/8A85E97855EDADC98625730C00065F58 . Regards

 

Doug W

Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(2,718 Views)

Hi Doug, thanks for your reply. The 9401 is tied into a 9188 chassis. Will you look at the attached VI and let me know how I could resolve it. I think I understand what your saying, but maybe if you look at the sample code it will give you a better idea of what is going on that is causing the reserve error to occur. Currently I need read inputs coming back from a motor while also monitoring counts/steps from that motor. The Step/count is wired in on cDAQ9188-1718DFBMod3/port0/line4 for the cnt1 and I need to monitor input lines 5-7 for directional data on the same port. I think this is where the problem is, having the counter run on the same port I need to pull inputs from, not sure though. Maybe you have a better idea on how to configure this to work properly since I'm not an expert with the 9401 module. Have a look at the code and let me know what you think.

 

Thank you so much!

0 Kudos
Message 3 of 5
(2,716 Views)

Here is also the missing .ctl for running VI. Thanks again for helping.

0 Kudos
Message 4 of 5
(2,709 Views)

I figured out what the problem was. Thanks again.

0 Kudos
Message 5 of 5
(2,700 Views)