LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dsc periodic I/O "stop while loop" usage?

I'm using LabView 8.5.1 with DSC.  I have created a working periodic I/O server VI and successfully deployed it. 
 
The one glitch I am running into is what happens when the Shared Variable Engine I/O process is terminated.  I normally terminate it by using "remove process" from Variable Manager.
 
The I/O server wizard lets me choose the while loop for termination during the build process, but any code following the while loop is not executed.  In fact, the process continues running for 10 seconds until the "abort VI timeout" is reached, at which point the VI stops.  The "stop" terminal of the main while loop is wired to a "create control" "STOP" button on the front panel.  Publishing or not publishing the "STOP" control during the I/O wizard process has no effect.
 
I'd like to do cleanup steps after the while loop terminates.  Unfortunately the "Heat Exchanger" example has no code after the while loop to illustrate the concept.
 
What am I missing? 
Thanks,
Mike
0 Kudos
Message 1 of 4
(2,501 Views)
Hi Mike,

Has this ever worked?
Have you been able to run the Heat Exchange program fine?

Perhaps you can post your code for us to take a look at

Thank you
Van L
NI Applications Engineer
0 Kudos
Message 2 of 4
(2,472 Views)
Hi Van - let me clarify my question...
 
I don't believe that the termination portion of the DSC "periodic I/O server wizard" actually works properly, or at least an example is needed of how to make it work.
 
It appears to me that the wizard functionality of "choosing the server termination method" might not work.  Within the wizard, the two options are to abort the running server VI, or to choose a "while loop" to be forcefully-terminated with a standby timeout value to force a VI abort anyway, if the while loop does not exit.
 
I set up a simple server VI with one main while loop that does RS-232 I/O with a "running" beep on a 1 second timer.  After the while loop is another small block of code that closes the serial port, and a different "terminating" beeper.  When I run the VI interactively, both beeps work fine.  When I use the wizard to turn it into a server and it is deployed to the SVE, the beeps begin normally.  When I stop the SVE process via "remove process" in Variable Manager, the "running" beeps continue for another 10 seconds until the abort timeout occurs, even though with the wizard I specified the only while loop in the VI to be aborted.
 
The heat exchanger example works fine.  Unfortunately it does not have any code following the while loop, so it doesn't shed any light on this issue.  Ideally that example would be updated a little to show how to use the "while loop termination" feature.
 
Basically my request comes down to this:  is there a way to actually make this work, or is it another in the list of bugs in 8.5.1?
Thanks,
Mike
 
0 Kudos
Message 3 of 4
(2,458 Views)
Hi Mike,

I have an idea you can try to see if it accomplishes your task.
Put your clean up code in a while loop (execute this after the main while loop)
Wire a true constant to the stop terminal of the final while loop (so it only execute once), specify this loop as the termination loop

(sorry for the delay, the company is closed last Thursday and Friday)


Van L
NI Applications Engineer
0 Kudos
Message 4 of 4
(2,428 Views)