LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

different VISA read and VISA write data

I wonder why my VISA read buffer will produce different values from the VISA write data, since i connect both of them via byte count.

Thanks
ade
0 Kudos
Message 1 of 5
(2,615 Views)
Are you connecting the return count of VISA Write to the byte count of VISA Read? If you are, that doesn't make any sense unless you're doing a serial loopback test. When you're talking to some instrument, VISA Read is supposed to return different values than what you wrote to it. Could you explain in further detail what you're trying to do and how you're doing it?
Message 2 of 5
(2,615 Views)
Hi Dennis,
the attached is the vi which i am talking about. I tried to set values for my power supply. Then, i use VISA READ to read from my instrument, however, i get different values from what is registered from my instrument. The values shown on power supply is the same as VISA WRITE. So, i wonder? Sometimes, the values in VISA READ not only differ in value, but magnitude too, when i am in fact using a DC supply.

ade
0 Kudos
Message 3 of 5
(2,615 Views)
As I said, DO NOT wire the VISA Write return count to the VISA Read byte count. They are two completely different things. The return count is the actual number of bytes written. The VISA Read byte count is the number of bytes that you expect the instrument to send back and the actual number of bytes that the instrument is returning could be greater than the number of bytes that you wrote. Set the VISA Read byte count to some higher number (i.e. 50) and see if the result you had been getting was truncated. Maybe there's an exponent in the result. The other thing to do is to do an error query of the instrument. Check the manual but it should be something like ERR?.
0 Kudos
Message 4 of 5
(2,615 Views)
Thanks a lot. I will try your suggestions.
0 Kudos
Message 5 of 5
(2,615 Views)