]> sigrok.org Git - libsigrok.git/commitdiff
Use SR_CONF_OUTPUT_VOLTAGE_TARGET and _CURRENT_LIMIT.
authorBert Vermeulen <redacted>
Wed, 15 Oct 2014 10:03:00 +0000 (12:03 +0200)
committerBert Vermeulen <redacted>
Wed, 15 Oct 2014 10:03:00 +0000 (12:03 +0200)
These describe them better; the two are fundamentally different
things to set.

include/libsigrok/libsigrok.h
src/hardware/atten-pps3xxx/api.c
src/hardware/manson-hcs-3xxx/api.c
src/hardware/motech-lps-30x/api.c
src/hardware/scpi-pps/api.c
src/hardware/scpi-pps/profiles.c
src/hardware/scpi-pps/protocol.h
src/hwdriver.c

index 124c74492dad1c7e1cfa0c49f395ec57028aac66..499ee6c4fd985f667f7a04c8e66b6ef885249a42 100644 (file)
@@ -704,32 +704,32 @@ enum sr_configkey {
        /**
         * Output voltage.
         * @arg type: double
-        * @arg get: get output voltage
+        * @arg get: get measured output voltage
         */
        SR_CONF_OUTPUT_VOLTAGE,
 
        /**
-        * Maximum output voltage.
+        * Maximum output voltage target.
         * @arg type: double
-        * @arg get: get maximum output voltage limit
-        * @arg set: change output voltage limit
+        * @arg get: get output voltage target
+        * @arg set: change output voltage target
         */
-       SR_CONF_OUTPUT_VOLTAGE_MAX,
+       SR_CONF_OUTPUT_VOLTAGE_TARGET,
 
        /**
         * Output current.
         * @arg type: double
-        * @arg get: get output current
+        * @arg get: get measured output current
         */
        SR_CONF_OUTPUT_CURRENT,
 
        /**
-        * Maximum output current.
+        * Output current limit.
         * @arg type: double
-        * @arg get: get maximum output voltage limit
-        * @arg set: change output voltage limit
+        * @arg get: get output current limit
+        * @arg set: change output current limit
         */
-       SR_CONF_OUTPUT_CURRENT_MAX,
+       SR_CONF_OUTPUT_CURRENT_LIMIT,
 
        /**
         * Enabling/disabling output.
index 5bbafca8c3a6b88ca102804b50a5e5c15c3dc0ba..2b70fb536ff6c6ae910fd34919610ce84264160d 100644 (file)
@@ -45,9 +45,9 @@ static const uint32_t devopts[] = {
 
 static const uint32_t devopts_cg[] = {
        SR_CONF_OUTPUT_VOLTAGE | SR_CONF_GET,
-       SR_CONF_OUTPUT_VOLTAGE_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_OUTPUT_VOLTAGE_TARGET | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
        SR_CONF_OUTPUT_CURRENT | SR_CONF_GET,
-       SR_CONF_OUTPUT_CURRENT_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_OUTPUT_CURRENT_LIMIT | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
        SR_CONF_OUTPUT_ENABLED | SR_CONF_GET | SR_CONF_SET,
 };
 
@@ -240,13 +240,13 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
                case SR_CONF_OUTPUT_VOLTAGE:
                        *data = g_variant_new_double(devc->config[channel].output_voltage_last);
                        break;
-               case SR_CONF_OUTPUT_VOLTAGE_MAX:
+               case SR_CONF_OUTPUT_VOLTAGE_TARGET:
                        *data = g_variant_new_double(devc->config[channel].output_voltage_max);
                        break;
                case SR_CONF_OUTPUT_CURRENT:
                        *data = g_variant_new_double(devc->config[channel].output_current_last);
                        break;
-               case SR_CONF_OUTPUT_CURRENT_MAX:
+               case SR_CONF_OUTPUT_CURRENT_LIMIT:
                        *data = g_variant_new_double(devc->config[channel].output_current_max);
                        break;
                case SR_CONF_OUTPUT_ENABLED:
@@ -328,14 +328,14 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
                channel = ch->index;
 
                switch (key) {
-               case SR_CONF_OUTPUT_VOLTAGE_MAX:
+               case SR_CONF_OUTPUT_VOLTAGE_TARGET:
                        dval = g_variant_get_double(data);
                        if (dval < 0 || dval > devc->model->channels[channel].voltage[1])
                                ret = SR_ERR_ARG;
                        devc->config[channel].output_voltage_max = dval;
                        devc->config_dirty = TRUE;
                        break;
-               case SR_CONF_OUTPUT_CURRENT_MAX:
+               case SR_CONF_OUTPUT_CURRENT_LIMIT:
                        dval = g_variant_get_double(data);
                        if (dval < 0 || dval > devc->model->channels[channel].current[1])
                                ret = SR_ERR_ARG;
@@ -412,7 +412,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
                        *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
                                        devopts_cg, ARRAY_SIZE(devopts_cg), sizeof(uint32_t));
                        break;
-               case SR_CONF_OUTPUT_VOLTAGE_MAX:
+               case SR_CONF_OUTPUT_VOLTAGE_TARGET:
                        g_variant_builder_init(&gvb, G_VARIANT_TYPE_ARRAY);
                        /* Min, max, step. */
                        for (i = 0; i < 3; i++) {
@@ -421,7 +421,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
                        }
                        *data = g_variant_builder_end(&gvb);
                        break;
-               case SR_CONF_OUTPUT_CURRENT_MAX:
+               case SR_CONF_OUTPUT_CURRENT_LIMIT:
                        g_variant_builder_init(&gvb, G_VARIANT_TYPE_ARRAY);
                        /* Min, max, step. */
                        for (i = 0; i < 3; i++) {
index b0dc27338371870c1f3ea0a16c6e375ce7062d76..fad2e8dae6f161c9b7a6cef4a5510d7b17f7554c 100644 (file)
@@ -39,11 +39,11 @@ static const uint32_t devopts[] = {
        SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
        SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
        /* Device configuration */
+       SR_CONF_OUTPUT_VOLTAGE | SR_CONF_GET,
+       SR_CONF_OUTPUT_VOLTAGE_TARGET | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
        SR_CONF_OUTPUT_CURRENT | SR_CONF_GET,
-       SR_CONF_OUTPUT_CURRENT_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_OUTPUT_CURRENT_LIMIT | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
        SR_CONF_OUTPUT_ENABLED | SR_CONF_GET | SR_CONF_SET,
-       SR_CONF_OUTPUT_VOLTAGE | SR_CONF_GET,
-       SR_CONF_OUTPUT_VOLTAGE_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
 };
 
 /* Note: All models have one power supply output only. */
@@ -235,21 +235,21 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
        case SR_CONF_LIMIT_MSEC:
                *data = g_variant_new_uint64(devc->limit_msec);
                break;
+       case SR_CONF_OUTPUT_VOLTAGE:
+               *data = g_variant_new_double(devc->voltage);
+               break;
+       case SR_CONF_OUTPUT_VOLTAGE_TARGET:
+               *data = g_variant_new_double(devc->voltage_max);
+               break;
        case SR_CONF_OUTPUT_CURRENT:
                *data = g_variant_new_double(devc->current);
                break;
-       case SR_CONF_OUTPUT_CURRENT_MAX:
+       case SR_CONF_OUTPUT_CURRENT_LIMIT:
                *data = g_variant_new_double(devc->current_max);
                break;
        case SR_CONF_OUTPUT_ENABLED:
                *data = g_variant_new_boolean(devc->output_enabled);
                break;
-       case SR_CONF_OUTPUT_VOLTAGE:
-               *data = g_variant_new_double(devc->voltage);
-               break;
-       case SR_CONF_OUTPUT_VOLTAGE_MAX:
-               *data = g_variant_new_double(devc->voltage_max);
-               break;
        default:
                return SR_ERR_NA;
        }
@@ -282,7 +282,18 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
                        return SR_ERR_ARG;
                devc->limit_samples = g_variant_get_uint64(data);
                break;
-       case SR_CONF_OUTPUT_CURRENT_MAX:
+       case SR_CONF_OUTPUT_VOLTAGE_TARGET:
+               dval = g_variant_get_double(data);
+               if (dval < devc->model->voltage[0] || dval > devc->voltage_max_device)
+                       return SR_ERR_ARG;
+
+               if ((hcs_send_cmd(sdi->conn, "VOLT%03.0f\r",
+                       (dval / devc->model->voltage[2])) < 0) ||
+                   (hcs_read_reply(sdi->conn, 1, devc->buf, sizeof(devc->buf)) < 0))
+                       return SR_ERR;
+               devc->voltage_max = dval;
+               break;
+       case SR_CONF_OUTPUT_CURRENT_LIMIT:
                dval = g_variant_get_double(data);
                if (dval < devc->model->current[0] || dval > devc->current_max_device)
                        return SR_ERR_ARG;
@@ -302,17 +313,6 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
                        return SR_ERR;
                devc->output_enabled = bval;
                break;
-       case SR_CONF_OUTPUT_VOLTAGE_MAX:
-               dval = g_variant_get_double(data);
-               if (dval < devc->model->voltage[0] || dval > devc->voltage_max_device)
-                       return SR_ERR_ARG;
-
-               if ((hcs_send_cmd(sdi->conn, "VOLT%03.0f\r",
-                       (dval / devc->model->voltage[2])) < 0) ||
-                   (hcs_read_reply(sdi->conn, 1, devc->buf, sizeof(devc->buf)) < 0))
-                       return SR_ERR;
-               devc->voltage_max = dval;
-               break;
        default:
                return SR_ERR_NA;
        }
