When I set baudrate 19200(written in manual), there(labview) is an error in visaread(frame error which i mentioned before).
When i use other program, teraterm, 19200 isn`t work. 57600 works.
So I set baud 57600 and In case of this there(labview) is no error but output is different with manual.
I attached output in former reply.
That response 0x1B5B356E1B does not make any sense.
0x1B => 0b00011011
00011 Address and 011 (3) data bytes
0x5B => no such command in the manual. It should echo "Sent" Command
The manual says the serial port is permanantly set to "1" & Should only get 1 data byte in the response.
Maybe the VISA Flush is not flushing properly. You may have some stale data left over. Set the # of Bytes to read to a very large number (like 1000) and let it time out. That should get rid of all data. See what data you get with the timeout.
Try doing that large number of reads twice/three times. See if the response is the same after the timeouts? Different? It may be that the 57600 doesn't work and it's just sending back garbage.
after time out I got a error massage about timeout and output.
output is 1B5B 356E 1B5B 3570 1B5B 356E 1B5B 3570 1B5B 356E 1B5B 3570 1B5B 356E 1B5B 3570 1B5B 356E 1B5B 3570 1B5B 356E 1B5B 3570 1B5B ......
I expected the timeout. Look like the output response is repetitive
1B5B 3570 .....
What were the last 20 or so bytes? Did it repeat to the very end of transmission?
Have you tried doing this multiple times? If so, what do the first few and the last few output bytes look like? Add an indicator to display how many bytes were actually read each time.
first time the number of bytes is 208
and output is similar.
1B5B 356E 1B5B 3570 ....
last trial gives last bytes 3570.
Is the instrument constantly sending data? If so, you really need a loop that does nothing but read from the port and process the data that comes in.
what you mean exactly"Is the instrument constantly sending data If so, you really need a loop that does nothing but read from the port and process the data that comes in.?"
I wrote command 00 in write buffer, output is same with 0232640011(write buffer)
if i understand right, It is constantly sending data.
"loop that does nothing but read from the port and process that come in" meas that I have to separate read buffer and write buffer?