Add OPC to all SCIPPs commands.
Add SCPIPs::send/sendreceive
function(s) whose job is to block until a power supply command finishes, as indicated by the Operation Complete command. This prevent the program from terminating while a command is still being processed, solving #36. I've also seen stability improvements with RS-232 mode on the Agilent PS's.
This approach is recommended by R&S. See section 4.2.1.
There are two variations of send
added.
-
send(const std::string& cmd)
: Send*OPC?"
to aftercmd
string and blocks until a response is received. If response other than1
is seen, error is thrown. -
command(const std::string& cmd, unsigned channel)
: Sends":INST:NSEL "+channel+""
and then calls the first variation ofsend
.
The sendreceive
functions do not use *OPC?
and are just a wrapper around m_com
. They were added for symmetry.
All commands in SCPIPs
are now done though this.