scpi-parser
scpi-parser copied to clipboard
parsing of whitespace after the parameter
trafficstars
I'm playing with the CONFigure:VOLTage:DC from examples using pyVISA under linux against the test-tcp example.
Python:
>>> dev.write('CONFigure:VOLTage:DC 1,3')
25
>>> dev.write('CONFigure:VOLTage:DC 1, 3')
26
>>> dev.write('CONFigure:VOLTage:DC 1 , 3')
27
test-tcp:
conf:volt:dc
P1=1.000000
P2=3.000000
conf:volt:dc
P1=1.000000
P2=3.000000
conf:volt:dc
**ERROR: -151, "Invalid string data"
P1=1.000000
P2=0.000000
The space after the 1 seems to be troublesome.
Interestingly if the following is done:
>>> dev.write('CONFigure:VOLTage:DC 1 , 3.0')
29
test-tcp seems happy:
conf:volt:dc
P1=1.000000
P2=3.000000