Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

can i interface a third party hardware with labview using rs232c

Solved!
Go to solution
Are you referring to one of these? Well, you'd have to look at the documentation for the device. I haven't a clue as to what's required since I have no idea what instrument you have, nor do I have the documentation. Do you have the manual? Since you've said you've been able to use HyperTerminal to talk to the device, then you should try the Basic Serial Write and Read example that ships with LabVIEW. Make sure you set the serial port communication parameters correctly - specifically, if the device ends its responses with a termination character, like a linefeed or carriage return, be sure to set that on the front panel of that VI. You should also check to see if the device requires that commands terminate with some character, like a carriage return or linefeed.
0 Kudos
Message 11 of 17
(2,684 Views)
Ya i am using Kantronics 9612+ as the terminal node controllers.plz help me how to interface this device with the labview.I have to send ascii data to the tnc for packetizing and sending it to transceiver.also i need to receive data from the tnc(tnc will get data from transciever) and i have to save it on my pc. plz suggest some vi's.
0 Kudos
Message 12 of 17
(2,667 Views)
I already did suggest a VI: the "Basic Serial Write and Read" VI that ships with LabVIEW. As I noted, I don't have the manual for that instrument, so I have no idea what the communication protocol is. Do you have a link for the manual?
0 Kudos
Message 13 of 17
(2,663 Views)
i have attached the manual for kantronics kpc 9612+.can i used the example vi without any changes for my the data communication with the tnc?
0 Kudos
Message 14 of 17
(2,650 Views)

I certainly can't do a detailed analysis of that document, but based on a general look through it, you should be able to use the serial example VIs to start with. I would suggest using the "Advanced Serial Write and Read" VI since that allows you to set the termination character and the XON/XOFF setting. Apparently, this device uses XON/XOFF. It appears that the device will end its message to you with a linefeed, so the default value for the termination character in the "Advanced Serial Write and Read" should be OK since it's set to a linefeed. 

 

The example VI is just to get you started. Some of the commands that need to be sent are actually control codes. For example the command to get the unit in COMMAND mode is Ctrl-C. With a string control set to normal display on a VI's front panel there's no simple way to enter this. If you change the string control to hex display or "\" display mode then you can enter it directly. With the string set to hex display you'd simply enter 03. When set to "\" display mode you'd enter "\03". From what I read, Ctrl-C is just the default, which implies that you can change it, but you'd have to take a look at the rest of the commands to see which one allows you to change it. 

 

Post back if you need more help.

0 Kudos
Message 15 of 17
(2,642 Views)
Thanx for the rply....one last doubt ...how can i save the received data in my pc?
0 Kudos
Message 16 of 17
(2,604 Views)
Solution
Accepted by topic author electronics andcommunication

Well, you first need to decide what format you want. There are numerous ways to save it:

  • bare-bones text file -Write to Text File
  • spreadsheet-like file (text file that uses delimeters for columns and EOLs for rows) - Write to Spreadsheet File
  • XML - Write to XML File
  • binary - Write to Binary File
  • measurement file (fancy spreadsheet-like file with a bunch of header information)  - Write to Measurement File
  • datalog file
Message 17 of 17
(2,601 Views)