10-16-2005 02:44 PM
10-17-2005 12:49 AM
Hi Dave
I'm not sure about what you want to do. But I try do explain you the state-machine a little-bit.
As you might have seen in the examples, a state-machine consists of three components which are while-loop, case-structure and a let's call it state-control. The while-loop ensures, that the state-machine is executed and the new state is passed to the case-structure. So to control the case-structure, you need to insert a shift-register. The type of state-control is free - you can use numbers, strings or other suitable types. I usually use enums, which are created as strict type def. custom controls, so I can insert states at the end of it. All usages of the control are updated automatically and I can use "speaking" state name.
So to start with the state-machine, place a while-loop on the diagramm and place a case-structure inside this loop. Add a shift-register to the loop. Create at least to states in the case-structure (init and exit) and wire the value for the init-case to the shift-register (so if you start the state-machine, it first executes the init-case). From the exit-case, wire a boolean constant to the while-loops condition-terminal, so that the loop stops executing after the exit-case.
So if you tried to make a state-machine using a boolean, you might have missed something. Just have a look at the examples again.
Hope this helps.
Thomas
10-17-2005 01:05 AM
10-17-2005 01:28 AM - edited 10-17-2005 01:28 AM
Hi Dave,
Like Becktho said, I am not sure if I follow you.
It sounds like you are trying to get the condition of some logic signal at one time and then need to know that result latter. If that is the case the following images of how I have have handled this in the past may help.
In my case I had to auto-scale an instrument and while adjusting the range and drive, I needed to track if any of the settings changed in order to re-check the others. This is illustrated in the state diagram below.
Message Edited by Ben on 10-17-2005 01:29 AM
10-17-2005 09:31 AM
Hi Paul,
Thanks for your suggestions, but I am not sure I follow what you mean by putting itinto a sequence. You have to bear with me I don't have a lot of Labview experience. Here is a copy of the flow chart that I am going by.
Thanks
Dave