UPDATE: Seems to be working "OK" this am... although I am not sure why certain replies have /r/n at the end and why certain don't. I have explicitly turned Handshaking OFF...
An example of the commands/queries/replies is posted below..
![](https://www.eimg.top/images/2020/03/11/659fe74bcae42dda93a12e99eb8bd16f.png)
**I am using PyVisa frontend to communicate with a sensor.
I am having to have to send a command or make a query three times before there is a change in the output..
Do I have to add wait command before proceeding, I thought the SCPI commands are blocking (synchronous so as to speak).. Please let me know if I am doing something awry.. here are a few of my commands:**
>>> import visa >>> ins = visa.ResourceManager() >>> print(ins.list_resources()) ('ASRL1::INSTR', 'ASRL3::INSTR', 'ASRL6::INSTR', 'ASRL10::INSTR') >>> Energy_sense = ins.open_resource('ASRL6::INSTR') >>> print(Energy_sense.query('*IDN?')) Coherent, Inc - EnergyMax USB - V1.2 - Jan 27 2011 >>> Energy_sense.write(":CONF:WAVE 780") (16, <StatusCode.success: 0>) >>> print(Energy_sense.query(':CONF:WAVE?')) 780 >>> Energy_sense.write(":SYST:COMM:HAND OFF") (21, <StatusCode.success: 0>) >>> >>> Energy_sense.write(":CONF:MEAS:STAT ON") (20, <StatusCode.success: 0>) >>> Energy_sense.write(":CONF:STAT:BSIZ 1000") (22, <StatusCode.success: 0>) >>> Energy_sense.query(":CONF:STAT:BSIZ?") '1000\r\n' >>> Energy_sense.write(":CONF:STAT:STAR") (17, <StatusCode.success: 0>) >>> Energy_sense.query(":READ?") '3.728E-5,3.150E-5,4.358E-5,2.597E-6\r\n' >>> >>> Energy_sense.query(":CONF:STAT:BSIZ?") '1000\r\n' >>> >>> print(Energy_sense.query(':CONF:WAVE?')) 780 >>>
You can find the rest of the commands in the image.