The basic design of Murmex is demonstrated here. The basic design is upgraded from the minimal design from the previous tutorial. The advantage of this one is that you can stop the program, configure it easily and update your own settings.

Basic design
  1. Add to the front panel a Boolean indicator (can be hidden from view), called “terminate?”.
  2. Make a property node for the boolean indicator “terminate?” and wire it to the boolean of the message handler loop and use the Val (Sgnl) method.
  3. Add above the message handler loop an event handler loop.
  4. Add an event case for the “terminate?” and stop the event handler loop when value changes. Basic design terminate
  5. Rename the class data output to “component” and make a local variable to which you write to after the Handle message method.
  6. Add to the front panel a boolean control “Quit” and add an event to the event handler.
  7. Add a local variable of the class to read from (see step 5) and use the methods “Get ID.vi” and “Send.vi”. The latter method will send a message to the given recipient, which is in our case ourself.
  8. Add the TerminateMessage as input for the Send method. You can get this method from the Murmex library in your Project Explorer. Send terminate message
  9. Add to the front panel a boolean indicator “Send”.
  10. Add an event case to the event structure to respond to the value change of the Send button.
  11. Drag and drop from the Message.lvclass class file in the Murmex library the method “Create from command.vi” and create the controls for the inputs.
  12. Add as in Step 7 the local variable of the class, the method Get ID and the method Send and wire them properly. Complete basic design
  13. On the front panel, give the control “id” a proper name.
  14. Start the program
The program can now respond to the quit button and will send a TerminateMessage to itself. Also you can now use other commands in order to go from one state to the other state. At the moment it will not do anything special yet, but that will come.