txrx? expect a reply and passes it on to the driver
txrx expect a reply and do not pass it on.
tx do not expect a reply.
HKJ,
Still struggling to make the interface to the Yokogawa behave. Based on the above I would expect using TX would not give an Rx Timeout error but it does. See below DOS debug window showing the connection/log in sequence and just typing
tx *idn?
from the command line. At the end of the DOS debug window record after the TX only command there is an Rx Timeout.
Starting
;; 14:13:40.029 Start thread for: 10.8.37.94 - Yokogawa WT3000
;; 14:13:40.283 : Tx <txrx anonymous
txrx
txrx
txrx
txrx?
:readmath: "Ctl server is ready.">
;; 14:13:40.283 10.8.37.94: Tx: 80 00 00 09 61 6E 6F 6E 79 6D 6F 75 73
;; 14:13:40.283 10.8.37.94: Rx: 80 00 00 09 75 73 65 72 6E 61 6D 65 3A
;; 14:13:40.346 10.8.37.94: Tx: 80 00 00 00
;; 14:13:40.346 10.8.37.94: Rx: 80 00 00 00
;; 14:13:40.398 10.8.37.94: Tx: 80 00 00 00
;; 14:13:40.398 10.8.37.94: Rx: 80 00 00 09 70 61 73 73 77 6F 72 64 3A
;; 14:13:40.455 10.8.37.94: Tx: 80 00 00 00
;; 14:13:40.456 10.8.37.94: Rx: 80 00 00 00
;; 14:13:40.517 10.8.37.94: Tx: 80 00 00 00
;; 14:13:40.529 10.8.37.94: Rx: 80 00 00 14 43 74 6C 20 73 65 72 76 65 72 20 69 73 20 72 65 61 64 79 2E
;; Found Yokogawa WT3000 on 10.8.37.94
tx *idn?
;; 14:13:55.465 WT3000: Tx <tx *idn?>
;; 14:13:55.465 10.8.37.94: Tx: 80 00 00 05 2A 69 64 6E 3F
;; 14:13:57.666 WT3000: Rx Timeout
Is this how it should work?
Also, the time lapse between starting a query and getting an Rx timeout error confuses me. In the device file I have the command:
#readingDelay 2
which I think means accept up to 2 seconds delay when reading values. When I query and really get no reply it takes just over 2000 mSec per DOS Debug times stamps before the Rx timeout is reported. But, when I query something with a long/large character count answer thre is always an Rx Timeout error. The DOS Debug window has a line reporting "Rx timeout in 1000 mSec" and even more confusing the DOS Debug window time stamps say the Rx time out is happening after only 100's of mSec after the query start.
The DOS debug record at the end of the post shows properly getting one ascii float number via the Yokogawa command
:num:norm:val? 30
Then, the record shows the Yokogawa command
:num:norm:val?
with no index listed which should return all 255 values in one comma separated list. Using the Yokogawa DLTerm software utility it reports taking from 50 to 184 mSec to receive this long message. Test Controller just times out and lists the beginning of the buffer as 80 00 08 D2 which means it got the start of a 0x8D2 = 2258 decimal character reply. Below is a summary of this sequence:
14:46:02.350 The :num:norm:val? query starts
14:46:02.518 SocketTimeoutException happens
14:46:02.618 Reports Rx timeout 1000ms In buffer: 80 00 08 D2 80 80 80
14:46:02.663 WT3000: Rx Timeout
With #readingDelay 2 in the device file:
1. Why does it report overall Rx Timeout after only 313 mSec?
2. Why does it list "Rx timeout 1000ms" after only 268 mSec?
3. Lastly, can Test Controller txrx? receive an ascii reply with 2000+ characters or does that over run the buffer?
Sorry for all this detail, but when testing logging two values every sec the communications gets an error anywhere from almost right away to maybe 100 sec into logging. Once this communications error happens communications is permanently messed up with the replies coming out of order. Sometimes after a com error Test Controller even freezes and stops responding/has to be force closed. Unfortunately I haven't been able to reliably repeat Test Controller freezing.
For your reference I have attached the device file I have at the moment.
query? num:norm:val? 30
;; 14:45:37.770 WT3000: Tx <query? num:norm:val? 30>
;; 14:45:37.770 WT3000: Tx <txrx (value)
txrx
txrx
txrx?>
;; 14:45:37.770 10.8.37.94: Tx: 80 00 00 10 6E 75 6D 3A 6E 6F 72 6D 3A 76 61 6C 3F 20 33 30
;; 14:45:37.770 10.8.37.94: Rx: 80 00 00 00
;; 14:45:37.838 10.8.37.94: Tx: 80 00 00 00
;; 14:45:37.838 10.8.37.94: Rx: 80 00 00 00
;; 14:45:37.907 10.8.37.94: Tx: 80 00 00 00
;; 14:45:37.907 10.8.37.94: Rx: 80 00 00 00
;; 14:45:37.969 10.8.37.94: Tx: 80 00 00 00
;; 14:45:37.969 10.8.37.94: Rx: 80 00 00 04 49 4E 46 0A
;; 14:45:37.978 WT3000: Rx <INF>
;; INF
query? num:norm:val?
;; 14:46:02.350 WT3000: Tx <query? num:norm:val?>
;; 14:46:02.350 WT3000: Tx <txrx (value)
txrx
txrx
txrx?>
;; 14:46:02.350 10.8.37.94: Tx: 80 00 00 0D 6E 75 6D 3A 6E 6F 72 6D 3A 76 61 6C 3F
;; 14:46:02.350 10.8.37.94: Rx: 80 00 00 00
;; 14:46:02.403 10.8.37.94: Tx: 80 00 00 00
;; 14:46:02.403 10.8.37.94: Rx: 80 00 00 00
;; 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)
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at dk.hkj.comm.SocketPacketInterface.readData(SocketPacketInterface.java:92)
at dk.hkj.comm.SocketPacketInterface.writeReadData(SocketPacketInterface.java:233)
at dk.hkj.comm.SocketPacketInterface.writeReadData(SocketPacketInterface.java:227)
at dk.hkj.devices.DeviceAsciiBin$TranslatingCommDataInterface.oWriteRead(DeviceAsciiBin.java:61)
at dk.hkj.devices.DeviceAscii$TranslatingCommInterface.write(DeviceAscii.java:286)
at dk.hkj.comm.CommInterface.writeRead(CommInterface.java:141)
at dk.hkj.main.SCPICommand.writeReadDelay(SCPICommand.java:162)
at dk.hkj.main.SCPICommand.writeReadInternal(SCPICommand.java:211)
at dk.hkj.main.SCPICommand.writeRead(SCPICommand.java:256)
at dk.hkj.main.DeviceInterface.doCommand(DeviceInterface.java:81)
at dk.hkj.main.CommandProcessor.processCommands(CommandProcessor.java:2834)
at dk.hkj.main.PaneCommand.processCommand(PaneCommand.java:1463)
at dk.hkj.main.PaneCommand.access$20(PaneCommand.java:1461)
at dk.hkj.main.PaneCommand$31.keyTyped(PaneCommand.java:897)
at java.awt.AWTEventMulticaster.keyTyped(Unknown Source)
at java.awt.Component.processKeyEvent(Unknown Source)
at javax.swing.JComponent.processKeyEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
;; 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)
at dk.hkj.devices.DeviceAsciiBin$TranslatingCommDataInterface.oWriteRead(DeviceAsciiBin.java:61)
at dk.hkj.devices.DeviceAscii$TranslatingCommInterface.write(DeviceAscii.java:286)
at dk.hkj.comm.CommInterface.writeRead(CommInterface.java:141)
at dk.hkj.main.SCPICommand.writeReadDelay(SCPICommand.java:162)
at dk.hkj.main.SCPICommand.writeReadInternal(SCPICommand.java:211)
at dk.hkj.main.SCPICommand.writeRead(SCPICommand.java:256)
at dk.hkj.main.DeviceInterface.doCommand(DeviceInterface.java:81)
at dk.hkj.main.CommandProcessor.processCommands(CommandProcessor.java:2834)
at dk.hkj.main.PaneCommand.processCommand(PaneCommand.java:1463)
at dk.hkj.main.PaneCommand.access$20(PaneCommand.java:1461)
at dk.hkj.main.PaneCommand$31.keyTyped(PaneCommand.java:897)
at java.awt.AWTEventMulticaster.keyTyped(Unknown Source)
at java.awt.Component.processKeyEvent(Unknown Source)
at javax.swing.JComponent.processKeyEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
;; 14:46:02.663 WT3000: Rx Timeout