LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Optional execution

Hi.

 

I am trying to use tagged messages to route signals through to various pieces of hardware with LabView. At the moment, I run the messages through a subVI case structure. If the message header passes spec then it should be routed vertically (i.e. down to the piece of hardware or other software components). If the message header doesn't pass spec then it should be routed horizontally (to the next header-checking subVI). The problem that I have is that when the message header doesn't pass spec, rather than not executing the vertical path, the vertical path is executed with a blank string. For the sub-routing this is not such a problem at the moment but when I come to put in real-time control of hardware with complex routing, it's likely to be a burden.

 

Is there anyway I can get a specific output path to NOT execute AT ALL after a subVI finishes its execution?

 

I'm enclosing the routing VI and a test program.

 

Download All
0 Kudos
Message 1 of 2
(2,020 Views)

Every output terminal of a SubVI will return something when the SubVI finishes. An output can't "not execute". If you don't write anything to it the indicator will have the default value or the value of the last SubVI call.

So you will need some logic outside the SubVI to determine if you want to act. You could have a boolean output in addition to the string. True would mean to route the message to the hardware, false would mean not. Or you can just check for empty string and don't send the message if it is empty.

How do you communicate to the hardware? Probably sending an empty message (string) over the protocol will not have any effect.

 

0 Kudos
Message 2 of 2
(2,017 Views)