Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

sync encoders with NI 9411 and 9423 in cDAQ 9178 chassis

Hello everyone,
I have problem with synchronization of 4 inputs - 2x angular encoder, 1x frequency, 1x linear encoder, where angular encores are connect to NI9423 and frequency input together with linear encorer is connect to NI9411. I need to measure synchronously all four inputs.
I define for each input one task. All tasks are define in NI MAX and it's running in test mode. Like a first step I am trying to run together angular encoders and frequency input, but program write me error message on task for frequency input:

 

Error -50103 occurred at DAQmx Start Task.vi:7220006
Possible reason(s):
NI Platform Services: The specified resource is reserved. The operation could not be completed as specified.
Task Name: Speed_Rotor_Jonas_Sensor1_NI9411

 

It is possible to measure all 4 values together with this HW in same time? If yes could you help me how to change program or/and task settings? My current program is below.

 

Many thanks for your help

 

Pavel

0 Kudos
Message 1 of 6
(4,235 Views)

Hard to say much b/c the tasks are mostly defined outside the code shown.  I'm not highly familiar with cDAQ distinctions, but would suspect there ought to be a way to use 1 chassis counter each for your 4 tasks and run them simultaneously.  I'd suspect that the resource conflict error you're getting is due to particular details of the way the tasks are configured, and that you can probably find a working alternative.

 

Try running just the freq task alone.  If/when that works, add 1 other task at a time to see which one conflicts.  That'll narrow down the config tweaking you may need to do to get all 4 tasks going.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.
0 Kudos
Message 2 of 6
(4,216 Views)

Hi,

I also think you're referencing to the same counters in you Task configurations. Attached example works with no errors with simulated device so it should also work with the real cDAQ.

 

Regards,

Ondřej K.

NIEE AE

CLA, CTA, CLED
0 Kudos
Message 3 of 6
(4,198 Views)

Ondřej, I try your code but it's not working. Program write me same error message (50103) like before.

It looks like problem with some limitations.... It is possible to do this type of meassurement on 2 cards in one chassis together? Could you or somebody else check it? I can't find where should be problem. 

With my code I did some trials and problem is, when I need to read from both cards. If I read tasks just from one or second card alone program is running.

In subject I write bad chassis module I have cDAQ-9174 and in chassis is just two cards  - NI9411 and NI9423.

 

Thank you for your help

 

Pavel

 

 

0 Kudos
Message 4 of 6
(4,193 Views)

Pavel,

I believe running all four measurements shuold be doable with your hardware (see AE KB 63SB51HI). Each task in your application consumes one onboard CTR (make sure you force freq. measurement task to use single CTR) as it is written in the following AE KB 4L0A62E9.

So feel free to contact your local NI Technical Support line in case you won't be able to run it without errors.

 

BR,

Ondřej

CLA, CTA, CLED
0 Kudos
Message 5 of 6
(4,188 Views)

Thank you for your help. I was write service request to technical support. So I will see....

 

Pavel

0 Kudos
Message 6 of 6
(4,179 Views)