@@ -344,27 +344,27 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
                *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
                                devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
                break;
-       case SR_CONF_OUTPUT_CURRENT_MAX:
+       case SR_CONF_OUTPUT_VOLTAGE_TARGET:
                g_variant_builder_init(&gvb, G_VARIANT_TYPE_ARRAY);
                /* Min, max, step. */
                for (idx = 0; idx < 3; idx++) {
                        if (idx == 1)
-                               dval = devc->current_max_device;
+                               dval = devc->voltage_max_device;
                        else
-                               dval = devc->model->current[idx];
+                               dval = devc->model->voltage[idx];
                        gvar = g_variant_new_double(dval);
                        g_variant_builder_add_value(&gvb, gvar);
                }
                *data = g_variant_builder_end(&gvb);
                break;
-       case SR_CONF_OUTPUT_VOLTAGE_MAX:
+       case SR_CONF_OUTPUT_CURRENT_LIMIT:
                g_variant_builder_init(&gvb, G_VARIANT_TYPE_ARRAY);
                /* Min, max, step. */
                for (idx = 0; idx < 3; idx++) {
                        if (idx == 1)
-                               dval = devc->voltage_max_device;
+                               dval = devc->current_max_device;
                        else
-                               dval = devc->model->voltage[idx];
+                               dval = devc->model->current[idx];
                        gvar = g_variant_new_double(dval);
                        g_variant_builder_add_value(&gvb, gvar);
                }
