HKJ,
Using latest test version 1.68 the multi-line sequence does send the multiple lines. However, in some way something is not sequencing correctly or something is not waiting at the right time. Below is debug window from manually typing the below sequence in one at a time and successfully logging in.
txrx? anonymous
txrx
txrx
txrx
txrx?
Starting
;; 12:37:03.608 Start thread for: 10.8.37.94 - Yokogawa WT3000
;; Found Yokogawa WT3000 on 10.8.37.94
txrx? anonymous
;; 12:37:19.457 WT3000: Tx <txrx? anonymous>
;; 12:37:19.457 10.8.37.94: Tx: 80 00 00 09 61 6E 6F 6E 79 6D 6F 75 73
;; 12:37:19.457 10.8.37.94: Rx: 80 00 00 09 75 73 65 72 6E 61 6D 65 3A
;; 12:37:19.457 WT3000: Rx <username:>
;; username:
txrx
;; 12:37:35.151 WT3000: Tx <txrx>
;; 12:37:35.151 10.8.37.94: Tx: 80 00 00 00
;; 12:37:35.151 10.8.37.94: Rx: 80 00 00 00
txrx
;; 12:37:37.671 WT3000: Tx <txrx>
;; 12:37:37.671 10.8.37.94: Tx: 80 00 00 00
;; 12:37:37.671 10.8.37.94: Rx: 80 00 00 09 70 61 73 73 77 6F 72 64 3A
txrx
;; 12:37:40.995 WT3000: Tx <txrx>
;; 12:37:40.995 10.8.37.94: Tx: 80 00 00 00
;; 12:37:40.995 10.8.37.94: Rx: 80 00 00 00
txrx?
;; 12:37:49.193 WT3000: Tx <txrx?>
;; 12:37:49.193 10.8.37.94: Tx: 80 00 00 00
;; 12:37:49.193 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
;; 12:37:49.193 WT3000: Rx <Ctl server is ready.>
;; Ctl server is ready.
Using the below #scpiCmd I had hoped to get the same result.
#scpiCmd loginy? txrx? anonymous
txrx
txrx
txrx
txrx?
#scpiCmd <next command>
But the result is very different including some Java errors.
Starting
;; 12:39:16.759 Start thread for: 10.8.37.94 - Yokogawa WT3000
;; Found Yokogawa WT3000 on 10.8.37.94
loginy?
;; 12:39:28.096 WT3000: Tx <loginy?>
;; 12:39:28.096 WT3000: Tx <txrx? anonymous
txrx
txrx
txrx
txrx?>
;; 12:39:28.096 10.8.37.94: Tx: 80 00 00 09 61 6E 6F 6E 79 6D 6F 75 73
;; 12:39:28.096 10.8.37.94: Rx: 80 00 00 09 75 73 65 72 6E 61 6D 65 3A
;; 12:39:28.096 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:247)
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)
;; 12:39:28.150 10.8.37.94: Rx timeout 1000ms In buffer:
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:247)
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)
;; 12:39:28.197 WT3000: Rx Timeout
I thought maybe there needed to be a delay between commands during the log in sequence but adding
#delay 1
between the first line and the second line ended up with no errors but just the first command was done. No delay and then doing the other command lines.
Thoughts on why the multi-line #scpiCmd yields such different results?
Also, after logging in still see a 3 transaction delay before the reply shows up. I thought maybe it needed a line feed at the end of the message. I put
#eol \_
in the driver file but no line feed characters were added. I then tried manually typing
txrx? *idn?\r
and
txrx? *idn?0x0A
hoping this would add the single line feed character but that just sent the characters and not an actual single character line feed.
I am out of ideas on why the reply arrives three message later...I wonder who is buffering this communications??