We decided to implement the SCPI protocol via USB to control our Powerblock. It's time to decide which specific commands should be implemented.
Instrument Classification:
Base Functionality:
Capability request:
- SYSTem:CAPability? - This query returns an <instrument_specifier>, example reply from power supply with additional functions: (DCPSUPPLY WITH (MEASURE&MULTIPLE&TRIGGER)). More about <instrument_specifier> at 1.4.1 SCPI 1999.
Output state control:
- OUTPut[:STATe] {OFF | ON | 0 | 1} - change output state of device.
- OUTPut[:STATe]? - queries the output state of device.
- As stated in Command Reference, *RST sets the output state to off.
Source control:
- [SOURce]:CURRent[:LEVel][:IMMediate][:AMPLitude] {<Current>} - When a power supply is operating as a voltage source, this command sets the current limit. When a power supply is operating as a current source, this command sets the output current.
- [SOURce]:CURRent[:LEVel][:IMMediate][:AMPLitude]? [MIN | MAX] - query for setting of current (target, min or max limits).
- [SOURce]:VOLTage[:LEVel][:IMMediate][:AMPLitude] {<Voltage>} - When a power supply is operating as a voltage source, this command sets the output voltage. When a power supply is operating as a current source, this command sets the voltage limit.
- [SOURce]:VOLTage[:LEVel][:IMMediate][:AMPLitude]? [MIN | MAX] - query for setting of voltage (target, min or max limits).
- At *RST a power supply is required to set the voltage and current to “safe” conditions. This is generally achieved by setting them to their values closest to zero.
Status Reporting:
The device status system consists of the OPERation (information about normal device operation, current operations) and QUEStionable (signal quality information) subsystems. Each subsystem consists of 3 parts (Event, Condition and Enable register), ref. by NGE100 User Manual:
- CONDition - this register is directly written into by the hardware or the sum bit of the next lower register. Its contents reflects the current instrument status. Read only register. Its contents is not affected by reading
- EVENt - this register indicates whether an event has occurred since the last reading, it is the "memory" of the CONDition register. It is permanently updated by the instrument. Read only register. Reading the register clears it.
- ENABle - this register determines whether the associated EVENt bit contributes to the sum bit (status mask). Read and write access. Its contents is not affected by reading.
STATus:OPERation[:EVENt]? - reading device condition via event (memory) register. More about bit field of this register at 9.3 SCPI 1999.
STATus:OPERation:CONDition? - reading device condition directly. More about bit field of this register at 9.3 SCPI 1999.
STATus:OPERation:ENABle? - reading status mask for operation register.
STATus:OPERation:ENABle {0-65535} - enables the bits in the status mask for operation register. More about bit field of this register at 9.3 SCPI 1999.
STATus:QUEStionable[:EVENt]? - reading signal quality register via event (memory). More about bit field of this register at 9.4 SCPI 1999. For a power supply, the bits of interest in the QUEStionable status structure are VOLTage and CURRent. When a power supply is operating as a voltage source, bit 1 (CURRent) shall be set. When a power supply is operating as a current source, bit 0 (VOLTage) shall be set. When the output is unregulated, both bits shall be set (for example, while the output is changing to a new programmed value).
STATus:QUEStionable:CONDition? - reading signal quality register directly. More about bit field of this register at 9.4 SCPI 1999.
STATus:QUEStionable:ENABle? - reading status mask for questionable register.
STATus:QUEStionable:ENABle {0-65535} - enables the bits in the status mask for questionable register. More about bit field of this register at 9.4 SCPI 1999.
Additional Functionality:
Measurement capability:
- For more details on the implementation, see 7.2.1 SCPI 1999.
- af_keyword = MEASURE
- MEASure[:SCALar]:VOLTage[:DC]? - queries the measured voltage value of the selected channel. Example output "1.000E+00"
- MEASure[:SCALar]:CURRent[:DC]? - queries the measured current value of the selected channel. Example output "1.000E+00"
- This unctionality further require no additional Measurement Instruction commands and has no interaction with the power supply’s triggering system, if implemented.
Multiply supplies capability:
- For more details on the implementation, see 7.2.2 SCPI 1999.
- af_keyword = MULTIPLE
- Each channel of the power supply is considered as separate
instrument. - INSTrument:NSELect {1 | 2 | 3} - numerical selection of a channel. <num> - number of channel (counting from 1).
- INSTrument:NSELect? - queries the numerical channel selection.
- INSTrument[:SELect] {OTPut1 | OUTPut2 | OUTPut3} - selection of a channel by name.
- INSTrument[:SELect]? - queries the named channel selection.
- STATus:OPERation:INSTrument[:EVENt]? - reading summary device condition via event (memory) register. More about register interconnections at 9.5 SCPI 1999.
- STATus:OPERation:INSTrument:CONDition? - reading summary status device condition register directly.
- STATus:OPERation:INSTrument:ENABle? - reading status mask for summary operation register.
- STATus:OPERation:INSTrument:ENABle {0-65535} - enables the bits in the summary status mask for operation register.
- STATus:OPERation:INSTrument:ISUMmary<n>[:EVENt]? - reading dedicated instrument condition via event (memory) register (<n> = 1 | 2 | 3).
- STATus:OPERation:INSTrument:ISUMmary<n>:CONDition? - reading dedicated instrument condition directly (<n> = 1 | 2 | 3).
- STATus:OPERation:INSTrument:ISUMmary<n>:ENABle? - reading dedicated instrument status mask (<n> = 1 | 2 | 3).
- STATus:OPERation:INSTrument:ISUMmary<n>:ENABle {0-65535} - enables the bits in the dedicated instrument status mask (<n> = 1 | 2 | 3) for operation register.
- STATus:QUEStionable:INSTrument:CONDition? - reading summary status of signal quality register directly.
- STATus:QUEStionable:INSTrument:ENABle? - reading status mask for summary status of signal quality register.
- STATus:QUEStionable:INSTrument:ENABle {0-65535} - enables the bits in the summary status mask for questionable register.
- STATus:QUEStionable:INSTrument:ISUMmary<n>[:EVENt]? - reading dedicated instrument signal quality via event (memory) register (<n> = 1 | 2 | 3).
- STATus:QUEStionable:INSTrument:ISUMmary<n>:CONDition? - reading dedicated instrument signal quality directly (<n> = 1 | 2 | 3).
- STATus:QUEStionable:INSTrument:ISUMmary<n>:ENABle? - reading dedicated signal quality status mask (<n> = 1 | 2 | 3).
- STATus:QUEStionable:INSTrument:ISUMmary<n>:ENABle {0-65535} - enables the bits in the dedicated instrument status mask (<n> = 1 | 2 | 3) for questionable register.
Trigger capability:
- For more details on the implementation, see 7.2.3 SCPI 1999.
- af_keyword = TRIGGER
- INITiate:CONTinuous {OFF | ON}
- INITiate[:IMMediate][:ALL]
- [SOURce]:CURRent[:LEVel]:TRIGgered[:AMPLitude] <Voltage>
- [SOURce]:VOLTage[:LEVel]:TRIGgered[:AMPLitude] <Current>
- TRIGger[:SEQuence][:IMMediate]:SOURce {BUS | EXTernal | ...}
- Need to implements the *TRG common command.
- A complex implementation for a simple device. The HMC804x example implements only two functions supporting this subsystem. The NGE100 example is slightly more complex. A precise definition of the trigger functionality for the device being designed is required
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.