LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement State Machine

Hi, Partha!

I converted VIs for LV 7.1 but I got 2 warnings:
1st for FormatTime String.vi
2nd for subElapsedTime.vi
"Cannot save VI from VI.lib to previous version."

As to the quality of my VIs, they're far from perfection.

Now I'm working on following things:
1) I think, it's better to use shift registers in some cases instead of local variables, e.g. for the state. To do this I wrapped my state machine with the one-iteration while loop.
2) I'm not sure I'll leave "elapsed time" in my state machine, I think I replace it to the input with the current time, and add time control inside my states by ordinary means (like comparison, etc).
3) The program that uses my pump should be divided into 2 parts: interface one and control, as interface can be updated more sparingly.

Some notes:
1) I migrated to LV from assembler (and C) where I used cooperative multitasking, and my state machines are a little different from that I've seen here on forum. For example, I don't know how I can use state machine that contains the while loop it never leaves (only when stopped). I understand that to send events to such machine I have to use queues, but it seems to me that wire-technology is more understandable, besides queues require converting all signals into some format. At least this is my current understanding.
2) My future system is the vacuum system with about 30 different objects like pump, valve, shutter, plus it contains 2 heaters and needs block (check operations?) -features and so on.

Best wishes,
Rashid.

Using LV 8.0 under WinXP.
0 Kudos
Message 11 of 11
(1,276 Views)