10-28-2014 09:33 PM - edited 10-28-2014 09:38 PM
YUP, I'm at a loss
Essentially, I found--
Main()
Init ()
While(1)
}
Clean-up()
Unreachable code(????)
"1" sort-of "IS" doesn't it? how do you reach the "Clean-up()"?
10-29-2014 05:02 AM
There could be some "break" command in the loop, or even better: goto 😄
Norbert
10-29-2014 06:57 AM
When it comes to Booleans, 0 is FALSE, everything else is a TRUE. But I do see that you are missing the open bracket for the WHILE.
Watch out for Breaks. The C developer I inherited a lot of bad code from loved the Break. Also watch for a Try...Catch. They might be depending on an error to break out of the loop.
10-29-2014 08:34 AM
There are no gotos and no breaks
No returns
just nice clean-up code that can't be executd while the univere has unity.
10-29-2014 09:26 AM - edited 10-29-2014 09:27 AM
Jeff·Þ·Bohrer wrote:
just nice clean-up code that can't be executd while the univere has unity.
Good thing we've never seen people do that in LabVIEW...
10-29-2014 09:49 AM - edited 10-29-2014 09:53 AM
@crossrulz wrote:
Jeff·Þ·Bohrer wrote:
just nice clean-up code that can't be executd while the univere has unity.
Good thing we've never seen people do that in LabVIEW...
Ctrl+. (Period) exists in LabVIEW so its not exactly the same. and do you have down stream code when you use that construct?
Reminds me of a movie I saw
10-29-2014 10:06 AM
Jeff·Þ·Bohrer wrote:Ctrl+. (Period) exists in LabVIEW so its not exactly the same. and do you have down stream code when you use that construct?
I found a post this morning that had the infinate loop and then cleanup code afterwards. Oh, and it ran on RT. I have since deleted it and I don't feel like finding it again.
10-29-2014 01:33 PM - edited 10-29-2014 01:34 PM
@JÞB wrote:
Ctrl+. (Period) exists in LabVIEW so its not exactly the same. and do you have down stream code when you use that construct?
Reminds me of a movie I saw
Doesn't always work though.
Found a case where the producer loop stopped, leaving the consumer waiting... and waiting... and waiting... Ctrl-period did nothing.
There's probably other poorly-coded problems in that project too... :uhoh
10-29-2014 03:07 PM
Oh sure, CTRL + . doesn't always do what you want. Here is a fun one. Create a subVI that has the window appearance setup to be a dialog which a modal display. Then place that subVI in a main VI in a case structure, in a while loop. Add a boolean control set to false on the case selector, and have the model dialog subVI in the true case. Then open the front panel on both VIs before running the main. (with a constant on the while loop to not stop).
What do you get? Well the model dialog is in memory so it is shown, and it is model so it is brought forward. But it never is running so CTRL . won't stop it. Also being model you won't be able to click into the Main to stop it, or CTRL . into the main.
The solution? Task kill LabVIEW, or use some kind of Abort All similar to this one.
http://lavag.org/files/file/117-abort-vi/
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
10-29-2014 04:16 PM
CRTL + . does not work on VIs which do not have an abort button. It also does not work on modal VIs. There may be other combinations as well.
The Help page for keyboard shortcuts does not mention these limitations.
Lynn