Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Configuring termination character for Instrument I/O assistant

Solved!
Go to solution

Hello,

I am configuring an instrument using "Instrument I/O assistant" to read and parse incomming data, but the data coming out of it utilizes a "/n" termination character twice, I want to terminate on the second instance of it.

 

1) If I set the termination character to "none" I can see all of the data (termination = 0D 0A in the middle of the data and at the end).  But the system times out (makes sence since I didnt set a termination ch)

 

2) If I use "/n" as my termination character the first chuck of data is displayed but not the second.

 

Below you can see the data collected from "Advanced Serial Port Monitor".  In one data capture you can see that there are two lines, I want to terminate on the second LF.. any ideas?

 

<20140404161850.899 RX>
00000,0,1.511e+03,3956,0.0041 [len=29]
<20140404161850.899 RX>
<LF>00000,0,1.511e+03,0.3854,0.3888,0.2236,0.5075 [len=46]
<20140404161850.899 RX>
<LF>

0 Kudos
Message 1 of 3
(4,492 Views)
Solution
Accepted by topic author Tim30

You cannot.

 

Workaround: Terminate on Line Feed. Get two chunks. Concatenate chunks. Put all this in a subVI and pretend it terminates on the second line feed.

 

Question: Can you tell which line is the first part and which is the second part if the read VI happens to start in the middle of a message?

 

Lynn

0 Kudos
Message 2 of 3
(4,488 Views)

have you reading the data in a while loop ? is it using serial port or some thing else? moreover do you send some kind of handshaking to the instrument or it is just throwing data on serial port on regular interval

0 Kudos
Message 3 of 3
(4,465 Views)