LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I create a push button with switch until released function, using the latch when pressed or latch when released function?

Solved!
Go to solution

Good afternoon to everyone, i have a question, does someone think that is possible to create a push button with switch until released function, using the latch when pressed or latch when released function? I need a button with switch until released function but i can't use directly that function since I'm using a cRIO that doesn't support it. Could someone help me or give me any suggestions? 

Thank you in advance for the answer.

0 Kudos
Message 1 of 13
(1,208 Views)

You are talking about a behavior of a software button, but then mention hardware (cRIO). Is this a physical button connected to a digital input or a software button on the front panel of the User interface.

 

Assuming the UI runs on a PC that communicates with the headless cRIO code, I don't understand the questions. Can you describe the entire software architecture?

 

Of course any mechanical action (any!) can be emulated in software in the same way LabVIEW does it under the hood. Can you explain in a few more words what's running where, how the user interacts with the code, and what should happen in response?

0 Kudos
Message 2 of 13
(1,203 Views)

I have to create a button on the front panel (therefore software), this will then be connected via cRIO to a DO .

 

My doubt arises from the fact that by using one of the two mechanical actions mentioned above (latch when released or latch when pressed) labview detects only when I press the button or only when it is released.

 

I hope that this answer will help you understand the question.

0 Kudos
Message 3 of 13
(1,192 Views)

@Domodo wrote:

I hope that this answer will help you understand the question.


No, not clear!

 

LabVIEW does not "detect" anything, it is your LabVIEW code that does whatever needs to be done. Can you show us your code?

0 Kudos
Message 4 of 13
(1,178 Views)

Is the software and Front Panel running on the cRIO with a monitor connected ? 

 

0 Kudos
Message 5 of 13
(1,163 Views)

For now my code contain only a boolean control connected to a digital output. In the front panel the boolean control is a vertical toggle switch.

Since the code will be upload on the cRIO it isn't possible to use the mechanical action switch until released, so I asked if anyone thinks that this function is also replicable using the function latch when pressed or latch when released, and in positive case if someone can halp me to do that.

0 Kudos
Message 6 of 13
(1,159 Views)

Obviously both contained in a while loop.

0 Kudos
Message 7 of 13
(1,151 Views)

It will be like this in the future.

0 Kudos
Message 8 of 13
(1,150 Views)

@Domodo wrote:

For now my code contain only a boolean control connected to a digital output. In the front panel the boolean control is a vertical toggle switch.

Since the code will be upload on the cRIO it isn't possible to use the mechanical action switch until released, so I asked if anyone thinks that this function is also replicable using the function latch when pressed or latch when released, and in positive case if someone can halp me to do that.


A digital output will retain it's values until a different value is written to the output, so all you need is write the new value when it should change. The rest is in software.

0 Kudos
Message 9 of 13
(1,121 Views)

Exactly, do you know how to catch the moment when the user press or release the switch in the front panel or how to create a software that will do this?

0 Kudos
Message 10 of 13
(1,117 Views)