LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Clearing DaqMX task

Hi,

 

each second, I have to update 4-20mA output signals for a PLC.
I'm using the NI 9265 output card for this.

 

The system is already installed at my customer and running.
However, sometimes, the outputs freeze and stay on a certain level.

 

I used the faq assistent in my application.
Now I converted it to MX code. I read that creating and releasing a task should be done outside the loop.
But what happens if I put them inside the loop? Do the outputs stay at a given level when clearing the task or do they fall to 0?

 

I like to put them inside the loop so every time the module(s) are initiated again because when you start the task and pull out a card, the write VI does not give an error...; it just keeps going.

 

Thanks for your answers,

Bruno Sas 

0 Kudos
Message 1 of 4
(2,829 Views)

But what happens if I put them inside the loop?

 

Then, each time the loop is executed the task will be created and ended, which is unnesessary. (Assuming I'm thinking of your VI correctly). 

 

You should upload your program and mabye someone could figure out why it is freezing. 

0 Kudos
Message 2 of 4
(2,820 Views)

Hello Bruno,

 

Is it possible to upload your code or an extract of it?

This would make it easier to debug what's going wrong.

 

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 3 of 4
(2,783 Views)

Hello,

 

Is this thread still active?

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 4 of 4
(2,733 Views)