LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stopping output tasks properly before exiting a For-loop

Actually I thought of that but somehow it seemed like a workaround and not a "real" solution. But if it is ok, I quess I'll do that then.

 

Lastly. do I still need to end the input DAQ Assistant -tasks before exiting the For-loop conditionally in order to be able to still read input data later in the program? Or can I just exit the loop and not worry about it?

 

Btw. Thanks a lot for your help, I'm still quite a noob with all of this...

0 Kudos
Message 11 of 15
(384 Views)

Hi Aleksi,

 

I don't think you need to stop them explicitely - but it will not hurt…

 

Why is setting an output to a safe value considered a "workaround and no real solution"? How will you handle any emergency situation?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 15
(379 Views)

I meant the part of force feeding the output with 0. I thought that the output should go to 0 if I just stop the output task but I quess I was wrong?


And finally, this stop-function is not really an "emergency" function but rather in frequent use. This is why I don't want to run into problems (like the DAQ device requiring a boot) caused by not ending the tasks properly. 

 

Edit. Check the picture, Is this close to what you meant with feeding the output with 0 after the loop? Would this work?

0 Kudos
Message 13 of 15
(375 Views)

Hi Aleksi,

 


I thought that the output should go to 0 if I just stop the output task but I quess I was wrong?


Why should the output go to zero when you switch off the DAQmx task? All you do is switching off the programming logic used to set those output values, but you don't change any output value!

 

When you need a certain value on your output signal you have to set it…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 14 of 15
(366 Views)

Ok, that clarifies it... 😄

 

Could you still check the picture in my previous post and tell me your opinion if that would work or not. I still need to be able to read data from the same DAQ device after exiting the loop.

0 Kudos
Message 15 of 15
(361 Views)