03-17-2025 04:48 PM
Hi all,
I am able to send command to this device, but once I use the property Bytes at Port, it gives me an error message -1073807331 therefore I can't query anything. I used the NI-MAX and it worked fine.
Please let me know if any of you know the solution.
Thank you very much.
03-18-2025 01:56 AM
Hi SonVo,
@SonVo wrote:
I am able to send command to this device, but once I use the property Bytes at Port, it gives me an error message -1073807331 therefore I can't query anything.
Simple solution: Don't use BytesAtPort…
Follow the suggestions given in this video!
03-18-2025 03:33 PM
A quick search also shows that device connects via Ethernet or USB.
"Bytes at port", which you absolutely should NOT use in 99% of circumstances, is only allowed on serial (RS-232 or similar) devices.
So, yet another reason not to use it.
I am guessing you did it because you have a "Bytes to read" input, and didn't know what to put there, and did a search that showed that as a solution, or are using example code that showed it being used.
In most cases, you can do one of two things. Either put in an extremely large number and the read function will stop on its own after it gets to a termination point if the protocol has that built in, or set up a "termination character" in the VISA properties instead, after checking to see what the device uses (most common is a carriage return, ascii 10).