Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Configure NI 9401 compact DAQ module for 2 PWM and 1 Quadrature Encoder Signal

Hi,

I am using NI cDAQ 9174 chassis with a NI9401 Digital I/O module in slot 3 of the compact DAQ chassis.

 

I have to measure following 3 signals 

1) Quadrature Encoder Signal

2) PWM signal 1 coming out of the angle sensor module

3) PWM signal 2 coming out of the angle sensor module

 

I tried configuring the following counters for each of the above signal

1) cDAQ1Mod3/Ctr2 - Quadrature Encoder Signal

2) cDAQ1Mod3/Ctr0 - PWM signal 1

3) cDAQ1Mod3/Ctr1 - PWM signal 2 

 

I receive following error code for all the channels.

 

Error Code : -201133 "Device cannot be configured for input or output because lines and/or terminals on this device are in use by another task or route. This operation requires temporarily reserving all lines and terminals for communication, which interferes with the other task or route.
If possible, use DAQmx Control Task to reserve all tasks that use this device before committing any tasks that use this device. Otherwise, uncommit or unreserve the other task or disconnect the other route before attempting to configure the device for input or output."

 

Attached is the vi created to intialize, create and start the tasks.

 

Request you to let me know, how I can configure the counter input tasks to measure all the 3 signals.

 

Thanks

G Anil Kumar

0 Kudos
Message 1 of 2
(6,279 Views)

I'd suggest that you use a master/slave structure with all the three data acquisition tasks as slaves and connected by error clusters. The problem with your vi is that more than one task are polling for the same counter simultaneoulsy. You must rember that lab VIEW works in the data flow paradigm. Do revert if the problem persists.
Vinayak Singh
Application Engineer 

0 Kudos
Message 2 of 2
(6,273 Views)