scpi-pps: use remote and local modes for HMP4000

Stop using the unusal "mixed" mode (local interface available during
remote operation) for HMP4000, applications may not be prepared for this
use case. Use traditional "remote" and "local" modes instead. This change
also ends remote mode after the application is done using the device.
This commit is contained in:
Gerhard Sittig 2020-08-25 20:47:26 +02:00
parent 22f76e188b
commit f403cb9de9
1 changed files with 6 additions and 22 deletions

View File

@ -1083,6 +1083,8 @@ static const struct channel_group_spec rs_hmp4040_cg[] = {
* SYST:BEEP:IMM
*/
static const struct scpi_command rs_hmp4040_cmd[] = {
{ SCPI_CMD_REMOTE, "SYST:REM" },
{ SCPI_CMD_LOCAL, "SYST:LOC" },
{ SCPI_CMD_SELECT_CHANNEL, "INST:NSEL %s" },
{ SCPI_CMD_GET_MEAS_VOLTAGE, "MEAS:VOLT?" },
{ SCPI_CMD_GET_MEAS_CURRENT, "MEAS:CURR?" },
@ -1101,24 +1103,6 @@ static const struct scpi_command rs_hmp4040_cmd[] = {
ALL_ZERO
};
static int rs_hmp_init_acquisition(const struct sr_dev_inst *sdi)
{
struct sr_scpi_dev_inst *scpi;
int ret;
scpi = sdi->conn;
/*
* Sets the system to remote state. The front panel and remote
* control are possible simultaneously (mixed mode).
*/
ret = sr_scpi_send(scpi, "SYST:MIX");
if (ret != SR_OK)
return ret;
return SR_OK;
}
SR_PRIV const struct scpi_pps pps_profiles[] = {
/* Agilent N5763A */
{ "Agilent", "N5763A", SCPI_DIALECT_UNKNOWN, 0,
@ -1441,7 +1425,7 @@ SR_PRIV const struct scpi_pps pps_profiles[] = {
rs_hmp4040_cg, 3,
rs_hmp4040_cmd,
.probe_channels = NULL,
.init_acquisition = rs_hmp_init_acquisition,
.init_acquisition = NULL,
.update_status = NULL,
},
{ "HAMEG", "HMP4040", SCPI_DIALECT_HMP, 0,
@ -1451,7 +1435,7 @@ SR_PRIV const struct scpi_pps pps_profiles[] = {
ARRAY_AND_SIZE(rs_hmp4040_cg),
rs_hmp4040_cmd,
.probe_channels = NULL,
.init_acquisition = rs_hmp_init_acquisition,
.init_acquisition = NULL,
.update_status = NULL,
},
{ "ROHDE&SCHWARZ", "HMP4030", SCPI_DIALECT_HMP, 0,
@ -1461,7 +1445,7 @@ SR_PRIV const struct scpi_pps pps_profiles[] = {
rs_hmp4040_cg, 3,
rs_hmp4040_cmd,
.probe_channels = NULL,
.init_acquisition = rs_hmp_init_acquisition,
.init_acquisition = NULL,
.update_status = NULL,
},
{ "ROHDE&SCHWARZ", "HMP4040", SCPI_DIALECT_HMP, 0,
@ -1471,7 +1455,7 @@ SR_PRIV const struct scpi_pps pps_profiles[] = {
ARRAY_AND_SIZE(rs_hmp4040_cg),
rs_hmp4040_cmd,
.probe_channels = NULL,
.init_acquisition = rs_hmp_init_acquisition,
.init_acquisition = NULL,
.update_status = NULL,
},
};