09-11-2012 10:50 AM
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
09-11-2012 11:17 AM
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.
09-21-2012 09:57 AM
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.
12-26-2012 07:05 AM
Hello,
Is this thread still active?