X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fscpi-pps%2Fprofiles.c;h=716d783a901069496c716472d29e61b7e903e376;hb=f083ae63c7355b9b1d99775785b99b6fa91cd48a;hp=a83e0396d2619b58bd15cf4915155e835a02316c;hpb=f2bbcc330a6bcb65500b298bec8c40974ed246d4;p=libsigrok.git diff --git a/src/hardware/scpi-pps/profiles.c b/src/hardware/scpi-pps/profiles.c index a83e0396..716d783a 100644 --- a/src/hardware/scpi-pps/profiles.c +++ b/src/hardware/scpi-pps/profiles.c @@ -429,7 +429,7 @@ static const struct scpi_command rigol_dp800_cmd[] = { ALL_ZERO }; -/* HP 663xx series */ +/* HP 663xA series */ static const uint32_t hp_6630a_devopts[] = { SR_CONF_CONTINUOUS, SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET, @@ -442,10 +442,40 @@ static const uint32_t hp_6630a_devopts_cg[] = { SR_CONF_CURRENT | SR_CONF_GET, SR_CONF_VOLTAGE_TARGET | SR_CONF_SET | SR_CONF_LIST, SR_CONF_CURRENT_LIMIT | SR_CONF_SET | SR_CONF_LIST, + SR_CONF_OVER_VOLTAGE_PROTECTION_ACTIVE | SR_CONF_GET, SR_CONF_OVER_VOLTAGE_PROTECTION_THRESHOLD | SR_CONF_SET | SR_CONF_LIST, SR_CONF_OVER_CURRENT_PROTECTION_ENABLED | SR_CONF_SET, + SR_CONF_OVER_CURRENT_PROTECTION_ACTIVE | SR_CONF_GET, + SR_CONF_OVER_TEMPERATURE_PROTECTION_ACTIVE | SR_CONF_GET, + SR_CONF_REGULATION | SR_CONF_GET, +}; + +static const struct channel_spec hp_6633a_ch[] = { + { "1", { 0, 51.188, 0.0125, 3, 4 }, { 0, 2.0475, 0.0005, 4, 5 }, { 0, 104.80743 }, FREQ_DC_ONLY, { 0, 55, 0.25 }, NO_OCP_LIMITS }, +}; + +static const struct channel_group_spec hp_6630a_cg[] = { + { "1", CH_IDX(0), PPS_OVP | PPS_OCP, SR_MQFLAG_DC }, +}; + +static const struct scpi_command hp_6630a_cmd[] = { + { SCPI_CMD_SET_OUTPUT_ENABLE, "OUT 1" }, + { SCPI_CMD_SET_OUTPUT_DISABLE, "OUT 0" }, + { SCPI_CMD_GET_MEAS_VOLTAGE, "VOUT?" }, + { SCPI_CMD_GET_MEAS_CURRENT, "IOUT?" }, + { SCPI_CMD_SET_VOLTAGE_TARGET, "VSET %.4f" }, + { SCPI_CMD_SET_CURRENT_LIMIT, "ISET %.4f" }, + { SCPI_CMD_GET_OVER_VOLTAGE_PROTECTION_ACTIVE, "STS?" }, + { SCPI_CMD_SET_OVER_VOLTAGE_PROTECTION_THRESHOLD, "OVSET %.4f" }, + { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_ENABLE, "OCP 1" }, + { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_DISABLE, "OCP 0" }, + { SCPI_CMD_GET_OVER_CURRENT_PROTECTION_ACTIVE, "STS?" }, + { SCPI_CMD_GET_OVER_TEMPERATURE_PROTECTION_ACTIVE, "STS?" }, + { SCPI_CMD_GET_OUTPUT_REGULATION, "STS?" }, + ALL_ZERO }; +/* HP 663xB series */ static const uint32_t hp_6630b_devopts[] = { SR_CONF_CONTINUOUS, SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET, @@ -466,10 +496,6 @@ static const uint32_t hp_6630b_devopts_cg[] = { SR_CONF_REGULATION | SR_CONF_GET, }; -static const struct channel_spec hp_6633a_ch[] = { - { "1", { 0, 51.188, 0.0125, 3, 4 }, { 0, 2.0475, 0.0005, 4, 5 }, { 0, 104.80743 }, FREQ_DC_ONLY, { 0, 55, 0.25 }, NO_OCP_LIMITS }, -}; - static const struct channel_spec hp_6631b_ch[] = { { "1", { 0, 8.19, 0.002, 3, 4 }, { 0, 10.237, 0.00263, 4, 5 }, { 0, 83.84103 }, FREQ_DC_ONLY, { 0, 12, 0.06 }, NO_OCP_LIMITS }, }; @@ -490,21 +516,8 @@ static const struct channel_spec hp_6634b_ch[] = { { "1", { 0, 102.38, 0.025, 3, 4 }, { 0, 1.0238, 0.000263, 4, 5 }, { 0, 104.81664 }, FREQ_DC_ONLY, { 0, 110, 0.5 }, NO_OCP_LIMITS }, }; -static const struct channel_group_spec hp_663xx_cg[] = { - { "1", CH_IDX(0), 0, SR_MQFLAG_DC }, -}; - -static const struct scpi_command hp_6630a_cmd[] = { - { SCPI_CMD_SET_OUTPUT_ENABLE, "OUT 1" }, - { SCPI_CMD_SET_OUTPUT_DISABLE, "OUT 0" }, - { SCPI_CMD_GET_MEAS_VOLTAGE, "VOUT?" }, - { SCPI_CMD_GET_MEAS_CURRENT, "IOUT?" }, - { SCPI_CMD_SET_VOLTAGE_TARGET, "VSET %.4f" }, - { SCPI_CMD_SET_CURRENT_LIMIT, "ISET %.4f" }, - { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_ENABLE, "OCP 1" }, - { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_DISABLE, "OCP 0" }, - { SCPI_CMD_SET_OVER_VOLTAGE_PROTECTION_THRESHOLD, "OVSET %.4f" }, - ALL_ZERO +static const struct channel_group_spec hp_6630b_cg[] = { + { "1", CH_IDX(0), PPS_OVP | PPS_OCP, SR_MQFLAG_DC }, }; static const struct scpi_command hp_6630b_cmd[] = { @@ -970,7 +983,7 @@ SR_PRIV const struct scpi_pps pps_profiles[] = { ARRAY_AND_SIZE(hp_6630a_devopts), ARRAY_AND_SIZE(hp_6630a_devopts_cg), ARRAY_AND_SIZE(hp_6633a_ch), - ARRAY_AND_SIZE(hp_663xx_cg), + ARRAY_AND_SIZE(hp_6630a_cg), hp_6630a_cmd, .probe_channels = NULL, .init_aquisition = NULL, @@ -978,11 +991,11 @@ SR_PRIV const struct scpi_pps pps_profiles[] = { }, /* HP 6631B */ - { "HP", "6631B", SCPI_DIALECT_HP_66XXB, PPS_OVP | PPS_OCP | PPS_OTP, + { "HP", "6631B", SCPI_DIALECT_HP_66XXB, PPS_OTP, ARRAY_AND_SIZE(hp_6630b_devopts), ARRAY_AND_SIZE(hp_6630b_devopts_cg), ARRAY_AND_SIZE(hp_6631b_ch), - ARRAY_AND_SIZE(hp_663xx_cg), + ARRAY_AND_SIZE(hp_6630b_cg), hp_6630b_cmd, .probe_channels = NULL, hp_6630b_init_aquisition, @@ -990,11 +1003,11 @@ SR_PRIV const struct scpi_pps pps_profiles[] = { }, /* HP 6632B */ - { "HP", "6632B", SCPI_DIALECT_HP_66XXB, PPS_OVP | PPS_OCP | PPS_OTP, + { "HP", "6632B", SCPI_DIALECT_HP_66XXB, PPS_OTP, ARRAY_AND_SIZE(hp_6630b_devopts), ARRAY_AND_SIZE(hp_6630b_devopts_cg), ARRAY_AND_SIZE(hp_6632b_ch), - ARRAY_AND_SIZE(hp_663xx_cg), + ARRAY_AND_SIZE(hp_6630b_cg), hp_6630b_cmd, .probe_channels = NULL, hp_6630b_init_aquisition, @@ -1002,11 +1015,11 @@ SR_PRIV const struct scpi_pps pps_profiles[] = { }, /* HP 66332A */ - { "HP", "66332A", SCPI_DIALECT_HP_66XXB, PPS_OVP | PPS_OCP | PPS_OTP, + { "HP", "66332A", SCPI_DIALECT_HP_66XXB, PPS_OTP, ARRAY_AND_SIZE(hp_6630b_devopts), ARRAY_AND_SIZE(hp_6630b_devopts_cg), ARRAY_AND_SIZE(hp_66332a_ch), - ARRAY_AND_SIZE(hp_663xx_cg), + ARRAY_AND_SIZE(hp_6630b_cg), hp_6630b_cmd, .probe_channels = NULL, hp_6630b_init_aquisition, @@ -1014,11 +1027,11 @@ SR_PRIV const struct scpi_pps pps_profiles[] = { }, /* HP 6633B */ - { "HP", "6633B", SCPI_DIALECT_HP_66XXB, PPS_OVP | PPS_OCP | PPS_OTP, + { "HP", "6633B", SCPI_DIALECT_HP_66XXB, PPS_OTP, ARRAY_AND_SIZE(hp_6630b_devopts), ARRAY_AND_SIZE(hp_6630b_devopts_cg), ARRAY_AND_SIZE(hp_6633b_ch), - ARRAY_AND_SIZE(hp_663xx_cg), + ARRAY_AND_SIZE(hp_6630b_cg), hp_6630b_cmd, .probe_channels = NULL, hp_6630b_init_aquisition, @@ -1026,11 +1039,11 @@ SR_PRIV const struct scpi_pps pps_profiles[] = { }, /* HP 6634B */ - { "HP", "6634B", SCPI_DIALECT_HP_66XXB, PPS_OVP | PPS_OCP | PPS_OTP, + { "HP", "6634B", SCPI_DIALECT_HP_66XXB, PPS_OTP, ARRAY_AND_SIZE(hp_6630b_devopts), ARRAY_AND_SIZE(hp_6630b_devopts_cg), ARRAY_AND_SIZE(hp_6634b_ch), - ARRAY_AND_SIZE(hp_663xx_cg), + ARRAY_AND_SIZE(hp_6630b_cg), hp_6630b_cmd, .probe_channels = NULL, hp_6630b_init_aquisition,