07-10-2019 10:41 AM
The \r\n should be a part of the IDN? or immediately after, and BEFORE you try to read the response.
I don't know how much I would trust a device with a manual that refers to a "bite" rather than a "byte".
07-10-2019 10:47 AM
@William1225 wrote:
After I read wiebe@CARYA's message, I was wondering what if I sending "/r/n" between the two querying process(just like the processes in the Putty, I sent the first command and got the response, and pressed "Enter" key and sent the second command...??), it somehow works.
The suggestion was to add the "/r/n" to the query string. Due to the long wait, I would not be surprised if the instrument is timing out waiting for that "/r/n" and just taking the string it had received up to then for the initial response.
@William1225 wrote:
Since I read the manual and found it mentioning waiting time is 50ms, so that I added 50ms and 100ms that time and failed.
That looks like a serial (UART) bus information. Is there another section for Ethernet and TCP/IP?
07-10-2019 10:59 AM
Hi wiebe@CARYA,
Yes, I had tried "*IDN?\r\n", "*IDN?\r", and "*IDN?\n", but none of them works.
But when I sent "\r\n" between the two querying processes, it works.
How would this work if the device doesn't have ethernet? You'd still be expecting 50 characters, and they won't come in...
I do not understand this words, if the device doesn't have ethernet, I can't connect the device and an error would happen in the "TCPIP Open Connection"...
07-10-2019 11:05 AM
Hi billko,
Thanks to your suggestion, I can try this way tomorrow 🙂
07-10-2019 11:07 AM
@RavensFan 已寫:
The \r\n should be a part of the IDN? or immediately after, and BEFORE you try to read the response.
I don't know how much I would trust a device with a manual that refers to a "bite" rather than a "byte".
bite...... I didn't notice that....
07-10-2019 11:20 AM
@crossrulz 已寫:
That looks like a serial (UART) bus information. Is there another section for Ethernet and TCP/IP?
Hi crossrulz,
No, I found no information for Ethernet, TCP/IP in that manual.
http://www.saelig.com/supplier/preen/adg-l-series-user-manual-saelig.pdf
Perhaps it was designed for RS-232 originally, and the Ethernet protocol is developed recently.
07-11-2019 02:04 AM
@William1225 wrote:
How would this work if the device doesn't have ethernet? You'd still be expecting 50 characters, and they won't come in...I do not understand this words, if the device doesn't have ethernet, I can't connect the device and an error would happen in the "TCPIP Open Connection"...
This string that is send, is send to all protocols, serial, ethernet, usb, etc. No ethernet was a poor example.
Point was that without a \r\n at the end, there is no way for a client (nor the server) to reliably communicate. How would the client (or server) know the string is finished? It can't. Except when there is a defined end termination character, and that is usually \r\n for this kind of protocol (SCPI or SCPI-ish).
So if the device (or a replacement device) doesn't have the serial interface, the string won't be 50 characters. The protocol needs \r\n to communicate...