annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

Switching State with Boolean Button Press/Counter/Timing

Risolto!
Vai alla soluzione
Soluzione
Accettato da autore argomento tuyenhoang7

This seemed to work pretty well and is easy to modify for different timing/boolean states.

 

Use a producer/consumer-ish design but with a DVR instead of a Q. Consumer loop reads the DVR every 5 ms and updates the booleans as needed. Producer mostly just waits for the user to trigger, then we set lines 3 and 4 high, use the structure of the in place element to pass a wire through to a wait, then not lines 1 and 2.Capture.PNG

Messaggio 11 di 16
2.143Visualizzazioni

Wow, this looks great, though a little more involved than I had thought. Would you mind sharing this .vi with me, so I can play around with it?

 

Thank you

0 Kudos
Messaggio 12 di 16
2.112Visualizzazioni

Sorry I was busy at work all day. Here is the code LV2014

 

0 Kudos
Messaggio 13 di 16
2.094Visualizzazioni

Thank you so much for this, your code is great, and does what I described. I need to have state 3 and 4 ON a little later however, after state 1 (or state 2) is ON, instead of before. I attached a picture showing the change. On the left is what your code is doing. On the right, is what I need to change it to. I tried figuring it out myself, but I have a feeling that I have to change the order in which the inputs are going to, and I was not sure how to proceed.

 

Thank you, you have been very helpful.

0 Kudos
Messaggio 14 di 16
2.067Visualizzazioni

That's an easy fix, expand the index array terminal on the first in place element structure and NOT lines 0 and 1, then remove the NOTs from the second in place element structure.

Messaggio 15 di 16
2.054Visualizzazioni

Awesome man, that fixed it for me. Elegant solution, and easy to modify. I learned a lot from it also.

Thank you again! I marked it as a solution, plus kudos to you!

0 Kudos
Messaggio 16 di 16
2.043Visualizzazioni