LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tHow to use touch screen as "remote" device on PXI system

I may have been too clever (and not thought the problem through thoroughly) (wow -- I have three "ough" words in that previous parenthesis, quite by accident ...).  We're developing a "motor skills" test that involves pushing lighted buttons on a panel (sort of a digital "whack-a-mole").  We're running LabVIEW using a PXI system for remote acquisition and control, and are using its digital output to turn on and off the various lights on the panel, and using the digital inputs to register when the subject "pushes the button".

Such a system requires a "hardware" panel of lighted buttons, which means we have to "design in" the placement of the buttons and have some limitations on their shapes and sizes.  It occurred to me that if we substituted a Touch Screen panel, we could place buttons, of arbitrary size and color, in arbitrary (and random!) positions, making them appear and disappear at will (or, alternatively, always be present and go light and dark at will).  I coded up a little demo program that did just this (before looking into buying a touch screen) -- it was a simple VI that merely put buttons at random positions on the front panel and timed how long it took the user to press them (and turn them off, which also made them disappear).

What I failed to think about is how to get such a piece of code to run "remotely".  I do NOT want to make a "front-panel" substitute to control a stand-alone LabVIEW application.  Rather, I want to make a "remote display" and "remote mouse" that (ideally) attach to my existing PXI system and run semi-independently of the host application.  The host will have its own front panel that is concerned with running the study, including such details as deciding on the nature of the test (are we using a fixed array of buttons, asking the subject to push the center one until a peripheral one lights, then to push it?  or push the center one, notice the peripheral one (but don't push it yet), have the peripheral one go out, wait for a "GO" light to light, then push the "remembered" button?), organizing the data (timing of button pushes), and perhaps "shaping" the experiment (make the task harder or easier depending on how the subject is doing).

Oops -- my original "demo" code was clearly a "Modify My Front Panel" code on a stand-alone system, but what I really need is a "Make a Remote Display and Mouse" for a PXI controller (we already have the PXI, and would like to be able to use our existing hardware).  Is there a way to do this?  From what I've (lately) been reading, we might need a third system running something like Windows (Windows CE?) to be the "smart peripheral" that runs the touch-screen VI, with communication with the host being done using Shared Variables (with which I'm familiar), leaving the PXI "headless", but devoted to the data acquisition and control that does NOT involve the touchscreen.

So there are really two questions here.  (1) Is it possible to put a remote display/mouse on a PXI system that is currently part of a RealTime LabVIEW package?  [Sorry, I forgot to mention RealTime].  (2) If this is not possible, what is a recommended system for adding the remote display/mouse touchscreen?  Note that we are thinking of purchasing a stand-alone touchscreen monitor, both to get an adequate size (we're thinking about a 19" monitor) and reasonable costs (working with limited grant funds).

Thanks for your help.

Bob Schor
0 Kudos
Message 1 of 5
(3,160 Views)
 

Hi Bob,

It sounds like you have a pretty fun application going on!  If I am understanding your application correctly, I think the best solution would be to use your existing real time PXI system, with a touchpanel AND another development machine.  You will need the Touchpanel Module to run VIs on the touchpanel (running Windows CE).  On the development machine, you can create your applications and then deploy them to the PXI RT target and the Touchpanel target.  The RT system can host the shared variables that the Touchpanel reads from and writes to.  Effectively, you would have a program running on the RT system and another program running on the Touchpanel, and these two program would communicate using Shared Variables.  The development machine would be necessary to deploy the shared variables and your programs.

However, I realize that this does not really accomplish a "remote display" of the PXI system.  Since LVRT is designed to run in real time, there is no front panel that runs on the RT system.  This allows the controller to dedicate its processor to the things that need to happen in real time.  Consequently, the nature of real time systems requires the use of a separate program on a different system to create any sort of remote display.  Tools such as shared variables can then be used to communicate between the two.

The consequence of this architecture is that since shared variables use TCP communication, the response from the user on the front panel will not be in real time.  Again, this is the natural result of a real time system designed not to have a front panel (which would prevent the system from operating in real time).  With that in mind, it may be better to just get a touch screen monitor and attach it to your development computer.  You can still host the shared variables on the real time system, but then use the development computer to run the VI for the touch screen.  The biggest benefit of using a separate touchpanel instead of the development machine would be that after you deploy the programs, it would free up the development machine for other operations.

I hope this helps!  It sounds like you have quite a project ahead of you.


 
Eric C.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(3,145 Views)
Hi.. can I have a look at some the codes for this program pls? thanks
0 Kudos
Message 3 of 5
(3,011 Views)

Hello,

 

Are you looking for example code? For what kind of appliaction? We have many examples you can search on www.ni.com or in LabVIEW go to Help >> Find Examples.

 

Regards,

 

Anna K.

National Instruments
0 Kudos
Message 4 of 5
(2,994 Views)
Hi, I am currently doing a project which is quite similar to Bob's and I was wondering if I could have a look at his codes.
0 Kudos
Message 5 of 5
(2,979 Views)