Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

Task specified is invalid or does not exist when trying to stop myDAQ acquisition

i have a relatively simple state machine in which i'm doing the acquisition from a myDAQ on the analog channel.

i do have two instances of the "stop task" module but even when i'm using only one of them (the other is conditional to change "samples per channel" value), the error still pops out.

any ideas?

p.s. i know i haven't attached the VI itself, simply because it has quite a few dependancies without which it probably won't work.

0 Kudos
Message 1 of 8
(13,280 Views)

Ensure you're not calling DAQmx Clear Task anywhere (you can try running NI I/O Trace at the same time). You can also use that tool to see what task handle you are passing around. If the handle is getting cleared, I'd probe some wires to see where it might be getting lost.

 

Good luck!

0 Kudos
Message 2 of 8
(13,278 Views)

i am calling DAQmx clear but only after i've stopped the task (only doing it once after the unconditionaled instance), at which point the VI stops.

i migh've missed something but maybe once i stop a task it also clears it? (doubt it but who knows...)

0 Kudos
Message 3 of 8
(13,275 Views)

That's what I figured...so I would try NI I/O Trace running at the same time (it's a debugging tool)

0 Kudos
Message 4 of 8
(13,270 Views)

tried using the NI I/O trace but it shows me the exact same message as did the simple error out dialogue...

i know "where" the error is occuring i don't need to figure that out, i can simply run with "highlight execution" turned on and i know.

and while all my tasks have names, the NI I/O trace showed me "unnamed task error"...

0 Kudos
Message 5 of 8
(13,266 Views)

Dear abenigma, have you solved your described problem? I have the same problem at the system where are attached two usb DAQ cards.

I've also found out, where error occured (not always at the same instance and at botk cards) but I can't find the reason for the error. It always occurs at digital reading. If you solve a problem, is it a possible to deal the solution with me please?

0 Kudos
Message 6 of 8
(12,525 Views)

Hi

 

It looks like this thread is old. I think it would be better idea for you to make a new thread in order to gain more traffic

0 Kudos
Message 7 of 8
(12,497 Views)

That solved my issue. Thanks !

0 Kudos
Message 8 of 8
(5,178 Views)