LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

State machine inside event structure- doesnt proceed to the next Event case

Hello,

 

Since programming with Event structure buried inside a while loop with case strcuture may cause front panel locking problem, I am trying to design a new program where Event structure is Top Level and Case structure for State machine comes inside it. 

 

I face a problem where the data flow from the Event structure to the Case structure fails. It doesnt proceed to the next Event case. Could some one guide me through what the problem miught be.

 

State1 1 -> TimeOut structure

 

State 2 - Check for value change in Input cluster and Execute other stuffs

 


Abhilash S Nair

Research Assistant @ Photonic Devices and Systems lab

[ LabView professional Development System - Version 11.0 - 32-bit ]

LabView Gear:
1. NI PXI-7951R & NI 5761
2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021

OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
MEMORY - [ 16.0 GB RAM ]
GPU - [ NVIDIA GeForce GT 530 ]
0 Kudos
Message 1 of 4
(3,017 Views)

run vi analizer check for overlapping tunnels defaulted to default if unwired


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 4
(3,009 Views)

Didn't you say you solved your problem back in your original thread.  Why did you start a new thread?  Please continue in the original thread.

 

You still have your event structure set to lock the front panel.  

 

You should turn on Highlight Execution and watch how the dataflows in your program so you can understand why things are getting stuck.

 

I don't understand why you do a VISA Close after every VISA Write.

 

It seems like your outer most while loop stops based on the values of your inner most state machine, and has nothing to do with your actual stop button.  It looks like it will cause the VI to stop once your inner most state machine has executed some given amount of times.

 

Again, use your debugging tools such as highlight execution and probes to understand how your VI is actually working.

 

And take the suggestions in the other thread to flatten this VI out.  Don't try to complicate things with a state machine inside of a state machine.

0 Kudos
Message 3 of 4
(3,006 Views)

That was a different case where event structure was inside the case, this is reverse. I dint know  we can continue in that. How does one delete a thread ?

 

 

Abhilash S Nair

Research Assistant @ Photonic Devices and Systems lab

[ LabView professional Development System - Version 11.0 - 32-bit ]

LabView Gear:
1. NI PXI-7951R & NI 5761
2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021

OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
MEMORY - [ 16.0 GB RAM ]
GPU - [ NVIDIA GeForce GT 530 ]
0 Kudos
Message 4 of 4
(2,992 Views)