LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1055 at property node and compression of property node clusters

Solved!
Go to solution

Hello all, 

So I had a huge VI which I spent the majority of a day trying to compress down to the size of a single computer screen, which I didn't do, but it's about 2 screens size and much more manageable than previous versions (despite the still less than desirable wiring job). However, in making some of the code into subVIs, I lost the indicators/controls from these new subVIs on the main VI front panel. I got around this by bundling the indicators/controls within the subVIs, then taking them sending a ref out of the subVI and unbundling them in the main VI and used property nodes to display the indicators/controls on the man VI front panel. There has to be a better way of doing this is, as it's taking up an exorbitant amount of block diagram space, especially due to the fact I left them in vertical form for testing purposes. 

Two questions:

What is a better, smaller way to handle getting these indicators/controls back onto the main VI?

I keep getting a 1055 error at these property nodes on initial start up, where most of these nodes give the error once and then the code works fine, so I'm assuming they are being called before the reference is created in the code - is there an easy way to initialize these references early in the code?

 

I've attached a compressed folder with the main VI (subVIs_test.vi) along with the subVis which I am trying to get the indicators/controls from

**all of this code is within stacked sequence 5

0 Kudos
Message 1 of 3
(2,449 Views)
Solution
Accepted by topic author etvg

1. You're getting Error 1055 because you have race conditions.  You're sending references to indicators in one place, then using property nodes to read the values in another place, but the order of execution is not guaranteed.  If you would just use wires instead of Value property nodes, the race conditions would be eliminated.  But you don't even need the references:

2. Instead of sending the indicator references out of the subVIs, send out the values of the indicators; your main VI will get the values directly without having to do any dereferencing.

3. Your subVIs have superfluous sequence frames; they are serving no purpose.

4. Many built-in functions can work directly with arrays, with no need to use loops.  So this:

ll.png

can be replaced with this:

ll2.png

(Since this entire subVI now consists of a single built-in function, there's really no need for a subVI, just use the built-in Multiply function instead of the subVI.)

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 2 of 3
(2,411 Views)

Sure I'll get rid of the referencing! Thanks for the advice, also, the code definitely still needs reworking from whoever wrote it original - but I appreciate the tip for getting rid of the useless sequence structures and the loops. For some reason whoever wrote the original code used sequence structures to separate the code and never made them into subVIs. When I was making them into subVIs I wasn't even worried about that as making the main VI smaller was my only concern as it was massive, I'll go remove them now. 

0 Kudos
Message 3 of 3
(2,408 Views)