Showing results for 
Search instead for 
Did you mean: 

serial port control

Go to solution

The termination character is enabled and is set to the new line or linefeed character.  So if you get ASCII 10 code (x0A), the VISA read will terminate with that.


If you are expecting more data, you will either need to do the VISA read in a loop until you get all your data, or disable the termination character.  Either way,  you'll need to come up with a method to determine when to stop reading in a loop (perhaps due to a timeout) or determine how many bytes you are supposed to read.

0 Kudos
Message 11 of 15

Well that worked better


I can see more of the menu now, but when I turn off the termnation character I get a timeout error


What I need is for the program to stop when it sees the word "finished"

I think I would need to change the termination character to a string

Is that correct?

0 Kudos
Message 12 of 15

I do not think it will accept more than a single character.  What you may need to do is to read all the data available and concatenate the data in a string passed from one iteration to the next via a shift register.  Then using Match Pattern or other string search functions and regexes, search the data string for "finished" and split the string at that point.



0 Kudos
Message 13 of 15

Hi Dennis,


I just found this post and think you might be able to help me with a solution I need. I have an engineer who wants to control a variable voltage input to his device. 


He wants me to:

Control the voltage output of (any port) from a PC running LabVIEW. The easy solution would be to get a DAC card but he wants something quick and easy. He was even talking about using the audio output. He can convert the signal once he has it.

So the output can be any variable DC voltage signal.  


Do you have a suggestion for a port on a PC that would be good for control of a signal and ground pin for a variable DC voltage?


If this does not make sense let me know and I will try to clarify. 

John Hess
Certified LabVIEW Associate Developer
0 Kudos
Message 14 of 15

Some (most?) audio outputs are AC coupled.  So you will not be able to get a DC signal out of one.  I would probably look at an Arduino or RaspberryPI that you can control a DAC on and communicate with that board over RS-232 or Ethernet.

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 15 of 15