VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Add a USB joystick

Solved!
Go to solution

Hi, I'm a Veristand 2011 SP1 user and I'm working on a project thar runs on PXI. I need to control some channels using an USB joystick connected to the localhost. To do that I created a custom device using the Easy Custom Device Tool and the joystick acquisition blocks of LabView. In VeriStand I created two targets: the first, running on localhost read the joystick inputs, the second, running on pharlap, performs the calculations. My problem is that the only way I found to link the two targets is to add a Reflective Memory Network. Since i don't need synchronization and don't have the Reflective memory modules, there's an alternative way to link the two targets? Even better, there's a way to control directly the pharlap target with the usb joystick connected to the windows pc?

 

Thanks

Francesco

0 Kudos
Message 1 of 4
(6,253 Views)
Solution
Accepted by topic author Macherobaè

If you are already running a Labview program to read in the USB joystick control, you should be able to use the Veristand API in Labview to write the joystick values (doubles) to your model input channel in Veristand. This is done over the ethernet connection.   Use the Veristand Labview API to open a workspace ref, then do a write to a channel or multiply veristand channels.  You will have to know the exact path of your veristand channel.  Hope this helps.

Message 2 of 4
(6,250 Views)

Thanks for your answer! Tomorrow will try your solution, I'm still interested in knowing if ther's a way to link together two targets without the use of reflective memory network.

0 Kudos
Message 3 of 4
(6,244 Views)

Thanks joshe, your solution works! I created another simple custom device following your instruction, it read a list of user channels in target 1 and writes the values in target 2.

0 Kudos
Message 4 of 4
(6,229 Views)