HKJ,
I am working on a driver file for a new servo drive. This time I have gotten the product to add simple SCPI language support. This way I should be able to use the #driver SCPIx instead of #driver ascii like I have before. Since these products support many 100's of keywords not having to create read and write #scpiCmd's for each keywords with the #driver SCPIx makes things much simpler.
Unfortunately logging with #driver SCPIx randomly loses about 10% of the data points. However, the same #askvalues command using the #driver ascii works every time. Here is detailed background:
Logging works:
#port com
#eol \r\n
#driver ascii
Logging loses points:
#port com
#eol \r\n
#driver SCPIx
In both cases the logging command is the same
#askValues REC.TRIG; REC.DATA?
Below is debug from #driver SCPIx where the logging point worked where the last received item is properly 6 csv numbers.
;; 10:56:31.921 KED: Tx <REC.TRIG>
;; 10:56:31.923 COM6: Tx: <REC.TRIG..> 52 45 43 2E 54 52 49 47 0D 0A
;; 10:56:31.923 KED: Tx <REC.DATA?>
;; 10:56:31.923 KED: Tx <txrxn? 2 REC.RETRIEVEDATA 0>
;; 10:56:31.925 COM6: Tx: <REC.RETRIEVEDATA 0..> 52 45 43 2E 52 45 54 52 49 45 56 45 44 41 54 41 20 30 0D 0A
;; 10:56:31.925 COM6: Rx: <1> 31
;; 10:56:31.925 COM6: Rx: <0.045,0.071,3249506180,7.387,0.091,0.000> 30 2E 30 34 35 2C 30 2E 30 37 31 2C 33 32 34 39 35 30 36 31 38 30 2C 37 2E 33 38 37 2C 30 2E 30 39 31 2C 30 2E 30 30 30
;; 10:56:31.925 KED: Rx <0.045,0.071,3249506180,7.387,0.091,0.000>
;; 10:56:31.925 KED: Rx as numbers <0.045 0.071 3.24950618E9 7.387 0.091 0.0>
Below is debug from the #driver SCPIx where the data point is lost/the last received item is just 1 value of 0.0.
;; 10:56:32.022 KED: Tx <REC.TRIG>
;; 10:56:32.023 COM6: Tx: <REC.TRIG..> 52 45 43 2E 54 52 49 47 0D 0A
;; 10:56:32.023 KED: Tx <REC.DATA?>
;; 10:56:32.023 KED: Tx <txrxn? 2 REC.RETRIEVEDATA 0>
;; 10:56:32.025 COM6: Tx: <REC.RETRIEVEDATA 0..> 52 45 43 2E 52 45 54 52 49 45 56 45 44 41 54 41 20 30 0D 0A
;; 10:56:32.025 COM6: Rx: <>
;; 10:56:32.025 COM6: Rx: <-->1> 2D 2D 3E 31
;; 10:56:32.025 KED: Rx <-->1>
;; 10:56:32.025 KED: Rx as numbers <0.0>Notice in the above that TestController says
COM6: Rx: <-->1> 2D 2D 3E 31
But the device never sent "-->1". So, it is as if the receive buffer is getting confused.
In support of the thought that TestController #driver SCPIx is getting confused is the fact that #driver ascii with the exact same device responding in the exact same way always gets every returned log point correctly.
The device itself answers the REC.RETRIEVEDATA 0 from TestController with:
1<CR LF>
0.045,0.071,3249506180,7.387,0.091,0.000 <CR LF>
-->
where "<CR LF>" means just the two ascii character 0D 0A or \r\n. Note that the last line is a prompt and does not have "<CR LF>" after it. Also note that the two previous lines have no initial prompt characters.
Any thoughts on the same communications sequence works with #driver ascii but with #driver SCPIx regularly get confused? Any thoughts on how the get #driver SCPIx to work with this device? Is it possible there is a bug in the #SCPIx driver?