From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

A VI that is like HyperTerminal (as easy to use)...

I've been searching through this site and what i would like to know is a simple step-by-step process to send a command to the com port 1 on my pc )local connection. in hyperterminal, i don't even have to set anything, it defaults to 9600-n-1. i hit connect and then i type a command and hit enter, and the device spits back a response or performs the function i sent. is there no quick way to set that up in labview?

i know i'm failing to set up this VISA interface correctly, but it seems like there are a bunch of different VIs for applying settings. i must've tried suggestions from 10 different postings and used every different VI example in labview. HELP!!
0 Kudos
Message 1 of 4
(3,246 Views)
You VI should have a VISA Configure Serial Port, a VISA Write, a VISA Bytes at Serial Port, and A VISA Read. I think most of the examples show this. You could also put a small delay between your Write and Bytes at Serial Port. Configure Serial defaults to 9600-n-1 so you shouldn't have to do anything there. The most common mistake I see is that people forget to send a termination character with their write data. When you hit the enter key in hyperterminal, the program appends a CR/LF to the end of the text. You have to do the same thing in your program. Turn on \ Codes for your string control and enter the control characters there, or use concantante strings to add the constans you'll find on the string palette. If you still have problems, go ahead and post the actual code you've written.
0 Kudos
Message 2 of 4
(3,238 Views)
The Instrument I/O Assistant available in LabVIEW 7.0 and above should help simplify things. This tool will allow you to prototype and test different options quickly without having to program. If you are trying to connect to an instrumetn, you should see if there is an instrument driver available on the Instrument Driver Network (ni.com/idnet). The instrument driver will take care of all of the underlying command specifics.
0 Kudos
Message 3 of 4
(3,227 Views)
Hello
Actually, there is a vi much like hyperterminal,
See Lvterm.vi in this link: http://www.daqman.com/example.html
As Dennis stated, don´t forget to send a cr/lf when you hit return.

Hope it helps
Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 4 of 4
(3,209 Views)