index 81ae3ef66aadfeaa224ea263949f804eb7003ecb..bcbc2954310882e3b184a3fb011b594cbba34f2a 100644 (file)
@@ -64,9 +64,9 @@ static const uint32_t devopts[] = {
 /** Hardware capabilities channel 1, 2. */
 static const uint32_t devopts_ch12[] = {
        SR_CONF_OUTPUT_VOLTAGE | SR_CONF_GET,
-       SR_CONF_OUTPUT_VOLTAGE_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_OUTPUT_VOLTAGE_TARGET | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
        SR_CONF_OUTPUT_CURRENT | SR_CONF_GET,
-       SR_CONF_OUTPUT_CURRENT_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_OUTPUT_CURRENT_LIMIT | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
        SR_CONF_OUTPUT_ENABLED | SR_CONF_GET | SR_CONF_SET,
 };
 
@@ -575,13 +575,13 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
                case SR_CONF_OUTPUT_VOLTAGE:
                        *data = g_variant_new_double(devc->channel_status[ch_idx].output_voltage_last);
                        break;
-               case SR_CONF_OUTPUT_VOLTAGE_MAX:
+               case SR_CONF_OUTPUT_VOLTAGE_TARGET:
                        *data = g_variant_new_double(devc->channel_status[ch_idx].output_voltage_max);
                        break;
                case SR_CONF_OUTPUT_CURRENT:
                        *data = g_variant_new_double(devc->channel_status[ch_idx].output_current_last);
                        break;
-               case SR_CONF_OUTPUT_CURRENT_MAX:
+               case SR_CONF_OUTPUT_CURRENT_LIMIT:
                        *data = g_variant_new_double(devc->channel_status[ch_idx].output_current_max);
                        break;
                case SR_CONF_OUTPUT_ENABLED:
@@ -664,7 +664,7 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
                ch_idx = ch->index;
 
                switch (key) {
-               case SR_CONF_OUTPUT_VOLTAGE_MAX:
+               case SR_CONF_OUTPUT_VOLTAGE_TARGET:
                        dval = g_variant_get_double(data);
                        if (dval < 0 || dval > devc->model->channels[ch_idx].voltage[1])
                                return SR_ERR_ARG;
@@ -685,7 +685,7 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
                        else
                                return lps_cmd_ok(sdi->conn, "VSET%d %05.3f", ch_idx+1, dval);
                        break;
-               case SR_CONF_OUTPUT_CURRENT_MAX:
+               case SR_CONF_OUTPUT_CURRENT_LIMIT:
                        dval = g_variant_get_double(data);
                        if (dval < 0 || dval > devc->model->channels[ch_idx].current[1])
                                return SR_ERR_ARG;
@@ -775,7 +775,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
                        *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
                                  devopts_ch3, ARRAY_SIZE(devopts_ch3), sizeof(uint32_t));
                break;
-       case SR_CONF_OUTPUT_VOLTAGE_MAX:
+       case SR_CONF_OUTPUT_VOLTAGE_TARGET:
                g_variant_builder_init(&gvb, G_VARIANT_TYPE_ARRAY);
                /* Min, max, step. */
                for (i = 0; i < 3; i++) {
@@ -784,7 +784,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
                }
                *data = g_variant_builder_end(&gvb);
                break;
-       case SR_CONF_OUTPUT_CURRENT_MAX:
+       case SR_CONF_OUTPUT_CURRENT_LIMIT:
                g_variant_builder_init(&gvb, G_VARIANT_TYPE_ARRAY);
                /* Min, max, step. */
                for (i = 0; i < 3; i++) {
index 4c5e9afc96f547ee09e5919b5d01469f64d9df9a..addf610df57bd66db09ae20fb6e58aa82eca4c5f 100644 (file)
@@ -242,17 +242,17 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
                gvtype = G_VARIANT_TYPE_DOUBLE;
                cmd = SCPI_CMD_GET_MEAS_VOLTAGE;
                break;
-       case SR_CONF_OUTPUT_VOLTAGE_MAX:
+       case SR_CONF_OUTPUT_VOLTAGE_TARGET:
                gvtype = G_VARIANT_TYPE_DOUBLE;
-               cmd = SCPI_CMD_GET_VOLTAGE_MAX;
+               cmd = SCPI_CMD_GET_VOLTAGE_TARGET;
                break;
        case SR_CONF_OUTPUT_CURRENT:
                gvtype = G_VARIANT_TYPE_DOUBLE;
                cmd = SCPI_CMD_GET_MEAS_CURRENT;
                break;
-       case SR_CONF_OUTPUT_CURRENT_MAX:
+       case SR_CONF_OUTPUT_CURRENT_LIMIT:
                gvtype = G_VARIANT_TYPE_DOUBLE;
-               cmd = SCPI_CMD_GET_CURRENT_MAX;
+               cmd = SCPI_CMD_GET_CURRENT_LIMIT;
                break;
        case SR_CONF_OVER_VOLTAGE_PROTECTION_ENABLED:
                gvtype = G_VARIANT_TYPE_BOOLEAN;
@@ -337,13 +337,13 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
                        else
                                ret = scpi_cmd(sdi, SCPI_CMD_SET_OUTPUT_DISABLE);
                        break;
-               case SR_CONF_OUTPUT_VOLTAGE_MAX:
+               case SR_CONF_OUTPUT_VOLTAGE_TARGET:
                        d = g_variant_get_double(data);
-                       ret = scpi_cmd(sdi, SCPI_CMD_SET_VOLTAGE_MAX, d);
+                       ret = scpi_cmd(sdi, SCPI_CMD_SET_VOLTAGE_TARGET, d);
                        break;
-               case SR_CONF_OUTPUT_CURRENT_MAX:
+               case SR_CONF_OUTPUT_CURRENT_LIMIT:
                        d = g_variant_get_double(data);
-                       ret = scpi_cmd(sdi, SCPI_CMD_SET_CURRENT_MAX, d);
+                       ret = scpi_cmd(sdi, SCPI_CMD_SET_CURRENT_LIMIT, d);
                        break;
                case SR_CONF_OVER_TEMPERATURE_PROTECTION:
                        if (g_variant_get_boolean(data))
@@ -365,13 +365,13 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
                        else
                                ret = scpi_cmd(sdi, SCPI_CMD_SET_OUTPUT_DISABLE, pch->hwname);
                        break;
-               case SR_CONF_OUTPUT_VOLTAGE_MAX:
+               case SR_CONF_OUTPUT_VOLTAGE_TARGET:
                        d = g_variant_get_double(data);
-                       ret = scpi_cmd(sdi, SCPI_CMD_SET_VOLTAGE_MAX, pch->hwname, d);
+                       ret = scpi_cmd(sdi, SCPI_CMD_SET_VOLTAGE_TARGET, pch->hwname, d);
                        break;
-               case SR_CONF_OUTPUT_CURRENT_MAX:
+               case SR_CONF_OUTPUT_CURRENT_LIMIT:
                        d = g_variant_get_double(data);
-                       ret = scpi_cmd(sdi, SCPI_CMD_SET_CURRENT_MAX, pch->hwname, d);
+                       ret = scpi_cmd(sdi, SCPI_CMD_SET_CURRENT_LIMIT, pch->hwname, d);
                        break;
                case SR_CONF_OVER_VOLTAGE_PROTECTION_ENABLED:
                        if (g_variant_get_boolean(data))
@@ -475,7 +475,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
                                        devc->device->devopts_cg, devc->device->num_devopts_cg,
                                        sizeof(uint32_t));
                        break;
-               case SR_CONF_OUTPUT_VOLTAGE_MAX:
+               case SR_CONF_OUTPUT_VOLTAGE_TARGET:
                        ch_spec = &(devc->device->channels[ch->index]);
                        g_variant_builder_init(&gvb, G_VARIANT_TYPE_ARRAY);
                        /* Min, max, write resolution. */
@@ -485,7 +485,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
                        }
                        *data = g_variant_builder_end(&gvb);
                        break;
