LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error handler for event based messaging framework

I've been very interested in using the event based messaging framework (described here http://forums.ni.com/t5/LabVIEW/Community-Nugget-2009-03-13-An-Event-based-messageing-framework/td-p...) for my next large application.

 

My main concern is the fact that it seems like typos would be very difficult to debug since you need to ignore unknown commands to make this system work.

 

To solve this problem I've been considering the idea of having a single message error handler VI which will store all valid commands and check all sent commands to see if they are valid.  Each VI would send out a register message on startup with their name and all messages they can send and receive.  The message error handler would store these and then check all future messages to be sure it is a valid message, throwing an error if it is not.

 

My basic problem is this: for this to work the message error handler VI would have to be started before any messages are sent so that it can capture all the register events.  If this is a VI that will be continuously running the entire application how can I ensure it starts first since I cannot wait for it to complete? (I.e. the usual method of running an error out wire or using a sequence structure will not work since everything will then wait for it to complete which will not happen until the program is ready to shut down)

 

I'm assuming the answer might be to use an asynchronous call but I'm not very familiar with this method.  

 

Any help is appreciated.  Thanks. 

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

Could you just use the error handler as a subVI inside a case structure that is only called when you have new message to be checked? I'm not sure I understood the exact functionality you are looking for, so sorry if this does not apply.

Zach P.

Staff Software Engineer | LabVIEW R&D | National Instruments
0 Kudos
Message 2 of 2
(2,326 Views)