07-27-2024 06:04 PM
Hello! So, I am writing a VI to read temperature from a pyrometer (Fluke E. Series) connected to my PC via an ethernet cable and the NI VISA software. When running the vi I receive the error code "-1073807339" during the read process. However, this timeout does not occur when using the VISA test panel, instead returning the correct reading. The difference can be seen using the IO trace application (see images attached) where the Test Panel calls the "viRead" command whereas my VI calls the "Visa Read" command resulting in a timeout error. How do I fix this error? Can I call viRead directly in my VI? Are there certain parameters or property nodes I can use to make it such that Visa Read does not timeout and actually receives the data from the pyrometer? Thanks!
Solved! Go to Solution.
07-28-2024 12:19 PM
You did not attach any images.
07-28-2024 04:39 PM
Ah, sorry. They should be attached on this reply if I did everything correctly.
07-29-2024 07:11 AM
For many Ethernet devices, you need to make sure to enable the Send End Enable via a Property Node. The VISA Test Panel will have this on by default.
07-29-2024 12:56 PM
I enabled this property node, but I still receive the same error.
08-12-2024 05:04 AM - edited 08-12-2024 05:06 AM
From the log it would appear that you are not sending "?T<CR><LF>" but literally "?T\r\n"!
Why you ask?
In some of the logs it shows that the VISA Write("?T\r") has a return value of 4 indicating that the write was for 4 bytes. Yet if \r was a properly escaped <carriage return> it would be only one byte and the whole string would be only 3 byte.
Same about another VISA Write("?T\r\n") that has a return value of 6 indicating that there were actually 6 bytes written instead of the 4 that would have been sent if the string was properly in \-escape mode.
Solution is trivial: Go to the string constant, right click on it and select '\'-Codes Display. Correct the string to only have one backslash each instead of the double backslashes you will see now. And to help yourself see right away if the string constant is actually in the right Display mode, right click it again and select Visible Items->Display Style. This will enable a glyph on the left side of the string box that shows if the Display mode is in n - Normal, \ - Backslash, x - Hex, or p - Password mode.
08-13-2024 11:50 AM
This fixed it. Thank you so much!