DSO1000B,
DS1000Z,
DS4000,
+ MSO5000,
MSO7000A,
};
{50, 1}, {1, 1000}, 12, 1200, 12000000},
[DS4000] = {VENDOR(RIGOL), "DS4000", PROTOCOL_V4, FORMAT_IEEE488_2,
{1000, 1}, {1, 1000}, 14, 1400, 0},
+ [MSO5000] = {VENDOR(RIGOL), "MSO5000", PROTOCOL_V5, FORMAT_IEEE488_2,
+ {1000, 1}, {500, 1000000}, 10, 1000, 0},
[MSO7000A] = {VENDOR(AGILENT), "MSO7000A", PROTOCOL_V4, FORMAT_IEEE488_2,
{50, 1}, {2, 1000}, 10, 1000, 8000000},
};
{SERIES(DS1000Z), "MSO1074Z-S", {5, 1000000000}, CH_INFO(4, true), std_cmd},
{SERIES(DS1000Z), "MSO1104Z-S", {5, 1000000000}, CH_INFO(4, true), std_cmd},
{SERIES(DS4000), "DS4024", {1, 1000000000}, CH_INFO(4, false), std_cmd},
+ {SERIES(MSO5000), "MSO5072", {1, 1000000000}, CH_INFO(2, true), std_cmd},
+ {SERIES(MSO5000), "MSO5074", {1, 1000000000}, CH_INFO(4, true), std_cmd},
+ {SERIES(MSO5000), "MSO5102", {1, 1000000000}, CH_INFO(2, true), std_cmd},
+ {SERIES(MSO5000), "MSO5104", {1, 1000000000}, CH_INFO(4, true), std_cmd},
+ {SERIES(MSO5000), "MSO5204", {1, 1000000000}, CH_INFO(4, true), std_cmd},
+ {SERIES(MSO5000), "MSO5354", {1, 1000000000}, CH_INFO(4, true), std_cmd},
/* TODO: Digital channels are not yet supported on MSO7000A. */
{SERIES(MSO7000A), "MSO7034A", {2, 1000000000}, CH_INFO(4, false), mso7000a_cmd},
};
struct sr_datafeed_packet packet;
gboolean some_digital;
GSList *l;
+ char *cmd;
scpi = sdi->conn;
devc = sdi->priv;
}
if (ch->enabled != devc->digital_channels[ch->index]) {
/* Enabled channel is currently disabled, or vice versa. */
- if (rigol_ds_config_set(sdi,
- devc->model->series->protocol >= PROTOCOL_V3 ?
- ":LA:DIG%d:DISP %s" : ":DIG%d:TURN %s", ch->index,
+ if (devc->model->series->protocol >= PROTOCOL_V5)
+ cmd = ":LA:DISP D%d,%s";
+ else if (devc->model->series->protocol >= PROTOCOL_V3)
+ cmd = ":LA:DIG%d:DISP %s";
+ else
+ cmd = ":DIG%d:TURN %s";
+
+ if (rigol_ds_config_set(sdi, cmd, ch->index,
ch->enabled ? "ON" : "OFF") != SR_OK)
return SR_ERR;
devc->digital_channels[ch->index] = ch->enabled;
break;
case PROTOCOL_V3:
case PROTOCOL_V4:
+ case PROTOCOL_V5:
if (rigol_ds_config_set(sdi, ":WAV:FORM BYTE") != SR_OK)
return SR_ERR;
if (devc->data_source == DATA_SOURCE_LIVE) {
if (devc->model->series->protocol == PROTOCOL_V3) {
if (rigol_ds_config_set(sdi, ":WAV:MODE RAW") != SR_OK)
return SR_ERR;
- } else if (devc->model->series->protocol == PROTOCOL_V4) {
+ } else if (devc->model->series->protocol >= PROTOCOL_V4) {
num_channels = 0;
/* Channels 3 and 4 are multiplexed with D0-7 and D8-15 */
}
break;
case PROTOCOL_V4:
+ case PROTOCOL_V5:
if (ch->type == SR_CHANNEL_ANALOG) {
if (rigol_ds_config_set(sdi, ":WAV:SOUR CHAN%d",
ch->index + 1) != SR_OK)
// TODO: For the MSO1000Z series, we need a way to express that
// this data is in fact just for a single channel, with the valid
// data for that channel in the LSB of each byte.
- logic.unitsize = devc->model->series->protocol == PROTOCOL_V4 ? 1 : 2;
+ logic.unitsize = devc->model->series->protocol >= PROTOCOL_V4 ? 1 : 2;
logic.data = devc->buffer;
packet.type = SR_DF_LOGIC;
packet.payload = &logic;
sr_dbg("Logic analyzer %s, current digital channel state:",
devc->la_enabled ? "enabled" : "disabled");
for (i = 0; i < ARRAY_SIZE(devc->digital_channels); i++) {
- cmd = g_strdup_printf(
- devc->model->series->protocol >= PROTOCOL_V3 ?
- ":LA:DIG%d:DISP?" : ":DIG%d:TURN?", i);
+ if (devc->model->series->protocol >= PROTOCOL_V5)
+ cmd = g_strdup_printf(":LA:DISP? D%d", i);
+ else if (devc->model->series->protocol >= PROTOCOL_V3)
+ cmd = g_strdup_printf(":LA:DIG%d:DISP?", i);
+ else
+ cmd = g_strdup_printf(":DIG%d:TURN?", i);
res = sr_scpi_get_bool(sdi->conn, cmd, &devc->digital_channels[i]);
g_free(cmd);
if (res != SR_OK)