Skip to content

Add OPC to all SCIPPs commands.

Karol Krizka requested to merge kk_scipps-opc into devel

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 after cmd string and blocks until a response is received. If response other than 1 is seen, error is thrown.

  • command(const std::string& cmd, unsigned channel): Sends ":INST:NSEL "+channel+"" and then calls the first variation of send.

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.

Edited by Karol Krizka

Merge request reports

Loading