LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

state machine vi executes only one out of multiple events

This only happens of there is no data in the graph. Once the 1D array control contains data, the error no longer occurs.

 

To fix:

 

  • Add some data to the graph (e.g. make it into an indicator and feed it simulated data).
  • Add some error handling so a "no data" situation is handled more gracefully.
Message Edited by altenbach on 05-13-2009 09:05 AM
0 Kudos
Message 11 of 21
(1,140 Views)

Hi Altenbach,

 

Thanks for your input earlier. I ran into another problem. I'm trying to complete an application vi in labview basics II tutorial. The VI has a menu with a set of commands where each command calls a VI embedded in a case within the case structure of a state machine architecture. The problem is that the VI does not execute when any of the commands is called. It doesn't even execute the default case is supposed to be automatic. There was no error message. I have completed cases 1 and 2 (added the sub VIs) in addtion to the default case. When I click the run button the vi runs but when any of the commands on the menu is clicked nothing happens. Can you take a look. I've attached the code.  Please I'll appreciate the assistance as always.

 

Thanks 

0 Kudos
Message 12 of 21
(1,116 Views)

It seems to work just fine here (or course I don't have the subVIs, so I simply placed popups in all events).

 

If the subVIs are supposed to show, make sure they are configured to show their FP when called, else you would not see much. 😉

 

You might want to initialize the shift register with a diagram constant instead of a hidden empty control. You also might want to stick to an enum to control the case structure, right now it's coerced to a plain number.

0 Kudos
Message 13 of 21
(1,111 Views)
Hi,
I'm having difficulty plugging a sub vi into this state machine application. I'm trying to add a login functionality to the application and I just can't get it work.  First I built the Verify info vi, then the Login vi. I then used the verify info vi as a subvi inside the login vi. When I tried plugging the login vi into the State machine application i couldn't figure out how to create an output for the boolean "Access granted"
I've attached the VIs and a picture of the state machine block diagram. I appreciate the assistance.
Thanks
0 Kudos
Message 14 of 21
(1,052 Views)

 

It seems the VIs didn't come through. I've attached them again

0 Kudos
Message 15 of 21
(1,049 Views)
0 Kudos
Message 16 of 21
(1,046 Views)

You need to connect the Access Granted Indicator to the connector panel of the subVI.

 

Go to front panel of subVI.  Right click on icon at upper right and select "Show Connector".  Click on one of the white squares on the right hand side (since you want it to be an output, you want the data to flow out the right side of the subVI),.  Click the indicator for Access Granted.  Save VI.

 

This is a basic LabVIEW skill.  I would recommend you learn more about LabVIEW from here. How to Learn LV

0 Kudos
Message 17 of 21
(1,042 Views)

Well, you probably need to connect the relevant controls and indicators to the connector pane. Currently, login.vi has no connectors.

 

(You have a lot of overly complicated and unecessary code. For example, in "verify information" you don't need to check both subarrays for lenght. SInce they originate from the same array, the are necessaily the same size. A better idea would be to autoindex on the 2D array and then index the two elements to be verified inside the loop. it would be even easier to make an array out of username& password and do the array comparison inside the loop. )

Message Edited by altenbach on 05-29-2009 08:15 AM
0 Kudos
Message 18 of 21
(1,037 Views)

Ravens Fan,

 

The reason why I posted this was because I tried what you just stated before posting this problem here. Perhaps you should try it and see. The string Operator woked just fine when connected on the connector pane but the boolean output of the Login vi wasn't working. I connected the front pannel controls that I thought were relevant on the output side of the connector pane but only string operator was indicated as the output while the boolean wasn't.  I don't know why. 

0 Kudos
Message 19 of 21
(1,019 Views)

It works just fine for me.

 

Post your latest version of your VI's where you have made the connections between the indicators and the connector panel.

0 Kudos
Message 20 of 21
(1,016 Views)