X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fscpi-pps%2Fprofiles.c;h=b05602a4f60b3718edf6130c7dc602b01d21cbe0;hb=331f56543a10dddf261ab1208ed5c28ad418463a;hp=de00684b3f9c47a9764e7dc95dfae4062d97b693;hpb=22c18b03707834251b14a4f77d92aee19188dcbc;p=libsigrok.git diff --git a/src/hardware/scpi-pps/profiles.c b/src/hardware/scpi-pps/profiles.c index de00684b..b05602a4 100644 --- a/src/hardware/scpi-pps/profiles.c +++ b/src/hardware/scpi-pps/profiles.c @@ -24,6 +24,7 @@ const char *pps_vendors[][2] = { { "RIGOL TECHNOLOGIES", "Rigol" }, + { "HEWLETT-PACKARD", "HP" }, }; const char *get_vendor(const char *raw_vendor) @@ -39,13 +40,13 @@ const char *get_vendor(const char *raw_vendor) } /* Rigol DP800 series */ -static const int32_t devopts_rigol_dp800[] = { +static const int32_t rigol_dp800_devopts[] = { SR_CONF_POWER_SUPPLY, SR_CONF_CONTINUOUS, SR_CONF_OVER_TEMPERATURE_PROTECTION, }; -static const int32_t devopts_cg_rigol_dp800[] = { +static const int32_t rigol_dp800_devopts_cg[] = { SR_CONF_OUTPUT_REGULATION, SR_CONF_OVER_VOLTAGE_PROTECTION_ENABLED, SR_CONF_OVER_VOLTAGE_PROTECTION_ACTIVE, @@ -60,19 +61,25 @@ static const int32_t devopts_cg_rigol_dp800[] = { SR_CONF_OUTPUT_ENABLED, }; -struct channel_spec ch_rigol_dp800[] = { - { "1", { 0, 30, 0.010 }, { 0, 3, 0.010 } }, - { "2", { 0, 30, 0.010 }, { 0, 3, 0.010 } }, - { "3", { 0, 5, 0.010 }, { 0, 3, 0.010 } }, +struct channel_spec rigol_dp831_ch[] = { + { "1", { 0, 8, 0.001 }, { 0, 5, 0.0003 } }, + { "2", { 0, 30, 0.001 }, { 0, 2, 0.0001 } }, + { "3", { 0, -30, 0.001 }, { 0, 2, 0.0001 } }, }; -struct channel_group_spec cg_rigol_dp800[] = { +struct channel_spec rigol_dp832_ch[] = { + { "1", { 0, 30, 0.001 }, { 0, 3, 0.001 } }, + { "2", { 0, 30, 0.001 }, { 0, 3, 0.001 } }, + { "3", { 0, 5, 0.001 }, { 0, 3, 0.001 } }, +}; + +struct channel_group_spec rigol_dp800_cg[] = { { "1", CH_IDX(0), PPS_OVP | PPS_OCP }, { "2", CH_IDX(1), PPS_OVP | PPS_OCP }, { "3", CH_IDX(2), PPS_OVP | PPS_OCP }, }; -struct scpi_command cmd_rigol_dp800[] = { +struct scpi_command rigol_dp800_cmd[] = { { SCPI_CMD_KEY_UNLOCK, "SYST:KLOCK OFF" }, { SCPI_CMD_GET_MEAS_VOLTAGE, ":MEAS:VOLT? CH%s" }, { SCPI_CMD_GET_MEAS_CURRENT, ":MEAS:CURR? CH%s" }, @@ -98,14 +105,74 @@ struct scpi_command cmd_rigol_dp800[] = { { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_THRESHOLD, ":OUTP:OCP:VAL CH%s,%.6f" }, }; +/* HP 663x series */ +static const int32_t hp_6632b_devopts[] = { + SR_CONF_POWER_SUPPLY, + SR_CONF_CONTINUOUS, + SR_CONF_OUTPUT_ENABLED, + SR_CONF_OUTPUT_VOLTAGE, + SR_CONF_OUTPUT_CURRENT, + SR_CONF_OUTPUT_VOLTAGE_MAX, + SR_CONF_OUTPUT_CURRENT_MAX, +// SR_CONF_OVER_TEMPERATURE_PROTECTION, +}; + +static const int32_t hp_6632b_devopts_cg[] = { +/* + SR_CONF_OVER_CURRENT_PROTECTION_ENABLED, + SR_CONF_OVER_VOLTAGE_PROTECTION_THRESHOLD, + SR_CONF_OUTPUT_REGULATION, + SR_CONF_OVER_VOLTAGE_PROTECTION_ENABLED, + SR_CONF_OVER_VOLTAGE_PROTECTION_ACTIVE, + SR_CONF_OVER_CURRENT_PROTECTION_ACTIVE, + SR_CONF_OVER_CURRENT_PROTECTION_THRESHOLD, +*/ +}; + +struct channel_spec hp_6632b_ch[] = { + { "1", { 0, 20.475, 0.005 }, { 0, 5.1188, 0.00132 } }, +}; + +struct channel_group_spec hp_6632b_cg[] = { + { "1", CH_IDX(0), 0 }, +}; + +struct scpi_command hp_6632b_cmd[] = { + { SCPI_CMD_GET_OUTPUT_ENABLED, "OUTP:STAT?" }, + { SCPI_CMD_SET_OUTPUT_ENABLED, "OUTP:STAT %s" }, + { SCPI_CMD_GET_MEAS_VOLTAGE, ":MEAS:VOLT?" }, + { SCPI_CMD_GET_MEAS_CURRENT, ":MEAS:CURR?" }, + { SCPI_CMD_GET_VOLTAGE_MAX, ":SOUR:VOLT?" }, + { SCPI_CMD_SET_VOLTAGE_MAX, ":SOUR:VOLT %.6f" }, + { SCPI_CMD_GET_CURRENT_MAX, ":SOUR:CURR?" }, + { SCPI_CMD_SET_CURRENT_MAX, ":SOUR:CURR %.6f" }, +}; + + SR_PRIV const struct scpi_pps pps_profiles[] = { + /* HP 6632B */ + { "HP", "6632B", 0, + ARRAY_AND_SIZE(hp_6632b_devopts), + ARRAY_AND_SIZE(hp_6632b_devopts_cg), + ARRAY_AND_SIZE(hp_6632b_ch), + ARRAY_AND_SIZE(hp_6632b_cg), + ARRAY_AND_SIZE(hp_6632b_cmd), + }, + /* Rigol DP800 series */ - { "Rigol", "DP832", PPS_OTP, - ARRAY_AND_SIZE(devopts_rigol_dp800), - ARRAY_AND_SIZE(devopts_cg_rigol_dp800), - ARRAY_AND_SIZE(ch_rigol_dp800), - ARRAY_AND_SIZE(cg_rigol_dp800), - ARRAY_AND_SIZE(cmd_rigol_dp800), + { "Rigol", "^DP831A$", PPS_OTP, + ARRAY_AND_SIZE(rigol_dp800_devopts), + ARRAY_AND_SIZE(rigol_dp800_devopts_cg), + ARRAY_AND_SIZE(rigol_dp831_ch), + ARRAY_AND_SIZE(rigol_dp800_cg), + ARRAY_AND_SIZE(rigol_dp800_cmd), + }, + { "Rigol", "^(DP832|DP832A)$", PPS_OTP, + ARRAY_AND_SIZE(rigol_dp800_devopts), + ARRAY_AND_SIZE(rigol_dp800_devopts_cg), + ARRAY_AND_SIZE(rigol_dp832_ch), + ARRAY_AND_SIZE(rigol_dp800_cg), + ARRAY_AND_SIZE(rigol_dp800_cmd), }, }; SR_PRIV unsigned int num_pps_profiles = ARRAY_SIZE(pps_profiles);