LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need a comment for my program & questions.

Dear all,

I have just finished my simple project with LabView.
Actually, I have no much experience with LabView language.
Therefore I would like to hear your invaluable comments about using structure, variable, and some habits to write the program.
Please let me know if you find some bad thing or something should be escaped.

Regarding to my question, as you can see the status window(GPIB, RS-232, and Saving),
I would like to attach the common status window to main dialog with same structure (background).
But the status window couldn't seen in opening the window.
How can I modify it to see the status window in evey tab states?

Thank you in advance.

Lee
0 Kudos
Message 1 of 4
(2,705 Views)
Please allow me to suggest to you to replace the "sequence structure" within the while-loop (in Frame 1 of the outer sequence) with state-machine structure.

You may find example, State Machine Test Sequencer.vi, from NI Example Finder and search using "state" as keyword
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 2 of 4
(2,694 Views)
I think I would change the Tab control from the Windows style "Dialog Tab Control" to the standard LabVIEW style "Tab Control" - the Windows dialog style control does not fit in very well with the style/colouring of the LabVIEW control objects, and this is one reason why your status indicators don't integrate "visually" as well as they could.

I don't think it's possible to add an "always visible" part to a tab control, but there are one or two ways to "join" controls together...

1. You could simply use the "Group" front panel objects function in the editor taskbar - this will lock several independent objects together so that they move around together on the front panel (but are still seperate data terminals on the block diagram)

2. You could create a "Custom Control" or "Type Def" from several front panel objects - this way you could create a control which includes both a tab control and LED status indicators (etc, etc), all integrated into one single block diagram terminal/data structure (and is saved, so can be reused in other programs). This option might be a little cumbersome though, if you have many controls and indicators that you want to be included within your tab control (note: the control/indicators actually on the various tab pages do not have to be included in the custom tab type definition).

As regarding programming style - I think you need to try to not use "sequence structures" unless you really have to. I never use sequence structures except as a last resort. If by not using sequence structures the diagram becomes too large, then that is a sign that you might need to create mor sub VIs. Tip: All the sub VIs I create use the "error cluster" input/output, so it's allways possible to sequence sub VIs even when there is no data dependency.

Hope this helps.

Mark H.
0 Kudos
Message 3 of 4
(2,692 Views)
Ah, it seems that it's not possible to create a type def' data structure (cluster) that includes a tab control, so that rules out my most exotic suggestion.

Nevertheless it was possible to customise the basic tab control with an added "decoration".

Here is your program, modified by replacing the dialog tab with the standard LV tab. Notice that the tab control is now a custom control (saved as "CustomTab.ctl" in the .llb library file).

What do you think?

Mark H.
0 Kudos
Message 4 of 4
(2,683 Views)