cmd = SCPI_CMD_GET_OVER_VOLTAGE_PROTECTION_ENABLED;
break;
case SR_CONF_OVER_VOLTAGE_PROTECTION_ACTIVE:
- if (devc->device->dialect == SCPI_DIALECT_HP_66XXB)
+ if (devc->device->dialect == SCPI_DIALECT_HP_66XXB ||
+ devc->device->dialect == SCPI_DIALECT_HP_COMP)
gvtype = G_VARIANT_TYPE_STRING;
else
gvtype = G_VARIANT_TYPE_BOOLEAN;
cmd = SCPI_CMD_GET_OVER_CURRENT_PROTECTION_ENABLED;
break;
case SR_CONF_OVER_CURRENT_PROTECTION_ACTIVE:
- if (devc->device->dialect == SCPI_DIALECT_HP_66XXB)
+ if (devc->device->dialect == SCPI_DIALECT_HP_66XXB ||
+ devc->device->dialect == SCPI_DIALECT_HP_COMP)
gvtype = G_VARIANT_TYPE_STRING;
else
gvtype = G_VARIANT_TYPE_BOOLEAN;
cmd = SCPI_CMD_GET_OVER_TEMPERATURE_PROTECTION;
break;
case SR_CONF_OVER_TEMPERATURE_PROTECTION_ACTIVE:
- if (devc->device->dialect == SCPI_DIALECT_HP_66XXB)
+ if (devc->device->dialect == SCPI_DIALECT_HP_66XXB ||
+ devc->device->dialect == SCPI_DIALECT_HP_COMP)
gvtype = G_VARIANT_TYPE_STRING;
else
gvtype = G_VARIANT_TYPE_BOOLEAN;
}
if (cmd == SCPI_CMD_GET_OVER_VOLTAGE_PROTECTION_ACTIVE) {
+ if (devc->device->dialect == SCPI_DIALECT_HP_COMP) {
+ /* Evaluate Status Register from a HP 66xx in COMP mode. */
+ s = g_variant_get_string(*data, NULL);
+ sr_atoi(s, ®);
+ g_variant_unref(*data);
+ *data = g_variant_new_boolean(reg & (1 << 3));
+ }
if (devc->device->dialect == SCPI_DIALECT_HP_66XXB) {
/* Evaluate Questionable Status Register bit 0 from a HP 66xxB. */
s = g_variant_get_string(*data, NULL);
}
if (cmd == SCPI_CMD_GET_OVER_CURRENT_PROTECTION_ACTIVE) {
+ if (devc->device->dialect == SCPI_DIALECT_HP_COMP) {
+ /* Evaluate Status Register from a HP 66xx in COMP mode. */
+ s = g_variant_get_string(*data, NULL);
+ sr_atoi(s, ®);
+ g_variant_unref(*data);
+ *data = g_variant_new_boolean(reg & (1 << 6));
+ }
if (devc->device->dialect == SCPI_DIALECT_HP_66XXB) {
/* Evaluate Questionable Status Register bit 1 from a HP 66xxB. */
s = g_variant_get_string(*data, NULL);
}
if (cmd == SCPI_CMD_GET_OVER_TEMPERATURE_PROTECTION_ACTIVE) {
+ if (devc->device->dialect == SCPI_DIALECT_HP_COMP) {
+ /* Evaluate Status Register from a HP 66xx in COMP mode. */
+ s = g_variant_get_string(*data, NULL);
+ sr_atoi(s, ®);
+ g_variant_unref(*data);
+ *data = g_variant_new_boolean(reg & (1 << 4));
+ }
if (devc->device->dialect == SCPI_DIALECT_HP_66XXB) {
/* Evaluate Questionable Status Register bit 4 from a HP 66xxB. */
s = g_variant_get_string(*data, NULL);
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,
};
{ 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_SET_OVER_VOLTAGE_PROTECTION_THRESHOLD, "OVSET %.4f" },
+ { SCPI_CMD_GET_OVER_CURRENT_PROTECTION_ACTIVE, "STS?" },
+ { SCPI_CMD_GET_OVER_TEMPERATURE_PROTECTION_ACTIVE, "STS?" },
{ SCPI_CMD_GET_OUTPUT_REGULATION, "STS?" },
ALL_ZERO
};