LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does my button act strange?

Hello all,

I wrote a VI with a case sturcture. if a button gives a true value then go to case "true" state, if it gives a false value then go to case "false" state. 

Now for the properties of the button i used "switch when pressed", so the value of the button should only change when i press the button. But the button switches off automaticaly ... how? and how can i solve it?

See attachment for the VI

0 Kudos
Message 1 of 6
(3,293 Views)

Hi sadiek,

 

But the button switches off automaticaly ... how?

Well, did you debug your VI? You should see how (and when) it switches off…

 

and how can i solve it?

Remove local variables as much as possible. One of them is responsible for switching the button off!

 

Hints:

- Replace the sequence by a statemachine. (This way you also don't need all those locals inside!)

- Don't use the same label for several indicators! You wouldn't do this in text-based programming…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(3,285 Views)

I can't open your VI because I cant find RSCOM.dll 

0 Kudos
Message 3 of 6
(3,226 Views)

Hi Muri,

 

you can open the VI: all you need to do is to cancel the search dialog!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(3,221 Views)

Thank you, it worked. Altough i have another problem now. But im going to try and fix it myself first 🙂

0 Kudos
Message 5 of 6
(3,194 Views)

I wanted to actually run it so I could debug it step by step rather than just looking at it haha.

 

But thanks for the reply (: I did initially cancel it but thought it would be easier to debug for myself if it was running (:

0 Kudos
Message 6 of 6
(3,185 Views)