Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

touchscreen serial

Hi all,

 

I'm trying to get a touchscreen to communicate with a National Instruments myRIO. I'm trying to get the myRIO to read the touchscreen and display the coordinates on screen. I was using a 4 wire touch screen and I was able to get come coordinates but II've since switched to a 5 wire touchscreen and now nothing shows up. Can anyone give me any tips on how to get this to work? I've attached the program I've been using for reference.

 

Thank you kindly,

 

James

0 Kudos
Message 1 of 4
(3,584 Views)

Hello James,

 

Could you specify the models of these touchscreens, and how they are being wired to the myRIO?

 

This code looks like a relatively barebones Serial Read implementation, so most of the troubleshooting is probably going to be on the side of the touchscreen. Ensuring that the wiring is correct, the serial port is properly configured, and that the VISA Read command is sending in a way that the touchscreen understands/expects would be the place to start. Ideally, you can search for a driver for your touchscreen models on IDNet (https://www.ni.com/devzone/idnet/idnet.htm). 

 

For the purposes of troubleshooting, temporarily hooking up the touchscreen to a computer rather than the myRIO would allow you to run VISA Test Panels on it, and confirm things like port configuration and command compliance. 

 

For more thorough follow up with a dedicated engineer, please feel free to open a service request with us if possible. However, I am not sure to what extent our resources would be appropriate in helping to configure a third-party touchscreen, unless we can find a driver on IDNet that is NI Certified/Supported.

 

Best,

Daniel

0 Kudos
Message 2 of 4
(3,552 Views)

Hey, thank you for your help.

 

We have an ELO Accutouch Resistive Touchscreen as well as the accompanying c2216 serial/USB controller.

 

http://www.elotouch.com/Products/Touchscreens/AccuTouch/

 

http://www.elotouch.com/Products/Touchscreens/AccuTouch/c2216c.asp

 

From the controller we have an RS232 to TTL converter.

 

http://media.nkcelectronics.com/datasheet/rs232ttlv7_UG.pdf

 

And from the converter we have the Diligent Motor Adaptor and the myRIO.


http://www.ni.com/pdf/manuals/376047a.pdf

 

I can get some data to appear on the screen using the code I gave previously. It appears to be hexidecimal but it has some other messy parts added to it.

 

 

0 Kudos
Message 3 of 4
(3,550 Views)

James,

 

Based on the simplicity of the LabVIEW code, and the fact that it was working in the previous configuration, my guess is that the problem is coming from one or more of the third-party products. For troubleshooting purposes, you'll want to find a way to track the signal as it goes through this chain of converters: abstract out the myRIO and the Motor Adapter and see if you can communicate directly with the touchscreen via USB so you can confirm exactly what types of data is passing. Then add one piece of the puzzle at a time until you're absolutely sure what data type is being finally passed into the myRIO. Were you able to try the touchscreen with a VISA Test Panel to confirm that the commands you are passing are still being meaningfully interpreted by the new touchscreen? Unfortunately, if there is some weird conversion happening in the chain pre-myRIO, we would not be equipped to exhaustively explain that, and I would recommend reaching out to the manufacturers of those products.

 

Could you specify what you mean by "some data" and "some other messy parts added?" It might be that since you switched devices, the data is coming into your myRIO in a slightly different format. Potentially just configuring the indicator in LabVIEW for the right data type may be sufficient to clean it up. Here is a document on how you can adjust display format for numeric indicators: http://zone.ni.com/reference/en-XX/help/371361J-01/lvhowto/changing_format_and_prec/.

 

Best, 

 

Daniel

 

0 Kudos
Message 4 of 4
(3,517 Views)