LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Out Of Numerous Frames

I made a LV in 6.0. I have numerous frames. When I want to get out of the frames to wire to my graphs, save file etc. , I need to create constants at the edge of the frames to enable the LV to work. The constants are then wired to enable the LV to run. It looks messy! Is there a way around that. The LV is attached.
0 Kudos
Message 1 of 7
(2,906 Views)
You can right-click on the output and select the "use default" option.
Chilly Charly    (aka CC)
Message 2 of 7
(2,905 Views)
Where is the output? When I right click, I do not get the default option. The VI in 6.0 is attached.
0 Kudos
Message 3 of 7
(2,896 Views)
Hello labview1958,

to get rid of many frames it's easiest to use dataflow.
In your case:
- You do serial communication. I would suggest to use VISA (if available) instead of standard serial vi's. They have error in/out connectors which allow dataflow programming. If VISA is no option you can make your own serial vi's in a wrapper style to include an error in/out... (Using VISA allows better migration to newer LabView versions!)

- Put common tasks into subvi's to allow reuse and dataflow programming (if applicable).

- Use error cluster like in "Wait+ (ms).vi". In your main vi is a "Wait" (frame 3) which can be replaced by "Wait+". And so on...

- Comment on your code: Use predefined constants when applicable. There's a multiplication with 3.142. Probably you want to scale with Pi - there are constants at the numerics palette including Pi, 2Pi and Pi/2... (Frame 1, main.vi) Or the divide operation in the same frame: divide 1 by x can be replaced by the reciprocal operator. In main.vi you use a value-property node to get a path for data saving: would a normal path control don't work here?

Hope this helps.
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 7
(2,894 Views)
Thanks. Actually I want to remove the constants at almost every frame which i need to let the LV run. Without the constants I cannot connect to the graph and save file. The problem is attached.
0 Kudos
Message 5 of 7
(2,887 Views)
As mentioned above you can right-click on an unwired tunnel and select "use default if unwired". (Maybe this is not available in LV6.0).
Other possibility:
Use a while loop around your case. For every tunnel you set up a shift register. Define shift register outside the while loop. If tunnel is not used in the case you wire the shift register through the case (shift register output connected to input via the case). Otherwise connect the new wire. (kind of while loop global aka LV2 style global).


Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 7
(2,881 Views)

Here are a few comments:

Make sure that you don't confuse things. You are talking about cases of a case structure and NOT frames of a sequence structure.

You only use these outputs in one single case! This means that you should place all the code  (everything that is currently to the right outside the big case structure) including all the output terminals, inside the case labeled READINGS. You definitely don't want to e.g. write the empty arrays to a file after executing any of the other cases, right?

According to the name (MAIN.vi), this is the toplevel VI. Toplevel VIs have their core code typically encased in a while loop polling for user input. How are you using this? Are you always restarting this program from scratch? Are you using the "continuous run" button?

You should also do something about your FP color scheme, it hurts the eyes! 😉

Message Edited by altenbach on 08-19-2005 07:15 AM

Message 7 of 7
(2,874 Views)