LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hidden objects and wires

Solved!
Go to solution

Hi there,

 

I have been facing two weird issues:

1) My labview program is quite complex so i am using multiple cases in sequence/stacked structure. Some of the cases shows the missing wires (see the attached picture). I have tried clean up tool but its not helping. I have tried moving structures or even expanded them but no luck.

2) Block diagram is completely blank when i open my VI in Labview 2025 which was originally written in Labview 2021. I have scrolled up/down left/right every where but couldnt find anything.

 

People are suggesting me to move on to python for lab automation but i dont want to give up on LabVIEW 🙂 

0 Kudos
Message 1 of 21
(527 Views)

LabVIEW block diagrams get like you are describing when they get extremely large, usually at ~2^15 (16384) pixels from the origin.

 

While you only show a small portion of the diagram in your screenshot, the general scale of everything does indicate to me that this is likely the case.

 

A VI that size is not really recommended in any case, so I would strongly recommend making as many subVIs out of small sections of it as you can in order to shrink it down.

 

Hopefully it's still usable enough that you can manipulate it to shrink its size down.  If not, do you have a backup from before when you started using the clean-up tool or the moving and expanding of structures?

Message 2 of 21
(504 Views)
Solution
Accepted by topic author Faisal786

The coordinates of a block diagram are limited to I16 (i.e. -32768 to 32767). Sadly enough, a diagram cleanup can push it over!. Once the diagram falls of the edge, things get corrupted.

 

Details here.

 

An overabundance of sequence structures and local variables actually significantly increases the "complexity" and I can see several glaring landmines, even with the missing wires. There is a lot of code smell!

 

I am sure that if you would implement a proper state machine, the code could fit on a few postcards.

 

Do you have a backup of the VI before the problem started? Can you attach the VI?

Message 3 of 21
(471 Views)

Hi Kyle,

 

thanks very much for the suggestion. Indeed this is the case for my program. Yeah i did create backup because i lost my code in of my previous revision of program. I will try splitting it into several sub-programs.

0 Kudos
Message 4 of 21
(432 Views)

Thanks very much for referencing the problem, Sir. I will try to split my program. I have attached the VI for your reference.

0 Kudos
Message 5 of 21
(428 Views)

If you are experienced in LabVIEW, then you wouldn't be "using multiple cases in sequence/stacked structure."  Sequences and especially "stacked" sequences are rarely useful (the exception being FPGA code).

 

Do you have the LabVIEW 2021 version of this code available?  If so, attach a piece of that code (the Main VI, or an example sub-VI) and also attach an "image" of the VI (as any sub-VIs in the code will show up at "square outines" with a Question Mark in the middle for any sub-VI that we don't have).

 

Bob Schor

 

0 Kudos
Message 6 of 21
(395 Views)

@Faisal786 wrote:

Thanks very much for referencing the problem, Sir. I will try to split my program. I have attached the VI for your reference.


Yikes!  A monster size FP.  A monster size BD (with acres of white space).  Massive abuse of local variables.  Horrible architecture.

Your best course of action:

  1. Throw it away.
  2. Learn how to properly code with LabVIEW.
  3. Start over.

 

0 Kudos
Message 7 of 21
(386 Views)

Thanks Bob. The code that i attached previously is for labview 2021. I use sequence structures because most my tasks should run in sequence. Would you recommend me anything else that works better than sequence structures ? another problem that i see with sequence structure is that they will expand unnecessarily and even clean up tool wont help.

0 Kudos
Message 8 of 21
(349 Views)

Its very easy to suggest someone to throw their 3 years of work and abusing their way of work but it is not welcome at all. 

 

1)  i have not left these blank spaces on purpose, i am also pissed of why they are their as clean up tool is not helping.

2) i have plenty of local variables because i read somewhere on forum that creating local variable is better than entering or leaving millions of wires from structures.

 

Open to have any constructive feedback and suggestion.

Message 9 of 21
(348 Views)

@Faisal786 wrote:

i have plenty of local variables because i read somewhere on forum that creating local variable is better than entering or leaving millions of wires from structures..


A bold and completely false statement require a link. Can you tell us where you read that? All I can think of is that this was a newbie statement that quickly got challenged by more experienced users.

 

To replace a million wires, you would need millions of local variables and a million front panel element of no interest to the user, creating huge amounts of extra data copies in memory and break all dataflow dependencies where the race conditions then needs to be corralled using hundreds of thousands of sequence structures. The only statement you might find is that local variables are "better" than value property nodes. Wires are always preferred. The wire is the variable. You always know where the data comes from, where it is going, and what modified it last. 😄 Local variable are useful for UI tasks (e.g. update a control with new settings). The UI should not be involved in data that strictly belongs on the diagram alone.

 

(I wasn't able to look at your code for more specific advice (Only LabVIEW 2020 here). It is always a good idea to do a "save for previous" before posting VIs)

0 Kudos
Message 10 of 21
(328 Views)