LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to write serial port data with TPC-2006 touch panel?

Using Serial Port Init.vi, Serial Port Write.vi, and Close Serial Driver.vi in that order, I have tried unsucessfully to transmit data at 9600 baud out each of the three serial ports.

An oscilloscope on the Tx line that shows good data when transmitting from my PC shows nothing when my VI calls Serial Port Write.vi to write a string 1,000 times. I tried switching to the Rx line in case of the Null Modem cable problem, no luck. This serial port is not transmitting.

Before this, I tried the same things with VISA functions, no help. The documentation is pretty sparse.

How can I make it work?

sd
0 Kudos
Message 1 of 5
(2,986 Views)
You mention that the o'scope shows data when transmitting. What are you using in that case, "Hyperterminal"?  If you have NI's Measurement and Automation Explorer (MAX) installed on your computer (which I would guess you do if LabVIEW is on there), you can use it to see what ports it, and LabVIEW can see. You can then use MAX to test that port. The first thing I would guess would be a misidentified comm port designation. If you use VISA it would be ID'd differently than the straight "open port, etc.".

What version of LabVIEW are you using?


Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 5
(2,976 Views)
Thanks for replying to my post.
The issue is about transmitting data from the TPC-2006, not from the PC.
I was using the PC to test my cable and to confirm that I would see data on the o-scope when data was there.
(Incidentally, I prefer Advanced Serial Port Monitor to Hyper Terminal.because ASPM handles binary data, and HT doesn't.)

When I moved the cable to the TPC-2006 and tried to programatically transmit data from the TPC-2006, nothing appeared on the scope.

We just found the answer.

What we think of as COM1, what is labeled "COM1" on the back of the TPC-2006, is "Port 0" to the software, not "Port 1."

By the way, the connector on the TPC behaves the same as a PC. so if you have to use a null-modem cable to connect your gadget to a PC, then you also have to use a null-modem cable to connect to the TPC.

We are opening and closing the serial port before and after each and every transaction. There is no perceptible cost, and this frees up the port for diagnostics. (We wish all apps would work that way.)

s
0 Kudos
Message 3 of 5
(2,966 Views)
Thats what I was refering to as misidentified port. That nomenclature, which one would think would have settled down by now, with serial having been around a very long time, still can trip us up. Of course, if you were around when the PC first hit, there was a lot of out cry over the connector that IBM chose to use, male rather than what was more standard on other computers, which was female.


Good Luck.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 4 of 5
(2,961 Views)
While looking into this we used the VISA Find Resource VI to see what the actual names of the ports the TPC were.  I put this information in a new KnowledgeBase entry: VISA Resource Name for the TPC-2006
Doug M
Applications Engineer
National Instruments
For those unfamiliar with NBC's The Office, my icon is NOT a picture of me 🙂
Message 5 of 5
(2,947 Views)