Jump to content

LVRT: Holding down a button


Jeff Plotzke

Recommended Posts

I'm developing a UI for a LVRT system to be run on a remote front panel. I need to allow the user to use a button to open a valve in increments. Each time the user presses the button, the valve opens a set amount. However, I also need to allow the user to hold down the button and the valve will continously open at a certain rate until the button is released.

My problem is that it seems that LVRT doesn't support the two boolean mechanical actions that I need: Switch/Latch until released. The other four actions only allow the button to trigger once and doesn't support the user "holding it down."

Does anyone know of a way around this problem? Thanks!

Link to comment

For a host of reasons including a similar one, I run my front panel as a controller running on the Windows machine and it sends commands via TCP to a VI running on the RT target. This also happens to get rid of jitter induced by the front panel on the RT machine. It adds some complexity overall, but at least you'll be able to use an event loop as well as all the latching behaviours you want on the front panel -- and that cuts down on complexity!

I used a variation on an NI example, Simple TCP Messaging.

The other thing I can think of is to go in a loop whenever the button is clicked, and then monitor the mouse button until it gets released, sending the appropriate commands along the way (presumably between pauses). It would be an uglier solution, but probably quicker to implement!

Link to comment

QUOTE(Guillaume Lessard @ Feb 13 2007, 04:23 PM)

For a host of reasons including a similar one, I run my front panel as a controller running on the Windows machine and it sends commands via TCP to a VI running on the RT target. This also happens to get rid of jitter induced by the front panel on the RT machine. It adds some complexity overall, but at least you'll be able to use an event loop as well as all the latching behaviours you want on the front panel -- and that cuts down on complexity!

The other thing I can think of is to go in a loop whenever the button is clicked, and then monitor the mouse button until it gets released, sending the appropriate commands along the way (presumably between pauses). It would be an uglier solution, but probably quicker to implement!

Thanks, Guillaume. Running the UI on the Windows machine I think is the only solution to this problem. Monitoring for the mouse isn't possible with RT (and is probably why the two mechanical actions aren't supported). :(

Link to comment

QUOTE(Jeff Plotzke @ Feb 18 2007, 12:58 PM)

Thanks, Guillaume. Running the UI on the Windows machine I think is the only solution to this problem. Monitoring for the mouse isn't possible with RT (and is probably why the two mechanical actions aren't supported). :(

I expressed myself poorly; when I was originally trying to figure out what architecture to use, I tried repeatedly polling a local variable tied to a button. That (kind of) worked, but it was very ugly. I ditched that solution because it wasn't very scalable, and in any case the front panel added jitter to my app!

Link to comment

QUOTE(Guillaume Lessard @ Feb 20 2007, 03:34 PM)

I expressed myself poorly; when I was originally trying to figure out what architecture to use, I tried repeatedly polling a local variable tied to a button. That (kind of) worked, but it was very ugly. I ditched that solution because it wasn't very scalable, and in any case the front panel added jitter to my app!

Exactly... and in a perfect world, you wouldn't have any UIs down on your RT system to maximize efficiency and reduce jitter. What eventually solved this problem was replacing the Boolean button with a physical digital input -- This now allowed them to continously hold down a physical button as I poll the input and increment accordingly.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.