10-10-2008 02:02 PM
I'm encountering an error with a VISA Read. I request 8 bytes (Byte Count in), but get only 7 back (Return Count), which causes errors in my downstream code. The VISA Read block oddly enough does not return an error. Any ideas on how to debug this?
Specs:
LabVIEW RT 8.2
VISA 4.3
NI Serial 3.3.0
PXI 8431/4
Settings: 1843200 Baud, 8N1.
Solved! Go to Solution.
10-10-2008 02:17 PM
Is the VISA Read set to end on the receipt of a termination character? I think it does not put the termination character in the output string, so that might make your Return Count short.
Lynn
10-10-2008 02:23 PM
11-01-2019 07:28 AM
How can we set visa read to the end of receipt of the termination character. I'm a beginner. Kindly help.
11-01-2019 07:56 AM
@KarthikMurali wrote:
How can we set visa read to the end of receipt of the termination character. I'm a beginner. Kindly help.
The VISA Configure Serial Port has a couple of inputs on the top of it to enable the termination character and what the termination character is. After that, you just tell VISA Read to read more bytes than you ever expect to be in a message and it will stop when that termination character is read.
11-06-2019 03:48 AM
I tried this put my visa configure serial port gets timeout. Kindly let me know of an other solution to this.
11-06-2019 07:00 AM
Kindly post some details. Such as a VI that has the problem. Some information on the command you write to the device, and the data that you have received from the device, and what additional data you are expecting that is coming up short.
We can't offer a solution to a problem that is very vaguely described.
11-06-2019 07:07 AM
I am using an RS232 cable and serial port to communicate with Nanotec C5 motion controller. I am trying to achieve axis movement with the vi.
11-06-2019 07:24 AM - edited 11-06-2019 07:27 AM
That's missing a bunch of VI's that have VISA functions within them. I don't see where you tried to use Serial Configuration, I only see a VISA Open.
Also, you didn't mention what data you got vs. what data you expected to see.
Since it seems that he communication is binary, I'm think only using VISA Open as left the termination character set as enabled, and you are getting a byte of value 10 as part of the ordinary within your data stream. That is the default termination character and would thus stop the VISA Read at that byte whenever it sees it.
I'm also concerned how you split the VISA wire so it is being handled in two different loops. It makes me wonder if you the communication in the two loops are interfering with each other.
Here's programming tip. Index Array is expandable. Drag the bottom border downwards and you will get multiple outputs. You may not even need to wire any constants as they will automatically give you index 0, 1, 2, 3, ...... That way you don't have to drop multiple copies of Index Array nor split your array wire.