LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cant change the state

Hello everyone, this is my first question so i hope i am doing it right. 

 

I am busy with a project what is going pretty well but have a little trouble changing states.

So when the arduino is connected the boolean will give a light (this works) when the boolean is true it should change to the next state but my state indicator keeps in the "searcharduino" state even tough i did request to change to the next one.

So i have looked at other posts and alike questions and it seems the way i do it is just fine.

But as it is not doing the job i assume there is something wrong so i hope someone can give me that little push so that i can continue.

thank you already.

Manmade2labview_0-1715521791462.png

 

0 Kudos
Message 1 of 4
(189 Views)

It's impossible to debug pictures.  Post your VI, and save it back to LV 2020 or earlier.

What I can see of your code makes no sense.  You've got an event structure inside what I'm guessing you want to be a state machine, with the event structure preceding the case structure for the states.  I can't imagine how such a thing could ever work.

0 Kudos
Message 2 of 4
(176 Views)

I don't even attempt to analyze this picture because we cannot see most things (What is in the other event cases? How are the evens configured? What is the mechanical action of the boolean controls? What's in the other case structure case? What is the purpose of the disconnected delimiter control? Where are the terminals of the locals where do the wires come from/go to that are hidden under other structures? Why is there a 10ms wait if there is an event structure? etc. etc.).

 

After you attach your code, also describe exactly how you are operating it, in what order, and what you expect to see after each user interaction.

0 Kudos
Message 3 of 4
(137 Views)

@Manmade2labview wrote:

So when the arduino is connected the boolean will give a light (this works) when the boolean is true it should change to the next state but my state indicator keeps in the "searcharduino" state even tough i did request to change to the next one.


If you press start, the flow continuous to the case structure.

 

Next loop cycle, the event structure waits for an event, blocking execution.

 

It's hard to see when the State indicator is updated (as the wire goes behind structures), but it's probably after the event structure.

 

Why not put the content of the case in the event structure, or put the event structure in the case?

 

You can also add a time out case, so the event structure doesn't block execution.

 

Turn execution highlighting on to see how the event structure blocks execution.

 

And attach your code.

0 Kudos
Message 4 of 4
(86 Views)