LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem reading the full buffer

Solved!
Go to solution

I have made a simple VI and it runs pretty well. The only problem is that when I give it some commands I can't read the entire buffer. The best example is when given the command "instr name" the response is supposed to be "instr name/ SO2 analyzer/ SO2 analyzer" (with the / being a new line). However when I press the execute command button I  get only the first part of the response, and then when I press it again I get the second part, and so on. Is there any way to make sure the entire buffer gets read?

Any help is greatly appreciated

0 Kudos
Message 1 of 6
(4,103 Views)
Here is the VI itself as well. I should have attached it initially
0 Kudos
Message 2 of 6
(4,101 Views)
Solution
Accepted by topic author CorrAtm
Look at the help for VISA Configure Serial Port. See the inputs called 'Enable Termination Character' and 'termination char'? When the enable is true, the VISA Read will terminate as soon as the term char (default is 0xA or the LF character). You will need to set the enable to false and just use the VISA Bytes at Serial Port.
Message 3 of 6
(4,098 Views)

I know how to enter an empty string, but how do you get an empty char from the Programming palette, when you're using the "enable termination char (T)" function in the code?

0 Kudos
Message 4 of 6
(3,524 Views)

Not sure why you're replying to a 2-year old thread.  What do you mean by an "empty char"?  Are you looking for a null character?  If so, right-click on a string constant, choose "'\' Codes Display" and then enter \00 in the string constant.

0 Kudos
Message 5 of 6
(3,516 Views)

I was looking for "enable termination char" and the data type is a character. A null string wouldn't work for it. But it turns out the enable termination character is already in the Visa Serial Port VI. I was reading an old thread to get ideas

0 Kudos
Message 6 of 6
(3,512 Views)