06-02-2010 10:43 AM
Hello,
I am using LabVIEW 8.6.1 with the same version FPGA and RT modules. The board we are using is the PXI-7853R. I have a strange problem where after some programs finish executing, all of the digital outputs turn on(at least, DIOs 0-15 on the multi-functional port).
I have attached two programs; one that does not turn on all of the digital outputs at the end of execution and one that does. I tried making the ending scenario for each of them as similar as possible, but I just can't figure it out.
Thanks!
06-02-2010 01:24 PM
06-02-2010 01:31 PM
Brian,
The tool bar stop button is actually an immediate Abort button. It is intended to be used by the programmer when a program under development gets caught in an infinite loop or something like that. It should never be used as the routine method of stopping a program for the exact reasons you discovered: The program does not end gracefully.
Someone on the Forum a while back stated the using the abort button to stop a program is like using a tree to stop a car. It works but there may be unpleasant consequences.
Programs which are deployed to users should have the Abort button removed form the tool bar to prevent such consequences.
Lynn
06-02-2010 02:11 PM
Using the abort button is what gives me the desired results, and that is to leave all of the DIOs off. When I use the correct method of stopping (i.e., the Stop Button Control for the While Loop) then all of the DIOs turn on when the program ends. This is not what I want. I want the DIOs to stay in the state that they were when the program ended (all of them off in most cases). I only get this when using the abort button and I want to know how I can do this without using the abort button. So again:
Using abort button -> All DIOs are left in state then the program ended (what I want)
Using Stop Button Control in While Loop to end the program -> All DIOs are turned on regardless of their final state in the program (not what I want)
06-02-2010 02:25 PM
I do not have the FPGA or RT modules so I cannot help with those code-specific issues.
Lynn
06-03-2010 07:21 PM
Hi Brian,
When you're running these VIs, are you running the Host VI, which in turn runs the FPGA VI? Or are you directly running the FPGA VI? If you're running the Host VI, then try turning on highlight execution to see when the outputs change to true.