06-08-2023 08:20 AM
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.
Solved! Go to Solution.
06-08-2023 08:28 AM - edited 06-08-2023 08:29 AM
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?
06-08-2023 08:41 AM
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.
06-08-2023 08:55 AM
@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?
06-08-2023 09:06 AM
Is the software and Front Panel running on the cRIO with a monitor connected ?
06-08-2023 09:15 AM
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.
06-08-2023 09:27 AM
Obviously both contained in a while loop.
06-08-2023 09:29 AM
It will be like this in the future.
06-08-2023 09:47 AM
@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.
06-08-2023 09:53 AM
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?