Jeff Plotzke Posted February 14, 2007 Report Share Posted February 14, 2007 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! Quote Link to comment
Guillaume Lessard Posted February 14, 2007 Report Share Posted February 14, 2007 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! Quote Link to comment
Jeff Plotzke Posted February 19, 2007 Author Report Share Posted February 19, 2007 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). Quote Link to comment
Guillaume Lessard Posted February 21, 2007 Report Share Posted February 21, 2007 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! Quote Link to comment
Jeff Plotzke Posted February 21, 2007 Author Report Share Posted February 21, 2007 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. Quote Link to comment
eaolson Posted February 21, 2007 Report Share Posted February 21, 2007 QUOTE(Jeff Plotzke @ Feb 18 2007, 01: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). Ah, but it is! You can't directly interface with the mouse, but you can read mouse input sitting on a serial port. I wrote the http://forums.lavag.org/downloads.html&showfile=73#' target="_blank">Serial Mouse Driver in the CR because I needed to get that very sort of user input under RT. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.