HKJ,
... if you suspect that please state the driver you are using and I will check.
The communications setup for the Yokogawa in the driver file is:
#name Yokogawa WT3000
#handle WT3000
#port LXI 10001
#driver asciiBin
#packetFormat Length31
#eol \_
#cmdDelayTime 50
The "Load devices" tab is set to use Type "Socket". Full driver file is attached for your reference.
Also, the example query that always fails is returning around 2260 characters. Does that over flow the communications buffer?
Generally there is not supposed to be any buffer overflows, but some messages queues are limited in length to avoid long delays. This only affects complete messages, a single message is not limited in length, but a timeout may cut it short.
The query command I am having trouble with reports back all the measurements in a comma separated list and is around 2260 characters listing 255 floating point values including some "NaN" and some "INF". This query command always times out and after it times out communications with the device always stops working; every subsequent query command errors out or comes in out of order like there is a buffer error. Sometimes after this query command Test Controller freezes and must be force stopped (the close "X" in the upper corner does not work).
As shown in the previous detailed post in the second DOS Debug record this query command from last tx line to final line took 663-518 = 145 mSec. Note the line in the debug where it says "timeout 1000ms " but the Debug time stamps show it is no where near 1000ms. My eyes are not a precision clock, but the error report seems pretty much immediate after hitting return on the command line suggesting much faster than 1 sec from send start to timeout/error.
;; 14:46:02.465 10.8.37.94: Tx: 80 00 00 00
;; 14:46:02.465 10.8.37.94: Rx: 80 00 00 00
;; 14:46:02.518 10.8.37.94: Tx: 80 00 00 00
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
+ Many more Java error lines removed to shorten. See original post for full lines.
;; 14:46:02.618 10.8.37.94: Rx timeout 1000ms In buffer: 80 00 08 D2 80 80 80
java.lang.NullPointerException
at dk.hkj.devices.DeviceAsciiBin$TranslatingCommDataInterface.decode(DeviceAsciiBin.java:76)
+ Many more Java error lines removed to shorten. See original post for full lines.
;; 14:46:02.663 WT3000: Rx Timeout
Perhaps with this driver combination there is a short timeout at the socket level?
Can you think of any further test ideas to understand this problem?
Added a Little Later:Further testing with this command shows that the error happens when the number of characters exceeds 127. It turns out the Yokogawa allows retrieving 1 to a set number or by default up to the max 255 at once.
Setting the range from 1 to 16 sends 0x7F characters and works repeatedly.
Setting the range from 1 to 17 sends 0x83 characters and always errors out and communications stops working.
From the above I conclude somewhere Test Controller has a 127 character max buffer/limit of some kind. The buffer length limit explains the long command always failing but does not explain or solve the issue of communications failing randomly/sometimes.