LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in simulating a Protocol

Solved!
Go to solution

Mark Yedinak,

 

Thanks for the valuable feedback.

 

Here I am attaching my actual protocol. The sequence of the states in my protocol is very important.

Also there are many inputs in the Operation state but as of now I just mentioned only one in the diagram. So I generalised inputs as INPUT 1,2,..N in my previous post.

 

In all my previous VIs even though EVERYTHING inside while loop is done, my VIs is not working properly from 2nd input(remote control) onwards as my VI exits even though there are no errors. I do know my logic is wrong but I am running out of it. My VI isnt able to stay in 2nd state (activation of remote control state) after successful completion of 1st state operation and eventually gets stopped.

 

My requirements is that the succeeding states should work if and only if preceding states is working successfully.

 

Hope this may convince you.

 

Regards,

Manoj

 

 

 

 

0 Kudos
Message 11 of 12
(377 Views)

Manoj,

 

You have cleaned up your description of your protocol.

 

The next step is to define the states for your system. The states of your state machine are not the same as the boxes down the left side.  Let's call those boxes "Modes." In Initialisation Mode you may have states: Init Idle - waits for the Start command, Init advance - sets flag indicating that Start has been received, Response - sends ds, Change Mode - switches to next mode to await the next command.  After you define the states, then describe the conditions under which the system can change from one state to another.  This is called a state transitions table.  Some states may be used many times while others are only used once. Wait states or the Response state may be used in most modes. Also consider errors or rare cases.  What happens if an invalid command is received? What happens if the communications is disrupted and no signal is received? The transition table or the state chart (showing graphically both states and transitions) will show that the transition to the succeeding mode is only enabled when the preceding mode has completed successfully. The state chart must define all of these situations.

 

When you have a good state chart, then it is quite straightoforward to develop the LV code to implement it.

 

Lynn

0 Kudos
Message 12 of 12
(365 Views)