LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Routing instrument handles and errors through state machine?

Solved!
Go to solution

I have this broken VI here that uses a state machine to handle user input parameters to a wave function generator in real time. The only problem is I don't know how to declare my instrument handle and error handles to pass them between states. 

 

1894812ebb96297642cb5d410d54ebe4.png

 

 

0 Kudos
Message 1 of 2
(1,858 Views)
Solution
Accepted by topic author crash_override

You obviously have a broken wire in that case.  If you hover over that broken wire Context-Help on, it might give you a clue.

 

There are 2 possible causes.

 

1.  You have a bundle node in there with an undefined input.  Shrink the node to get rid of that bottom element you have nothing going into.

 

2.  Your cluster doesn't seem to be a type def cluster.  Turn it into one.  In my opinion, every cluster and every enum in LabVIEW should be made into a type definition.  If you don't, you'll eventually run into a problem particularly if you want to add another element to either, then you spend a lot of time fixing every location that cluster or enum is used.  You have 3 possible places where that brown wire gets defined.  The constant that initializes the shift register., the bundle cluster in the shown case that is broken itself for reason I said above, and in one more more other cases in that case structure.

 

If you wind up changing one thing, in any of those locations, you'll break your VI until you fix all the locations.  With a typedef, you just have to change the typedef and other places will update automatically.

0 Kudos
Message 2 of 2
(1,833 Views)