Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

start read at start bit visa

Solved!
Go to solution

Hi!

 

I'm trying to make a program thet reads data thet a GPS is writing to a serial port, and then store this in a file. As a extra thing I'm trying to add a part thet finds the correct serial port that the GPS is connected to and then automaticly uses this port to start a visa sesion. I trye to do this by first finding all connected ports, and then try to read the buffer out of them. in the buffer that has been read I then serch for a patern that starts every string sent by the GPS. But sometimes my read starts in the midle of a string, and hence the patern I'm looking for is not there, and no port is set to be the right one.. so is there a way to wait with the read untill some thing is sent by the GPS..

 

Every string the GPS sends is started by $ and ended bu \r\n

0 Kudos
Message 1 of 2
(3,185 Views)
Solution
Accepted by topic author sunds
I solved it....sometimes you are so stuck in your toughts that you do not se the simpel solution....
0 Kudos
Message 2 of 2
(3,168 Views)