This content is not available in your preferred language.
The content is shown in another available language. Your browser may include features that can help translate the text.
1. Make sure your code opens and closes all VISA session references. Most VISA LabVIEW code will follow the pattern: 1.Open VISA reference 2. Perform reads and writes 3. Close VISA reference. For an example of this code structure see the example program Simple Serial.vi in LabVIEW by going to help >> Find Examples.2. Ensure that there are no processes interfering with the I/O ports of your device (Modbus I/O, I/O Servers, etc.). You can verify this in Distributed System Manager.3. The problem may come from the VISA Write IRP_MJ_FLUSH_BUFFER request causing an INVALID DEVICE REQUEST response from the device. By default, each VISA Read and Write is followed by a VISA Flush call when communicating via RS-232. You can change the VISA Buffer setting to keep VISA from executing the flush call to avoid this error.If you call the VISA Set I/O Buffer function at the beginning of your application (after the VISA Open, before any reads or writes) and set the mask to 48 (16 + 32, where 16 is the mask for receive buffer and 32 is the mask for transmit buffer) and the size to some value between 4k and the largest amount of data you ever expect to read or write, that will cause the flush command to not be executed. IMPORTANT: Be sure of the upper limit when you set them. If it is not large enough for the data that you are transmitting or receiving it can cause your computer to crash.
Thank you for your feedback.
You changed your response to Not Helpful
You changed your response to Helpful
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.