Through my employer, I have had the amazing opportunity to attend NIWeek! The keynote today was great, lots of new hardware and demos for them.

I also attended my first technical session, State Machine vs. State Machine, a very interesting talk about two LabVIEW software architectures. For what they're worth, here are my notes for that talk:

State Machine vs. State Machine

JKI, NI, and G Team

Why?

  • Explain details behind great tools
  • Engage in hearty banter over the best way to architect big applications
  • Save time
  • Team dev
  • Spend time designing app not framework
  • Minimize Risk

JKI State Machine

  • A fundamental structure - Low level structure template
  • Easy understood by the novice
  • Easy to scale and extend - uses events and queues
  • Not complicated, requiring minimal dependencies

Demo

Big hunk of code, has idle case, initialize case, etc. Uses line separated string for states. Uses event structure to handle front panel events and adds state lines to string queue. Event structure in idle case. Ability to add states without editing state machine. Has local data, has "state fulness". Data in cluster defined in initialize. So two wires, one for states and one for local data. String arguments passed with state, data is based to states.

Other information

  • Leverages one communication method: User events.
  • Easily add components which can send messages
  • Easily adding listeners to those components
  • Get info out: Public events, other component register for events, easy to implement one-to-many architecture

Top Level Baseline Framework (TLB)

  • Leverages over five years of modular design
  • Intended as a top level VI
  • Suitable for single to moderately complex UIs
  • Easy to build into EXE
  • Easy to navigate with the assistance of limited color on the block diagram

Modularity important

Demo

  • Uses "creator" VI to create Baseline
  • Large screen size, uses color
  • uses producer-consumer loops, event loop producer
  • Has modules to run at start
  • Most of logic code fits on one screen
  • Starts by initializes queue (queue hidden by VIs)
  • All user data in cluster in shift register in typedef
  • All data available to all other states
  • User data updated at once using "Value Updated" event for all controls

TLB LabVIEW Exports

  • Event driven command response messaging design pattern
  • Designed in LVOOP
  • Contains both input and response messages
  • Dynamic events using objects
  • Created hooks to outside world using VI Server
  • Command and response are objects

Hopefully I'll be able to post more notes from the other technical sessions I'm attending. Thanks for reading!