LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hold button input through multiple events

Solved!
Go to solution

Thanks! You have been a HUGE help! I do have one last (hopefully) question. There is a state where I have three choices for the next state so I can't just use a select. Any thoughts on how to go about it? I was thinking of adding another state without a delay as a comparison state? but I'm not sure if that will over complicate things.

0 Kudos
Message 11 of 17
(1,171 Views)

You can use two selects in a row and run the output of one into the other, or you can have a case statement.

0 Kudos
Message 12 of 17
(1,165 Views)
Sorry I am currently on the bus, will look at it later.

You have made such a tremendous progress in a very short time, just given a few vague guidelines. Hats off! (Just compare your first and last attachment 🐵

I have no doubt you'll finish the project in time.:)

0 Kudos
Message 13 of 17
(1,152 Views)
Solution
Accepted by topic author scoobywrx

Another signifcant simplication would be to replace the lighs with radiobutton indicators containing three (or two resp.) LEDs. name the LEDs Red, Yellow & Green (or red & green for the pedenstrian lights) and color the LEDs accordingly. A diagram constant of them is a simple enum with the names of the controls as items, making the diagram much more self-documenting.

 

Back to the cases where several decisions need to be made at once, you need to make sure that they all execute. e.g. you don't want to skip the pedestrian lights if a left turn got triggered, or vice versa etc. Another option would be to always go through all states but set the wait to zero if one state can be skipped (e.g. if nobody pressed a button).

0 Kudos
Message 14 of 17
(1,138 Views)

Everything appears to be working except for one instance. If the NS Crosswalk buttons (v Cross or ^ Cross) are pressed while the yellow turn arrows are lit then the crosswalk doesn't get triggered. 

0 Kudos
Message 15 of 17
(1,127 Views)

IT'S ALIVE!!! 

 

I think it is finally working. Thank you so much for the help everyone! Thanks especially to Altenbach. The internet drinks are on me! 😉

 

I attached the working file for the curious...

0 Kudos
Message 16 of 17
(1,112 Views)

Cool. Just for reference, here's how it would look using radiobuttons. Arguably simpler. 😉

 

(I did not fix the logic according to your latest so that's still broken).

0 Kudos
Message 17 of 17
(1,095 Views)