X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fhardware%2Fscpi-dmm%2Fapi.c;h=95d8a08287f480ee4f5f097b2ff0559cc4332e69;hb=08f023fe97e402d68106299d04726f9094f00c45;hp=4d6acc7795f7aee910c67f4aaba5a2132d30247b;hpb=1de14d67f1b30a3fc32f9e715e2c0743ee74ca5c;p=libsigrok.git diff --git a/src/hardware/scpi-dmm/api.c b/src/hardware/scpi-dmm/api.c index 4d6acc77..95d8a082 100644 --- a/src/hardware/scpi-dmm/api.c +++ b/src/hardware/scpi-dmm/api.c @@ -54,12 +54,11 @@ static const struct scpi_command cmdset_agilent[] = { { DMM_CMD_QUERY_FUNC, "CONF?", }, { DMM_CMD_START_ACQ, "INIT", }, { DMM_CMD_STOP_ACQ, "ABORT", }, - { DMM_CMD_QUERY_VALUE, "READ?", }, + { DMM_CMD_QUERY_VALUE, "FETCH?", }, { DMM_CMD_QUERY_PREC, "CONF?", }, { DMM_CMD_QUERY_RANGE_AUTO, "%s:RANGE:AUTO?", }, { DMM_CMD_QUERY_RANGE, "%s:RANGE?", }, - { DMM_CMD_SETUP_RANGE_AUTO, "%s:RANGE:AUTO ON", }, - { DMM_CMD_SETUP_RANGE, "%s:RANGE %s", }, + { DMM_CMD_SETUP_RANGE, "CONF:%s %s", }, ALL_ZERO, }; @@ -128,15 +127,16 @@ static const struct scpi_command cmdset_owon[] = { static const struct mqopt_item mqopts_agilent_34405a[] = { { SR_MQ_VOLTAGE, SR_MQFLAG_DC, "VOLT:DC", "VOLT ", NO_DFLT_PREC, FLAGS_NONE, }, - { SR_MQ_VOLTAGE, SR_MQFLAG_AC, "VOLT:AC", "VOLT:AC ", NO_DFLT_PREC, FLAGS_NONE, }, + { SR_MQ_VOLTAGE, SR_MQFLAG_AC, "VOLT:AC", "VOLT:AC ", NO_DFLT_PREC, FLAG_CONF_DELAY, }, { SR_MQ_CURRENT, SR_MQFLAG_DC, "CURR:DC", "CURR ", NO_DFLT_PREC, FLAGS_NONE, }, - { SR_MQ_CURRENT, SR_MQFLAG_AC, "CURR:AC", "CURR:AC ", NO_DFLT_PREC, FLAGS_NONE, }, + { SR_MQ_CURRENT, SR_MQFLAG_AC, "CURR:AC", "CURR:AC ", NO_DFLT_PREC, FLAG_CONF_DELAY, }, { SR_MQ_RESISTANCE, 0, "RES", "RES ", NO_DFLT_PREC, FLAGS_NONE, }, - { SR_MQ_CONTINUITY, 0, "CONT", "CONT", -1, FLAGS_NONE, }, + { SR_MQ_RESISTANCE, SR_MQFLAG_FOUR_WIRE, "FRES", "FRES ", NO_DFLT_PREC, FLAGS_NONE, }, + { SR_MQ_CONTINUITY, 0, "CONT", "CONT", -1, FLAG_NO_RANGE, }, { SR_MQ_CAPACITANCE, 0, "CAP", "CAP ", NO_DFLT_PREC, FLAGS_NONE, }, - { SR_MQ_VOLTAGE, SR_MQFLAG_DC | SR_MQFLAG_DIODE, "DIOD", "DIOD", -4, FLAGS_NONE, }, - { SR_MQ_TEMPERATURE, 0, "TEMP", "TEMP ", NO_DFLT_PREC, FLAGS_NONE, }, - { SR_MQ_FREQUENCY, 0, "FREQ", "FREQ ", NO_DFLT_PREC, FLAGS_NONE, }, + { SR_MQ_VOLTAGE, SR_MQFLAG_DC | SR_MQFLAG_DIODE, "DIOD", "DIOD", -4, FLAG_NO_RANGE, }, + { SR_MQ_TEMPERATURE, 0, "TEMP", "TEMP ", NO_DFLT_PREC, FLAG_NO_RANGE, }, + { SR_MQ_FREQUENCY, 0, "FREQ", "FREQ ", NO_DFLT_PREC, FLAG_NO_RANGE, }, }; static const struct mqopt_item mqopts_agilent_34401a[] = { @@ -204,7 +204,7 @@ SR_PRIV const struct scpi_dmm_model models[] = { 1, 5, cmdset_agilent, ARRAY_AND_SIZE(mqopts_agilent_34405a), scpi_dmm_get_meas_agilent, ARRAY_AND_SIZE(devopts_generic_range), - 0, 0, FALSE, + 0, 200 * 1000, 0, FALSE, scpi_dmm_get_range_text, scpi_dmm_set_range_from_text, NULL, }, { @@ -212,7 +212,7 @@ SR_PRIV const struct scpi_dmm_model models[] = { 1, 6, cmdset_hp, ARRAY_AND_SIZE(mqopts_agilent_34405a), scpi_dmm_get_meas_agilent, ARRAY_AND_SIZE(devopts_generic), - 0, 0, FALSE, + 0, 0, 0, FALSE, NULL, NULL, NULL, }, { @@ -220,7 +220,7 @@ SR_PRIV const struct scpi_dmm_model models[] = { 1, 6, cmdset_gwinstek, ARRAY_AND_SIZE(mqopts_gwinstek_gdm8200a), scpi_dmm_get_meas_gwinstek, ARRAY_AND_SIZE(devopts_generic), - 1000 * 2500, 0, FALSE, + 2500 * 1000, 0, 0, FALSE, NULL, NULL, NULL, }, { @@ -228,7 +228,7 @@ SR_PRIV const struct scpi_dmm_model models[] = { 1, 6, cmdset_gwinstek, ARRAY_AND_SIZE(mqopts_gwinstek_gdm8200a), scpi_dmm_get_meas_gwinstek, ARRAY_AND_SIZE(devopts_generic), - 1000 * 2500, 0, FALSE, + 2500 * 1000, 0, 0, FALSE, NULL, NULL, NULL, }, { @@ -236,7 +236,7 @@ SR_PRIV const struct scpi_dmm_model models[] = { 1, 6, cmdset_gwinstek_906x, ARRAY_AND_SIZE(mqopts_gwinstek_gdm906x), scpi_dmm_get_meas_agilent, ARRAY_AND_SIZE(devopts_generic), - 0, 0, FALSE, + 0, 0, 0, FALSE, NULL, NULL, NULL, }, { @@ -244,7 +244,7 @@ SR_PRIV const struct scpi_dmm_model models[] = { 1, 6, cmdset_gwinstek_906x, ARRAY_AND_SIZE(mqopts_gwinstek_gdm906x), scpi_dmm_get_meas_agilent, ARRAY_AND_SIZE(devopts_generic), - 0, 0, FALSE, + 0, 0, 0, FALSE, NULL, NULL, NULL, }, { @@ -253,7 +253,7 @@ SR_PRIV const struct scpi_dmm_model models[] = { scpi_dmm_get_meas_agilent, ARRAY_AND_SIZE(devopts_generic), /* 34401A: typ. 1020ms for AC readings (default is 1000ms). */ - 1000 * 1500, 0, FALSE, + 1500 * 1000, 0, 0, FALSE, NULL, NULL, NULL, }, { @@ -261,7 +261,7 @@ SR_PRIV const struct scpi_dmm_model models[] = { 1, 6, cmdset_agilent, ARRAY_AND_SIZE(mqopts_agilent_34405a), scpi_dmm_get_meas_agilent, ARRAY_AND_SIZE(devopts_generic_range), - 0, 0, FALSE, + 0, 0, 0, FALSE, scpi_dmm_get_range_text, scpi_dmm_set_range_from_text, NULL, }, { @@ -269,7 +269,7 @@ SR_PRIV const struct scpi_dmm_model models[] = { 1, 5, cmdset_owon, ARRAY_AND_SIZE(mqopts_owon_xdm2041), scpi_dmm_get_meas_gwinstek, ARRAY_AND_SIZE(devopts_generic), - 0, 1e9, TRUE, + 0, 0, 1e9, TRUE, NULL, NULL, NULL, }, };