-               case SR_CONF_OUTPUT_CURRENT_MAX:
+               case SR_CONF_OUTPUT_CURRENT_LIMIT:
                        g_variant_builder_init(&gvb, G_VARIANT_TYPE_ARRAY);
                        /* Min, max, step. */
                        for (i = 0; i < 3; i++) {
index deb200dc2acd01abcb8e1222ac89938476e27259..d4a65204c4b2b19d87eca2a81c4929c0c65a6268 100644 (file)
@@ -57,9 +57,9 @@ static const uint32_t rigol_dp800_devopts_cg[] = {
        SR_CONF_OVER_CURRENT_PROTECTION_ACTIVE | SR_CONF_GET,
        SR_CONF_OVER_CURRENT_PROTECTION_THRESHOLD | SR_CONF_GET | SR_CONF_SET,
        SR_CONF_OUTPUT_VOLTAGE | SR_CONF_GET,
-       SR_CONF_OUTPUT_VOLTAGE_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_OUTPUT_VOLTAGE_TARGET | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
        SR_CONF_OUTPUT_CURRENT | SR_CONF_GET,
-       SR_CONF_OUTPUT_CURRENT_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_OUTPUT_CURRENT_LIMIT | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
        SR_CONF_OUTPUT_ENABLED | SR_CONF_GET | SR_CONF_SET,
 };
 
@@ -86,10 +86,10 @@ struct scpi_command rigol_dp800_cmd[] = {
        { SCPI_CMD_GET_MEAS_VOLTAGE, ":MEAS:VOLT? CH%s" },
        { SCPI_CMD_GET_MEAS_CURRENT, ":MEAS:CURR? CH%s" },
        { SCPI_CMD_GET_MEAS_POWER, ":MEAS:POWE? CH%s" },
-       { SCPI_CMD_GET_VOLTAGE_MAX, ":SOUR%s:VOLT?" },
-       { SCPI_CMD_SET_VOLTAGE_MAX, ":SOUR%s:VOLT %.6f" },
-       { SCPI_CMD_GET_CURRENT_MAX, ":SOUR%s:CURR?" },
-       { SCPI_CMD_SET_CURRENT_MAX, ":SOUR%s:CURR %.6f" },
+       { SCPI_CMD_GET_VOLTAGE_TARGET, ":SOUR%s:VOLT?" },
+       { SCPI_CMD_SET_VOLTAGE_TARGET, ":SOUR%s:VOLT %.6f" },
+       { SCPI_CMD_GET_CURRENT_LIMIT, ":SOUR%s:CURR?" },
+       { SCPI_CMD_SET_CURRENT_LIMIT, ":SOUR%s:CURR %.6f" },
        { SCPI_CMD_GET_OUTPUT_ENABLED, ":OUTP? CH%s" },
        { SCPI_CMD_SET_OUTPUT_ENABLE, ":OUTP CH%s,ON" },
        { SCPI_CMD_SET_OUTPUT_DISABLE, ":OUTP CH%s,OFF" },
@@ -118,8 +118,8 @@ static const uint32_t hp_6632b_devopts[] = {
        SR_CONF_OUTPUT_ENABLED | SR_CONF_GET | SR_CONF_SET,
        SR_CONF_OUTPUT_VOLTAGE | SR_CONF_GET,
        SR_CONF_OUTPUT_CURRENT | SR_CONF_GET,
-       SR_CONF_OUTPUT_VOLTAGE_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
-       SR_CONF_OUTPUT_CURRENT_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_OUTPUT_VOLTAGE_TARGET | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_OUTPUT_CURRENT_LIMIT | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
 };
 
 struct channel_spec hp_6632b_ch[] = {
@@ -136,10 +136,10 @@ struct scpi_command hp_6632b_cmd[] = {
        { SCPI_CMD_SET_OUTPUT_DISABLE, "OUTP:STAT OFF" },
        { 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" },
+       { SCPI_CMD_GET_VOLTAGE_TARGET, ":SOUR:VOLT?" },
+       { SCPI_CMD_SET_VOLTAGE_TARGET, ":SOUR:VOLT %.6f" },
+       { SCPI_CMD_GET_CURRENT_LIMIT, ":SOUR:CURR?" },
+       { SCPI_CMD_SET_CURRENT_LIMIT, ":SOUR:CURR %.6f" },
 };
 
 
index 597ed09f48bccb046d7f63108e90552f84d74222..fcd451d1c6684b9223b75a7d26572f3a6bd20a03 100644 (file)
@@ -32,10 +32,10 @@ enum pps_scpi_cmds {
        SCPI_CMD_GET_MEAS_VOLTAGE,
        SCPI_CMD_GET_MEAS_CURRENT,
        SCPI_CMD_GET_MEAS_POWER,
-       SCPI_CMD_GET_VOLTAGE_MAX,
-       SCPI_CMD_SET_VOLTAGE_MAX,
-       SCPI_CMD_GET_CURRENT_MAX,
-       SCPI_CMD_SET_CURRENT_MAX,
+       SCPI_CMD_GET_VOLTAGE_TARGET,
+       SCPI_CMD_SET_VOLTAGE_TARGET,
+       SCPI_CMD_GET_CURRENT_LIMIT,
+       SCPI_CMD_SET_CURRENT_LIMIT,
        SCPI_CMD_GET_OUTPUT_ENABLED,
        SCPI_CMD_SET_OUTPUT_ENABLE,
        SCPI_CMD_SET_OUTPUT_DISABLE,
index e36990a258404842dd4a9ea25624dc23f86794a4..be918e9bfc6ab63543e7f888be3c110bcbd728e3 100644 (file)
@@ -106,12 +106,12 @@ static struct sr_config_info sr_config_info_data[] = {
                "Number of analog channels", NULL},
        {SR_CONF_OUTPUT_VOLTAGE, SR_T_FLOAT, "output_voltage",
                "Current output voltage", NULL},
-       {SR_CONF_OUTPUT_VOLTAGE_MAX, SR_T_FLOAT, "output_voltage_max",
-               "Maximum output voltage", NULL},
+       {SR_CONF_OUTPUT_VOLTAGE_TARGET, SR_T_FLOAT, "output_voltage_max",
+               "Output voltage target", NULL},
        {SR_CONF_OUTPUT_CURRENT, SR_T_FLOAT, "output_current",
                "Current output current", NULL},
-       {SR_CONF_OUTPUT_CURRENT_MAX, SR_T_FLOAT, "output_current_max",
-               "Maximum output current", NULL},
+       {SR_CONF_OUTPUT_CURRENT_LIMIT, SR_T_FLOAT, "output_current_max",
+               "Output current limit", NULL},
        {SR_CONF_OUTPUT_ENABLED, SR_T_BOOL, "output_enabled",
                "Output enabled", NULL},
        {SR_CONF_OUTPUT_CHANNEL_CONFIG, SR_T_STRING, "output_channel_config",