HKJ,
I am creating a device file for my Siglent SDS1204X-E and I am having issues reading the first value, I am getting "Rx timeout 1000ms In buffer: C1-C2:MEAD PHA,0.06degree". I looks like it is reading the value but it is stuck in the buffer. Also to do a :readmath: on each value I am using the ASCII driver.
;; 22:12:36.326 SDS1204XE: Tx <C1-C2:PHA?>
;; 22:12:36.327 SDS1204XE: Tx <txrx? C1-C2:MEAD? PHA>
;; 22:12:36.329 192.168.1.212: Tx: <C1-C2:MEAD? PHA.> 43 31 2D 43 32 3A 4D 45 41 44 3F 20 50 48 41 0A
;; 22:12:37.329 192.168.1.212: Rx timeout 1000ms In buffer: C1-C2:MEAD PHA,0.06degree
;; 22:12:43.833 SDS1204XE: Rx Timeout
;; 22:12:43.833 SDS1204XE: Tx <C1:RMS?>
;; 22:12:43.833 SDS1204XE: Tx <txrx? C1:PAVA? RMS>
;; 22:12:43.834 192.168.1.212: Tx: <C1:PAVA? RMS.> 43 31 3A 50 41 56 41 3F 20 52 4D 53 0A
;; 22:12:43.862 192.168.1.212: Rx: <C1:PAVA RMS,1.80E+00V> 43 31 3A 50 41 56 41 20 52 4D 53 2C 31 2E 38 30 45 2B 30 30 56 0A
;; 22:12:43.862 SDS1204XE: Rx <1.80E+00V>
;; 22:12:43.862 SDS1204XE: Tx <C2:RMS?>
;; 22:12:43.863 SDS1204XE: Tx <txrx? C2:PAVA? RMS>
;; 22:12:43.863 192.168.1.212: Tx: <C2:PAVA? RMS.> 43 32 3A 50 41 56 41 3F 20 52 4D 53 0A
;; 22:12:43.888 192.168.1.212: Rx: <C2:PAVA RMS,1.80E+00V> 43 32 3A 50 41 56 41 20 52 4D 53 2C 31 2E 38 30 45 2B 30 30 56 0A
;; 22:12:43.889 SDS1204XE: Rx <1.80E+00V>
;; 22:12:43.890 SDS1204XE: Rx as numbers <1.8 1.8>
#author MikeLud
#idString Siglent Technologies,SDS1204X-E,
#name Siglent SDS1204X-E
#handle SDS1204X-E
#driver Ascii
#port 5024
#scpiCmd C1-C2:PHA? txrx? C1-C2:MEAD? PHA
:readmath: getElement(value,1,",")
#scpiCmd C1:RMS? txrx? C1:PAVA? RMS
:readmath: getElement(value,1,",")
#scpiCmd C2:RMS? txrx? C2:PAVA? RMS
:readmath: getElement(value,1,",")
; A list of possible column name with unit and formatter (SI, Time, Int, D0..D6)
#value Delay Degree D2
#value C1:RMS V si
#value C2:RMS V si
; How to poll for data, this is used for table and #values?
; a #askMode, #cmdMode and #prepareSample is used before this is string is used.
; This is a single line command
#askValues C1-C2:PHA?;C1:RMS?;C2:RMS?
; Format of answer: f=float, u=remove trailing letters, x=skip, *=Zero upper case values if this value is 0
#askValuesReadFormat uuu
;Accept this delay when reading values (seconds)
#readingDelay 5
; Initial commands to meter when establishing connection
#initCmd MEAD PHA,C1-C2;PACU RMS,C1;PACU RMS,C2
; Prepare the meter to response to #askValues
#prepareSample
abort
sample:count 1
trig:source imm
trig:count inf
init