2 * This file is part of the libsigrok project.
4 * Copyright (C) 2014 Bert Vermeulen <bert@biot.com>
5 * Copyright (C) 2015 Google, Inc.
6 * (Written by Alexandru Gagniuc <mrnuke@google.com> for Google, Inc.)
7 * Copyright (C) 2017 Frank Stettner <frank-stettner@gmx.net>
9 * This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 3 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
28 #define CH_IDX(x) (1 << x)
29 #define FREQ_DC_ONLY {0, 0, 0, 0, 0}
30 #define NO_OVP_LIMITS {0, 0, 0, 0, 0}
31 #define NO_OCP_LIMITS {0, 0, 0, 0, 0}
33 /* Agilent/Keysight N5700A series */
34 static const uint32_t agilent_n5700a_devopts[] = {
36 SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
37 SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
40 static const uint32_t agilent_n5700a_devopts_cg[] = {
41 SR_CONF_OVER_VOLTAGE_PROTECTION_THRESHOLD | SR_CONF_GET | SR_CONF_SET,
42 SR_CONF_OVER_CURRENT_PROTECTION_ENABLED | SR_CONF_GET | SR_CONF_SET,
43 SR_CONF_OVER_CURRENT_PROTECTION_THRESHOLD | SR_CONF_GET | SR_CONF_SET,
44 SR_CONF_VOLTAGE | SR_CONF_GET,
45 SR_CONF_VOLTAGE_TARGET | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
46 SR_CONF_CURRENT | SR_CONF_GET,
47 SR_CONF_ENABLED | SR_CONF_GET | SR_CONF_SET,
50 static const struct channel_group_spec agilent_n5700a_cg[] = {
51 { "1", CH_IDX(0), PPS_OVP | PPS_OCP },
54 static const struct channel_spec agilent_n5767a_ch[] = {
55 { "1", { 0, 60, 0.0072, 3, 4 }, { 0, 25, 0.003, 3, 4 }, { 0, 1500 }, FREQ_DC_ONLY, NO_OVP_LIMITS, NO_OCP_LIMITS },
58 static const struct channel_spec agilent_n5763a_ch[] = {
59 { "1", { 0, 12.5, 0.0015, 3, 4 }, { 0, 120, 0.0144, 3, 4 }, { 0, 1500 }, FREQ_DC_ONLY, NO_OVP_LIMITS, NO_OCP_LIMITS },
63 * TODO: OVER_CURRENT_PROTECTION_ACTIVE status can be determined by the OC bit
64 * in STAT:QUES:EVEN?, but this is not implemented.
66 static const struct scpi_command agilent_n5700a_cmd[] = {
67 { SCPI_CMD_REMOTE, "SYST:COMM:RLST REM" },
68 { SCPI_CMD_LOCAL, "SYST:COMM:RLST LOC" },
69 { SCPI_CMD_GET_MEAS_VOLTAGE, ":MEAS:VOLT?" },
70 { SCPI_CMD_GET_MEAS_CURRENT, "MEAS:CURR?" },
71 { SCPI_CMD_GET_VOLTAGE_TARGET, ":SOUR:VOLT?" },
72 { SCPI_CMD_SET_VOLTAGE_TARGET, ":SOUR:VOLT %.6f" },
73 { SCPI_CMD_GET_CURRENT_LIMIT, ":SOUR:CURR?" },
74 { SCPI_CMD_SET_CURRENT_LIMIT, ":SOUR:CURR %.6f" },
75 { SCPI_CMD_GET_OUTPUT_ENABLED, ":OUTP:STAT?" },
76 { SCPI_CMD_SET_OUTPUT_ENABLE, ":OUTP ON" },
77 { SCPI_CMD_SET_OUTPUT_DISABLE, ":OUTP OFF" },
78 { SCPI_CMD_GET_OVER_VOLTAGE_PROTECTION_THRESHOLD, ":VOLT:PROT?" },
79 { SCPI_CMD_SET_OVER_VOLTAGE_PROTECTION_THRESHOLD, ":VOLT:PROT %.6f" },
80 { SCPI_CMD_GET_OVER_CURRENT_PROTECTION_ENABLED, ":CURR:PROT:STAT?" },
81 { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_ENABLE, ":CURR:PROT:STAT ON?"},
82 { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_DISABLE, ":CURR:PROT:STAT OFF?"},
83 /* Current limit (CC mode) and OCP are set using the same command. */
84 { SCPI_CMD_GET_OVER_CURRENT_PROTECTION_THRESHOLD, ":SOUR:CURR?" },
85 { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_THRESHOLD, ":SOUR:CURR %.6f" },
89 /* Chroma 61600 series AC source */
90 static const uint32_t chroma_61604_devopts[] = {
92 SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
93 SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
96 static const uint32_t chroma_61604_devopts_cg[] = {
97 SR_CONF_OVER_VOLTAGE_PROTECTION_THRESHOLD | SR_CONF_GET | SR_CONF_SET,
98 SR_CONF_OVER_CURRENT_PROTECTION_THRESHOLD | SR_CONF_GET | SR_CONF_SET,
99 SR_CONF_VOLTAGE | SR_CONF_GET,
100 SR_CONF_VOLTAGE_TARGET | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
101 SR_CONF_OUTPUT_FREQUENCY | SR_CONF_GET,
102 SR_CONF_OUTPUT_FREQUENCY_TARGET | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
103 SR_CONF_CURRENT | SR_CONF_GET,
104 SR_CONF_ENABLED | SR_CONF_GET | SR_CONF_SET,
107 static const struct channel_spec chroma_61604_ch[] = {
108 { "1", { 0, 300, 0.1, 1, 1 }, { 0, 16, 0.1, 2, 2 }, { 0, 2000, 0, 1, 1 }, { 1.0, 1000.0, 0.01 }, NO_OVP_LIMITS, NO_OCP_LIMITS },
111 static const struct channel_group_spec chroma_61604_cg[] = {
112 { "1", CH_IDX(0), PPS_OVP | PPS_OCP },
115 static const struct scpi_command chroma_61604_cmd[] = {
116 { SCPI_CMD_REMOTE, "SYST:REM" },
117 { SCPI_CMD_LOCAL, "SYST:LOC" },
118 { SCPI_CMD_GET_MEAS_VOLTAGE, ":FETC:VOLT:ACDC?" },
119 { SCPI_CMD_GET_MEAS_FREQUENCY, ":FETC:FREQ?" },
120 { SCPI_CMD_GET_MEAS_CURRENT, ":FETC:CURR:AC?" },
121 { SCPI_CMD_GET_MEAS_POWER, ":FETC:POW:AC?" },
122 { SCPI_CMD_GET_VOLTAGE_TARGET, ":SOUR:VOLT:AC?" },
123 { SCPI_CMD_SET_VOLTAGE_TARGET, ":SOUR:VOLT:AC %.1f" },
124 { SCPI_CMD_GET_FREQUENCY_TARGET, ":SOUR:FREQ?" },
125 { SCPI_CMD_SET_FREQUENCY_TARGET, ":SOUR:FREQ %.2f" },
126 { SCPI_CMD_GET_OUTPUT_ENABLED, ":OUTP?" },
127 { SCPI_CMD_SET_OUTPUT_ENABLE, ":OUTP ON" },
128 { SCPI_CMD_SET_OUTPUT_DISABLE, ":OUTP OFF" },
129 { SCPI_CMD_GET_OVER_VOLTAGE_PROTECTION_THRESHOLD, ":SOUR:VOLT:LIM:AC?" },
130 { SCPI_CMD_SET_OVER_VOLTAGE_PROTECTION_THRESHOLD, ":SOUR:VOLT:LIM:AC %.1f" },
131 /* This is not a current limit mode. It is overcurrent protection. */
132 { SCPI_CMD_GET_OVER_CURRENT_PROTECTION_THRESHOLD, ":SOUR:CURR:LIM?" },
133 { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_THRESHOLD, ":SOUR:CURR:LIM %.2f" },
137 /* Chroma 62000 series DC source */
138 static const uint32_t chroma_62000_devopts[] = {
140 SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
141 SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
144 static const uint32_t chroma_62000_devopts_cg[] = {
145 SR_CONF_OVER_VOLTAGE_PROTECTION_THRESHOLD | SR_CONF_GET | SR_CONF_SET,
146 SR_CONF_OVER_CURRENT_PROTECTION_THRESHOLD | SR_CONF_GET | SR_CONF_SET,
147 SR_CONF_VOLTAGE | SR_CONF_GET,
148 SR_CONF_VOLTAGE_TARGET | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
149 SR_CONF_CURRENT | SR_CONF_GET,
150 SR_CONF_CURRENT_LIMIT | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
151 SR_CONF_ENABLED | SR_CONF_GET | SR_CONF_SET,
154 static const struct channel_group_spec chroma_62000_cg[] = {
155 { "1", CH_IDX(0), PPS_OVP | PPS_OCP },
158 static const struct scpi_command chroma_62000_cmd[] = {
159 { SCPI_CMD_REMOTE, ":CONF:REM ON" },
160 { SCPI_CMD_LOCAL, ":CONF:REM OFF" },
161 { SCPI_CMD_BEEPER, ":CONF:BEEP?" },
162 { SCPI_CMD_BEEPER_ENABLE, ":CONF:BEEP ON" },
163 { SCPI_CMD_BEEPER_DISABLE, ":CONF:BEEP OFF" },
164 { SCPI_CMD_GET_MEAS_VOLTAGE, ":MEAS:VOLT?" },
165 { SCPI_CMD_GET_MEAS_CURRENT, ":MEAS:CURR?" },
166 { SCPI_CMD_GET_MEAS_POWER, ":MEAS:POW?" },
167 { SCPI_CMD_GET_VOLTAGE_TARGET, ":SOUR:VOLT?" },
168 { SCPI_CMD_SET_VOLTAGE_TARGET, ":SOUR:VOLT %.2f" },
169 { SCPI_CMD_GET_CURRENT_LIMIT, ":SOUR:CURR?" },
170 { SCPI_CMD_SET_CURRENT_LIMIT, ":SOUR:CURR %.6f" },
171 { SCPI_CMD_GET_OUTPUT_ENABLED, ":CONF:OUTP?" },
172 { SCPI_CMD_SET_OUTPUT_ENABLE, ":CONF:OUTP ON" },
173 { SCPI_CMD_SET_OUTPUT_DISABLE, ":CONF:OUTP OFF" },
174 { SCPI_CMD_GET_OVER_VOLTAGE_PROTECTION_THRESHOLD, ":SOUR:VOLT:PROT:HIGH?" },
175 { SCPI_CMD_SET_OVER_VOLTAGE_PROTECTION_THRESHOLD, ":SOUR:VOLT:PROT:HIGH %.6f" },
176 { SCPI_CMD_GET_OVER_CURRENT_PROTECTION_THRESHOLD, ":SOUR:CURR:PROT:HIGH?" },
177 { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_THRESHOLD, ":SOUR:CURR:PROT:HIGH %.6f" },
181 static int chroma_62000p_probe_channels(struct sr_dev_inst *sdi,
182 struct sr_scpi_hw_info *hw_info,
183 struct channel_spec **channels, unsigned int *num_channels,
184 struct channel_group_spec **channel_groups,
185 unsigned int *num_channel_groups)
187 unsigned int volts, amps, watts;
188 struct channel_spec *channel;
192 sscanf(hw_info->model, "620%uP-%u-%u", &watts, &volts, &s);
194 sr_dbg("Found device rated for %d V, %d A and %d W", volts, amps, watts);
197 sr_err("Probed max voltage of %u V is out of spec.", volts);
202 sr_err("Probed max current of %u A is out of spec.", amps);
207 sr_err("Probed max power of %u W is out of spec.", watts);
211 channel = g_malloc0(sizeof(struct channel_spec));
213 channel->voltage[0] = channel->current[0] = channel->power[0] = 0.0;
214 channel->voltage[1] = volts;
215 channel->current[1] = amps;
216 channel->power[1] = watts;
217 channel->voltage[2] = channel->current[2] = 0.01;
218 channel->voltage[3] = channel->voltage[4] = 3;
219 channel->current[3] = channel->current[4] = 4;
223 *channel_groups = g_malloc(sizeof(struct channel_group_spec));
224 **channel_groups = chroma_62000_cg[0];
225 *num_channel_groups = 1;
230 /* Rigol DP700 series */
231 static const uint32_t rigol_dp700_devopts[] = {
233 SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
234 SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
237 static const uint32_t rigol_dp700_devopts_cg[] = {
238 SR_CONF_REGULATION | SR_CONF_GET,
239 SR_CONF_OVER_VOLTAGE_PROTECTION_ENABLED | SR_CONF_GET | SR_CONF_SET,
240 SR_CONF_OVER_VOLTAGE_PROTECTION_ACTIVE | SR_CONF_GET,
241 SR_CONF_OVER_VOLTAGE_PROTECTION_THRESHOLD | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
242 SR_CONF_OVER_CURRENT_PROTECTION_ENABLED | SR_CONF_GET | SR_CONF_SET,
243 SR_CONF_OVER_CURRENT_PROTECTION_ACTIVE | SR_CONF_GET,
244 SR_CONF_OVER_CURRENT_PROTECTION_THRESHOLD | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
245 SR_CONF_VOLTAGE | SR_CONF_GET,
246 SR_CONF_VOLTAGE_TARGET | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
247 SR_CONF_CURRENT | SR_CONF_GET,
248 SR_CONF_CURRENT_LIMIT | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
249 SR_CONF_ENABLED | SR_CONF_GET | SR_CONF_SET,
252 static const struct channel_spec rigol_dp711_ch[] = {
253 { "1", { 0, 30, 0.01, 3, 3 }, { 0, 5, 0.01, 3, 3 }, { 0, 150, 0, 3, 3 }, FREQ_DC_ONLY, { 0.01, 33, 0.01}, { 0.01, 5.5, 0.01 } },
256 static const struct channel_spec rigol_dp712_ch[] = {
257 { "1", { 0, 50, 0.01, 3, 3 }, { 0, 3, 0.01, 3, 3 }, { 0, 150, 0, 3, 3 }, FREQ_DC_ONLY, { 0.01, 55, 0.01}, { 0.01, 3.3, 0.01 } },
260 static const struct channel_group_spec rigol_dp700_cg[] = {
261 { "1", CH_IDX(0), PPS_OVP | PPS_OCP },
264 /* Same as the DP800 series, except for the missing :SYST:OTP* commands. */
265 static const struct scpi_command rigol_dp700_cmd[] = {
266 { SCPI_CMD_REMOTE, "SYST:REMOTE" },
267 { SCPI_CMD_LOCAL, "SYST:LOCAL" },
268 { SCPI_CMD_BEEPER, "SYST:BEEP:STAT?" },
269 { SCPI_CMD_BEEPER_ENABLE, "SYST:BEEP:STAT ON" },
270 { SCPI_CMD_BEEPER_DISABLE, "SYST:BEEP:STAT OFF" },
271 { SCPI_CMD_SELECT_CHANNEL, ":INST:NSEL %s" },
272 { SCPI_CMD_GET_MEAS_VOLTAGE, ":MEAS:VOLT?" },
273 { SCPI_CMD_GET_MEAS_CURRENT, ":MEAS:CURR?" },
274 { SCPI_CMD_GET_MEAS_POWER, ":MEAS:POWE?" },
275 { SCPI_CMD_GET_VOLTAGE_TARGET, ":SOUR:VOLT?" },
276 { SCPI_CMD_SET_VOLTAGE_TARGET, ":SOUR:VOLT %.6f" },
277 { SCPI_CMD_GET_CURRENT_LIMIT, ":SOUR:CURR?" },
278 { SCPI_CMD_SET_CURRENT_LIMIT, ":SOUR:CURR %.6f" },
279 { SCPI_CMD_GET_OUTPUT_ENABLED, ":OUTP?" },
280 { SCPI_CMD_SET_OUTPUT_ENABLE, ":OUTP ON" },
281 { SCPI_CMD_SET_OUTPUT_DISABLE, ":OUTP OFF" },
282 { SCPI_CMD_GET_OUTPUT_REGULATION, ":OUTP:MODE?" },
283 { SCPI_CMD_GET_OVER_VOLTAGE_PROTECTION_ENABLED, ":OUTP:OVP?" },
284 { SCPI_CMD_SET_OVER_VOLTAGE_PROTECTION_ENABLE, ":OUTP:OVP ON" },
285 { SCPI_CMD_SET_OVER_VOLTAGE_PROTECTION_DISABLE, ":OUTP:OVP OFF" },
286 { SCPI_CMD_GET_OVER_VOLTAGE_PROTECTION_ACTIVE, ":OUTP:OVP:QUES?" },
287 { SCPI_CMD_GET_OVER_VOLTAGE_PROTECTION_THRESHOLD, ":OUTP:OVP:VAL?" },
288 { SCPI_CMD_SET_OVER_VOLTAGE_PROTECTION_THRESHOLD, ":OUTP:OVP:VAL %.6f" },
289 { SCPI_CMD_GET_OVER_CURRENT_PROTECTION_ENABLED, ":OUTP:OCP?" },
290 { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_ENABLE, ":OUTP:OCP:STAT ON" },
291 { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_DISABLE, ":OUTP:OCP:STAT OFF" },
292 { SCPI_CMD_GET_OVER_CURRENT_PROTECTION_ACTIVE, ":OUTP:OCP:QUES?" },
293 { SCPI_CMD_GET_OVER_CURRENT_PROTECTION_THRESHOLD, ":OUTP:OCP:VAL?" },
294 { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_THRESHOLD, ":OUTP:OCP:VAL %.6f" },
298 /* Rigol DP800 series */
299 static const uint32_t rigol_dp800_devopts[] = {
301 SR_CONF_OVER_TEMPERATURE_PROTECTION | SR_CONF_GET | SR_CONF_SET,
302 SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
303 SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
306 static const uint32_t rigol_dp800_devopts_cg[] = {
307 SR_CONF_REGULATION | SR_CONF_GET,
308 SR_CONF_OVER_VOLTAGE_PROTECTION_ENABLED | SR_CONF_GET | SR_CONF_SET,
309 SR_CONF_OVER_VOLTAGE_PROTECTION_ACTIVE | SR_CONF_GET,
310 SR_CONF_OVER_VOLTAGE_PROTECTION_THRESHOLD | SR_CONF_GET | SR_CONF_SET,
311 SR_CONF_OVER_CURRENT_PROTECTION_ENABLED | SR_CONF_GET | SR_CONF_SET,
312 SR_CONF_OVER_CURRENT_PROTECTION_ACTIVE | SR_CONF_GET,
313 SR_CONF_OVER_CURRENT_PROTECTION_THRESHOLD | SR_CONF_GET | SR_CONF_SET,
314 SR_CONF_VOLTAGE | SR_CONF_GET,
315 SR_CONF_VOLTAGE_TARGET | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
316 SR_CONF_CURRENT | SR_CONF_GET,
317 SR_CONF_CURRENT_LIMIT | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
318 SR_CONF_ENABLED | SR_CONF_GET | SR_CONF_SET,
321 static const struct channel_spec rigol_dp821a_ch[] = {
322 { "1", { 0, 60, 0.001, 3, 3 }, { 0, 1, 0.0001, 4, 4 }, { 0, 60, 0, 3, 4 }, FREQ_DC_ONLY, NO_OVP_LIMITS, NO_OCP_LIMITS },
323 { "2", { 0, 8, 0.001, 3, 3 }, { 0, 10, 0.001, 3, 3 }, { 0, 80, 0, 3, 3 }, FREQ_DC_ONLY, NO_OVP_LIMITS, NO_OCP_LIMITS },
326 static const struct channel_spec rigol_dp831_ch[] = {
327 { "1", { 0, 8, 0.001, 3, 4 }, { 0, 5, 0.0003, 3, 4 }, { 0, 40, 0, 3, 4 }, FREQ_DC_ONLY, NO_OVP_LIMITS, NO_OCP_LIMITS },
328 { "2", { 0, 30, 0.001, 3, 4 }, { 0, 2, 0.0001, 3, 4 }, { 0, 60, 0, 3, 4 }, FREQ_DC_ONLY, NO_OVP_LIMITS, NO_OCP_LIMITS },
329 { "3", { 0, -30, 0.001, 3, 4 }, { 0, 2, 0.0001, 3, 4 }, { 0, 60, 0, 3, 4 }, FREQ_DC_ONLY, NO_OVP_LIMITS, NO_OCP_LIMITS },
332 static const struct channel_spec rigol_dp832_ch[] = {
333 { "1", { 0, 30, 0.001, 3, 4 }, { 0, 3, 0.001, 3, 4 }, { 0, 90, 0, 3, 4 }, FREQ_DC_ONLY, NO_OVP_LIMITS, NO_OCP_LIMITS },
334 { "2", { 0, 30, 0.001, 3, 4 }, { 0, 3, 0.001, 3, 4 }, { 0, 90, 0, 3, 4 }, FREQ_DC_ONLY, NO_OVP_LIMITS, NO_OCP_LIMITS },
335 { "3", { 0, 5, 0.001, 3, 4 }, { 0, 3, 0.001, 3, 4 }, { 0, 90, 0, 3, 4 }, FREQ_DC_ONLY, NO_OVP_LIMITS, NO_OCP_LIMITS },
338 static const struct channel_group_spec rigol_dp820_cg[] = {
339 { "1", CH_IDX(0), PPS_OVP | PPS_OCP },
340 { "2", CH_IDX(1), PPS_OVP | PPS_OCP },
343 static const struct channel_group_spec rigol_dp830_cg[] = {
344 { "1", CH_IDX(0), PPS_OVP | PPS_OCP },
345 { "2", CH_IDX(1), PPS_OVP | PPS_OCP },
346 { "3", CH_IDX(2), PPS_OVP | PPS_OCP },
349 static const struct scpi_command rigol_dp800_cmd[] = {
350 { SCPI_CMD_REMOTE, "SYST:REMOTE" },
351 { SCPI_CMD_LOCAL, "SYST:LOCAL" },
352 { SCPI_CMD_BEEPER, "SYST:BEEP:STAT?" },
353 { SCPI_CMD_BEEPER_ENABLE, "SYST:BEEP:STAT ON" },
354 { SCPI_CMD_BEEPER_DISABLE, "SYST:BEEP:STAT OFF" },
355 { SCPI_CMD_SELECT_CHANNEL, ":INST:NSEL %s" },
356 { SCPI_CMD_GET_MEAS_VOLTAGE, ":MEAS:VOLT?" },
357 { SCPI_CMD_GET_MEAS_CURRENT, ":MEAS:CURR?" },
358 { SCPI_CMD_GET_MEAS_POWER, ":MEAS:POWE?" },
359 { SCPI_CMD_GET_VOLTAGE_TARGET, ":SOUR:VOLT?" },
360 { SCPI_CMD_SET_VOLTAGE_TARGET, ":SOUR:VOLT %.6f" },
361 { SCPI_CMD_GET_CURRENT_LIMIT, ":SOUR:CURR?" },
362 { SCPI_CMD_SET_CURRENT_LIMIT, ":SOUR:CURR %.6f" },
363 { SCPI_CMD_GET_OUTPUT_ENABLED, ":OUTP?" },
364 { SCPI_CMD_SET_OUTPUT_ENABLE, ":OUTP ON" },
365 { SCPI_CMD_SET_OUTPUT_DISABLE, ":OUTP OFF" },
366 { SCPI_CMD_GET_OUTPUT_REGULATION, ":OUTP:MODE?" },
367 { SCPI_CMD_GET_OVER_TEMPERATURE_PROTECTION, ":SYST:OTP?" },
368 { SCPI_CMD_SET_OVER_TEMPERATURE_PROTECTION_ENABLE, ":SYST:OTP ON" },
369 { SCPI_CMD_SET_OVER_TEMPERATURE_PROTECTION_DISABLE, ":SYST:OTP OFF" },
370 { SCPI_CMD_GET_OVER_VOLTAGE_PROTECTION_ENABLED, ":OUTP:OVP?" },
371 { SCPI_CMD_SET_OVER_VOLTAGE_PROTECTION_ENABLE, ":OUTP:OVP ON" },
372 { SCPI_CMD_SET_OVER_VOLTAGE_PROTECTION_DISABLE, ":OUTP:OVP OFF" },
373 { SCPI_CMD_GET_OVER_VOLTAGE_PROTECTION_ACTIVE, ":OUTP:OVP:QUES?" },
374 { SCPI_CMD_GET_OVER_VOLTAGE_PROTECTION_THRESHOLD, ":OUTP:OVP:VAL?" },
375 { SCPI_CMD_SET_OVER_VOLTAGE_PROTECTION_THRESHOLD, ":OUTP:OVP:VAL %.6f" },
376 { SCPI_CMD_GET_OVER_CURRENT_PROTECTION_ENABLED, ":OUTP:OCP?" },
377 { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_ENABLE, ":OUTP:OCP:STAT ON" },
378 { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_DISABLE, ":OUTP:OCP:STAT OFF" },
379 { SCPI_CMD_GET_OVER_CURRENT_PROTECTION_ACTIVE, ":OUTP:OCP:QUES?" },
380 { SCPI_CMD_GET_OVER_CURRENT_PROTECTION_THRESHOLD, ":OUTP:OCP:VAL?" },
381 { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_THRESHOLD, ":OUTP:OCP:VAL %.6f" },
385 /* HP 663xx series */
386 static const uint32_t hp_6630a_devopts[] = {
388 SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
389 SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
392 static const uint32_t hp_6630a_devopts_cg[] = {
393 SR_CONF_ENABLED | SR_CONF_SET,
394 SR_CONF_VOLTAGE | SR_CONF_GET,
395 SR_CONF_CURRENT | SR_CONF_GET,
396 SR_CONF_VOLTAGE_TARGET | SR_CONF_SET | SR_CONF_LIST,
397 SR_CONF_CURRENT_LIMIT | SR_CONF_SET | SR_CONF_LIST,
398 SR_CONF_OVER_VOLTAGE_PROTECTION_THRESHOLD | SR_CONF_SET | SR_CONF_LIST,
399 SR_CONF_OVER_CURRENT_PROTECTION_ENABLED | SR_CONF_SET,
402 static const uint32_t hp_6630b_devopts[] = {
404 SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
405 SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
408 static const uint32_t hp_6630b_devopts_cg[] = {
409 SR_CONF_ENABLED | SR_CONF_GET | SR_CONF_SET,
410 SR_CONF_VOLTAGE | SR_CONF_GET,
411 SR_CONF_CURRENT | SR_CONF_GET,
412 SR_CONF_VOLTAGE_TARGET | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
413 SR_CONF_CURRENT_LIMIT | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
414 SR_CONF_OVER_VOLTAGE_PROTECTION_THRESHOLD | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
415 SR_CONF_OVER_CURRENT_PROTECTION_ENABLED | SR_CONF_GET | SR_CONF_SET,
418 static const struct channel_spec hp_6633a_ch[] = {
419 { "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 },
422 static const struct channel_spec hp_6631b_ch[] = {
423 { "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 },
426 static const struct channel_spec hp_6632b_ch[] = {
427 { "1", { 0, 20.475, 0.005, 3, 4 }, { 0, 5.1188, 0.00132, 4, 5 }, { 0, 104.80743 }, FREQ_DC_ONLY, { 0, 22, 0.1 }, NO_OCP_LIMITS },
430 static const struct channel_spec hp_66332a_ch[] = {
431 { "1", { 0, 20.475, 0.005, 3, 4 }, { 0, 5.1188, 0.00132, 4, 5 }, { 0, 104.80743 }, FREQ_DC_ONLY, { 0, 22, 0.1 }, NO_OCP_LIMITS },
434 static const struct channel_spec hp_6633b_ch[] = {
435 { "1", { 0, 51.188, 0.0125, 3, 4 }, { 0, 2.0475, 0.000526, 4, 5 }, { 0, 104.80743 }, FREQ_DC_ONLY, { 0, 55, 0.25 }, NO_OCP_LIMITS },
438 static const struct channel_spec hp_6634b_ch[] = {
439 { "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 },
442 static const struct channel_group_spec hp_663xx_cg[] = {
443 { "1", CH_IDX(0), 0 },
446 static const struct scpi_command hp_6630a_cmd[] = {
447 { SCPI_CMD_SET_OUTPUT_ENABLE, "OUT 1" },
448 { SCPI_CMD_SET_OUTPUT_DISABLE, "OUT 0" },
449 { SCPI_CMD_GET_MEAS_VOLTAGE, "VOUT?" },
450 { SCPI_CMD_GET_MEAS_CURRENT, "IOUT?" },
451 { SCPI_CMD_SET_VOLTAGE_TARGET, "VSET %.4f" },
452 { SCPI_CMD_SET_CURRENT_LIMIT, "ISET %.4f" },
453 { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_ENABLE, "OCP 1" },
454 { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_DISABLE, "OCP 0" },
455 { SCPI_CMD_SET_OVER_VOLTAGE_PROTECTION_THRESHOLD, "OVSET %.4f" },
459 static const struct scpi_command hp_6630b_cmd[] = {
460 { SCPI_CMD_REMOTE, "SYST:REM" },
461 { SCPI_CMD_LOCAL, "SYST:LOC" },
462 { SCPI_CMD_GET_OUTPUT_ENABLED, "OUTP:STAT?" },
463 { SCPI_CMD_SET_OUTPUT_ENABLE, "OUTP:STAT ON" },
464 { SCPI_CMD_SET_OUTPUT_DISABLE, "OUTP:STAT OFF" },
465 { SCPI_CMD_GET_MEAS_VOLTAGE, ":MEAS:VOLT?" },
466 { SCPI_CMD_GET_MEAS_CURRENT, ":MEAS:CURR?" },
467 { SCPI_CMD_GET_VOLTAGE_TARGET, ":SOUR:VOLT?" },
468 { SCPI_CMD_SET_VOLTAGE_TARGET, ":SOUR:VOLT %.6f" },
469 { SCPI_CMD_GET_CURRENT_LIMIT, ":SOUR:CURR?" },
470 { SCPI_CMD_SET_CURRENT_LIMIT, ":SOUR:CURR %.6f" },
471 { SCPI_CMD_GET_OVER_CURRENT_PROTECTION_ENABLED, ":CURR:PROT:STAT?" },
472 { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_ENABLE, ":CURR:PROT:STAT 1" },
473 { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_DISABLE, ":CURR:PROT:STAT 0" },
474 { SCPI_CMD_GET_OVER_VOLTAGE_PROTECTION_THRESHOLD, ":VOLT:PROT?" },
475 { SCPI_CMD_SET_OVER_VOLTAGE_PROTECTION_THRESHOLD, ":VOLT:PROT %.6f" },
479 /* Philips/Fluke PM2800 series */
480 static const uint32_t philips_pm2800_devopts[] = {
482 SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
483 SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
486 static const uint32_t philips_pm2800_devopts_cg[] = {
487 SR_CONF_ENABLED | SR_CONF_GET | SR_CONF_SET,
488 SR_CONF_VOLTAGE | SR_CONF_GET,
489 SR_CONF_VOLTAGE_TARGET | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
490 SR_CONF_CURRENT | SR_CONF_GET,
491 SR_CONF_CURRENT_LIMIT | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
492 SR_CONF_OVER_VOLTAGE_PROTECTION_ACTIVE | SR_CONF_GET,
493 SR_CONF_OVER_VOLTAGE_PROTECTION_THRESHOLD | SR_CONF_GET | SR_CONF_SET,
494 SR_CONF_OVER_CURRENT_PROTECTION_ENABLED | SR_CONF_GET | SR_CONF_SET,
495 SR_CONF_OVER_CURRENT_PROTECTION_ACTIVE | SR_CONF_GET,
496 SR_CONF_REGULATION | SR_CONF_GET,
499 enum philips_pm2800_modules {
500 PM2800_MOD_30V_10A = 1,
508 static const struct philips_pm2800_module_spec {
509 /* Min, max, programming resolution. */
513 } philips_pm2800_module_specs[] = {
514 /* Autoranging modules. */
515 [PM2800_MOD_30V_10A] = { { 0, 30, 0.0075, 2, 4 }, { 0, 10, 0.0025, 2, 4 }, { 0, 60 } },
516 [PM2800_MOD_60V_5A] = { { 0, 60, 0.015, 2, 3 }, { 0, 5, 0.00125, 2, 5 }, { 0, 60 } },
517 [PM2800_MOD_60V_10A] = { { 0, 60, 0.015, 2, 3 }, { 0, 10, 0.0025, 2, 5 }, { 0, 120 } },
518 /* Linear modules. */
519 [PM2800_MOD_8V_15A] = { { 0, 8, 0.002, 3, 3 }, { -15, 15, 0.00375, 3, 5 }, { 0, 120 } },
520 [PM2800_MOD_60V_2A] = { { 0, 60, 0.015, 2, 3 }, { -2, 2, 0.0005, 3, 4 }, { 0, 120 } },
521 [PM2800_MOD_120V_1A] = { { 0, 120, 0.030, 2, 2 }, { -1, 1, 0.00025, 3, 5 }, { 0, 120 } },
524 static const struct philips_pm2800_model {
525 unsigned int chassis;
526 unsigned int num_modules;
528 unsigned int modules[3];
529 } philips_pm2800_matrix[] = {
530 /* Autoranging chassis. */
531 { 1, 1, 0, { PM2800_MOD_30V_10A, 0, 0 } },
532 { 1, 1, 1, { PM2800_MOD_60V_5A, 0, 0 } },
533 { 1, 2, 0, { PM2800_MOD_30V_10A, PM2800_MOD_30V_10A, 0 } },
534 { 1, 2, 1, { PM2800_MOD_60V_5A, PM2800_MOD_60V_5A, 0 } },
535 { 1, 2, 2, { PM2800_MOD_30V_10A, PM2800_MOD_60V_5A, 0 } },
536 { 1, 2, 3, { PM2800_MOD_30V_10A, PM2800_MOD_60V_10A, 0 } },
537 { 1, 2, 4, { PM2800_MOD_60V_5A, PM2800_MOD_60V_10A, 0 } },
538 { 1, 3, 0, { PM2800_MOD_30V_10A, PM2800_MOD_30V_10A, PM2800_MOD_30V_10A } },
539 { 1, 3, 1, { PM2800_MOD_60V_5A, PM2800_MOD_60V_5A, PM2800_MOD_60V_5A } },
540 { 1, 3, 2, { PM2800_MOD_30V_10A, PM2800_MOD_30V_10A, PM2800_MOD_60V_5A } },
541 { 1, 3, 3, { PM2800_MOD_30V_10A, PM2800_MOD_60V_5A, PM2800_MOD_60V_5A } },
542 /* Linear chassis. */
543 { 3, 1, 0, { PM2800_MOD_60V_2A, 0, 0 } },
544 { 3, 1, 1, { PM2800_MOD_120V_1A, 0, 0 } },
545 { 3, 1, 2, { PM2800_MOD_8V_15A, 0, 0 } },
546 { 3, 2, 0, { PM2800_MOD_60V_2A, 0, 0 } },
547 { 3, 2, 1, { PM2800_MOD_120V_1A, 0, 0 } },
548 { 3, 2, 2, { PM2800_MOD_60V_2A, PM2800_MOD_120V_1A, 0 } },
549 { 3, 2, 3, { PM2800_MOD_8V_15A, PM2800_MOD_8V_15A, 0 } },
552 static const char *philips_pm2800_names[] = { "1", "2", "3" };
554 static int philips_pm2800_probe_channels(struct sr_dev_inst *sdi,
555 struct sr_scpi_hw_info *hw_info,
556 struct channel_spec **channels, unsigned int *num_channels,
557 struct channel_group_spec **channel_groups, unsigned int *num_channel_groups)
559 const struct philips_pm2800_model *model;
560 const struct philips_pm2800_module_spec *spec;
561 unsigned int chassis, num_modules, set, module, m, i;
566 * The model number as reported by *IDN? looks like e.g. PM2813/11,
567 * Where "PM28" is fixed, followed by the chassis code (1 = autoranging,
568 * 3 = linear series) and the number of modules: 1-3 for autoranging,
570 * After the slash, the first digit denotes the module set. The
571 * digit after that denotes front (5) or rear (1) binding posts.
573 chassis = hw_info->model[4] - 0x30;
574 num_modules = hw_info->model[5] - 0x30;
575 set = hw_info->model[7] - 0x30;
576 for (m = 0; m < ARRAY_SIZE(philips_pm2800_matrix); m++) {
577 model = &philips_pm2800_matrix[m];
578 if (model->chassis == chassis && model->num_modules == num_modules
579 && model->set == set)
582 if (m == ARRAY_SIZE(philips_pm2800_matrix)) {
583 sr_dbg("Model %s not found in matrix.", hw_info->model);
587 sr_dbg("Found %d output channel%s:", num_modules, num_modules > 1 ? "s" : "");
588 *channels = g_malloc0(sizeof(struct channel_spec) * num_modules);
589 *channel_groups = g_malloc0(sizeof(struct channel_group_spec) * num_modules);
590 for (i = 0; i < num_modules; i++) {
591 module = model->modules[i];
592 spec = &philips_pm2800_module_specs[module];
593 sr_dbg("output %d: %.0f - %.0fV, %.0f - %.0fA, %.0f - %.0fW", i + 1,
594 spec->voltage[0], spec->voltage[1],
595 spec->current[0], spec->current[1],
596 spec->power[0], spec->power[1]);
597 (*channels)[i].name = (char *)philips_pm2800_names[i];
598 memcpy(&((*channels)[i].voltage), spec, sizeof(double) * 15);
599 (*channel_groups)[i].name = (char *)philips_pm2800_names[i];
600 (*channel_groups)[i].channel_index_mask = 1 << i;
601 (*channel_groups)[i].features = PPS_OTP | PPS_OVP | PPS_OCP;
603 *num_channels = *num_channel_groups = num_modules;
608 static const struct scpi_command philips_pm2800_cmd[] = {
609 { SCPI_CMD_SELECT_CHANNEL, ":INST:NSEL %s" },
610 { SCPI_CMD_GET_MEAS_VOLTAGE, ":MEAS:VOLT?" },
611 { SCPI_CMD_GET_MEAS_CURRENT, ":MEAS:CURR?" },
612 { SCPI_CMD_GET_VOLTAGE_TARGET, ":SOUR:VOLT?" },
613 { SCPI_CMD_SET_VOLTAGE_TARGET, ":SOUR:VOLT %.6f" },
614 { SCPI_CMD_GET_CURRENT_LIMIT, ":SOUR:CURR?" },
615 { SCPI_CMD_SET_CURRENT_LIMIT, ":SOUR:CURR %.6f" },
616 { SCPI_CMD_GET_OUTPUT_ENABLED, ":OUTP?" },
617 { SCPI_CMD_SET_OUTPUT_ENABLE, ":OUTP ON" },
618 { SCPI_CMD_SET_OUTPUT_DISABLE, ":OUTP OFF" },
619 { SCPI_CMD_GET_OUTPUT_REGULATION, ":SOUR:FUNC:MODE?" },
620 { SCPI_CMD_GET_OVER_VOLTAGE_PROTECTION_ACTIVE, ":SOUR:VOLT:PROT:TRIP?" },
621 { SCPI_CMD_GET_OVER_VOLTAGE_PROTECTION_THRESHOLD, ":SOUR:VOLT:PROT:LEV?" },
622 { SCPI_CMD_SET_OVER_VOLTAGE_PROTECTION_THRESHOLD, ":SOUR:VOLT:PROT:LEV %.6f" },
623 { SCPI_CMD_GET_OVER_CURRENT_PROTECTION_ENABLED, ":SOUR:CURR:PROT:STAT?" },
624 { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_ENABLE, ":SOUR:CURR:PROT:STAT ON" },
625 { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_DISABLE, ":SOUR:CURR:PROT:STAT OFF" },
626 { SCPI_CMD_GET_OVER_CURRENT_PROTECTION_ACTIVE, ":SOUR:CURR:PROT:TRIP?" },
630 static const uint32_t rs_hmc8043_devopts[] = {
632 SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
633 SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
636 static const uint32_t rs_hmc8043_devopts_cg[] = {
637 SR_CONF_OVER_VOLTAGE_PROTECTION_ENABLED | SR_CONF_GET | SR_CONF_SET,
638 SR_CONF_OVER_VOLTAGE_PROTECTION_ACTIVE | SR_CONF_GET,
639 SR_CONF_OVER_VOLTAGE_PROTECTION_THRESHOLD | SR_CONF_GET | SR_CONF_SET,
640 SR_CONF_VOLTAGE | SR_CONF_GET,
641 SR_CONF_VOLTAGE_TARGET | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
642 SR_CONF_CURRENT | SR_CONF_GET,
643 SR_CONF_CURRENT_LIMIT | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
644 SR_CONF_ENABLED | SR_CONF_GET | SR_CONF_SET,
647 static const struct channel_spec rs_hmc8043_ch[] = {
648 { "1", { 0, 32.050, 0.001, 3, 4 }, { 0.001, 3, 0.001, 3, 4 }, { 0, 0, 0, 0, 4 }, FREQ_DC_ONLY, NO_OVP_LIMITS, NO_OCP_LIMITS },
649 { "2", { 0, 32.050, 0.001, 3, 4 }, { 0.001, 3, 0.001, 3, 4 }, { 0, 0, 0, 0, 4 }, FREQ_DC_ONLY, NO_OVP_LIMITS, NO_OCP_LIMITS },
650 { "3", { 0, 32.050, 0.001, 3, 4 }, { 0.001, 3, 0.001, 3, 4 }, { 0, 0, 0, 0, 4 }, FREQ_DC_ONLY, NO_OVP_LIMITS, NO_OCP_LIMITS },
653 static const struct channel_group_spec rs_hmc8043_cg[] = {
654 { "1", CH_IDX(0), PPS_OVP },
655 { "2", CH_IDX(1), PPS_OVP },
656 { "3", CH_IDX(2), PPS_OVP },
659 static const struct scpi_command rs_hmc8043_cmd[] = {
660 { SCPI_CMD_SELECT_CHANNEL, "INST:NSEL %s" },
661 { SCPI_CMD_GET_MEAS_VOLTAGE, "MEAS:VOLT?" },
662 { SCPI_CMD_GET_MEAS_CURRENT, "MEAS:CURR?" },
663 { SCPI_CMD_GET_VOLTAGE_TARGET, "VOLT?" },
664 { SCPI_CMD_SET_VOLTAGE_TARGET, "VOLT %.6f" },
665 { SCPI_CMD_GET_CURRENT_LIMIT, "CURR?" },
666 { SCPI_CMD_SET_CURRENT_LIMIT, "CURR %.6f" },
667 { SCPI_CMD_GET_OUTPUT_ENABLED, "OUTP?" },
668 { SCPI_CMD_SET_OUTPUT_ENABLE, "OUTP ON" },
669 { SCPI_CMD_SET_OUTPUT_DISABLE, "OUTP OFF" },
670 { SCPI_CMD_GET_OVER_VOLTAGE_PROTECTION_ACTIVE, "VOLT:PROT:TRIP?" },
671 { SCPI_CMD_GET_OVER_VOLTAGE_PROTECTION_THRESHOLD, "VOLT:PROT:LEV?" },
672 { SCPI_CMD_SET_OVER_VOLTAGE_PROTECTION_THRESHOLD, "VOLT:PROT:LEV %.6f" },
673 { SCPI_CMD_GET_OVER_VOLTAGE_PROTECTION_ENABLED, "VOLT:PROT:STAT?" },
674 { SCPI_CMD_SET_OVER_VOLTAGE_PROTECTION_ENABLE, "VOLT:PROT:STAT ON" },
675 { SCPI_CMD_SET_OVER_VOLTAGE_PROTECTION_DISABLE, "VOLT:PROT:STAT OFF" },
679 SR_PRIV const struct scpi_pps pps_profiles[] = {
681 { "Agilent", "N5763A", 0,
682 ARRAY_AND_SIZE(agilent_n5700a_devopts),
683 ARRAY_AND_SIZE(agilent_n5700a_devopts_cg),
684 ARRAY_AND_SIZE(agilent_n5763a_ch),
685 ARRAY_AND_SIZE(agilent_n5700a_cg),
687 .probe_channels = NULL,
691 { "Agilent", "N5767A", 0,
692 ARRAY_AND_SIZE(agilent_n5700a_devopts),
693 ARRAY_AND_SIZE(agilent_n5700a_devopts_cg),
694 ARRAY_AND_SIZE(agilent_n5767a_ch),
695 ARRAY_AND_SIZE(agilent_n5700a_cg),
697 .probe_channels = NULL,
701 { "Chroma", "61604", 0,
702 ARRAY_AND_SIZE(chroma_61604_devopts),
703 ARRAY_AND_SIZE(chroma_61604_devopts_cg),
704 ARRAY_AND_SIZE(chroma_61604_ch),
705 ARRAY_AND_SIZE(chroma_61604_cg),
707 .probe_channels = NULL,
710 /* Chroma 62000 series */
711 { "Chroma", "620[0-9]{2}P-[0-9]{2,3}-[0-9]{1,3}", 0,
712 ARRAY_AND_SIZE(chroma_62000_devopts),
713 ARRAY_AND_SIZE(chroma_62000_devopts_cg),
717 .probe_channels = chroma_62000p_probe_channels,
722 ARRAY_AND_SIZE(hp_6630a_devopts),
723 ARRAY_AND_SIZE(hp_6630a_devopts_cg),
724 ARRAY_AND_SIZE(hp_6633a_ch),
725 ARRAY_AND_SIZE(hp_663xx_cg),
727 .probe_channels = NULL,
731 { "HP", "6631B", PPS_OVP | PPS_OCP | PPS_OTP,
732 ARRAY_AND_SIZE(hp_6630b_devopts),
733 ARRAY_AND_SIZE(hp_6630b_devopts_cg),
734 ARRAY_AND_SIZE(hp_6631b_ch),
735 ARRAY_AND_SIZE(hp_663xx_cg),
737 .probe_channels = NULL,
741 { "HP", "6632B", PPS_OVP | PPS_OCP | PPS_OTP,
742 ARRAY_AND_SIZE(hp_6630b_devopts),
743 ARRAY_AND_SIZE(hp_6630b_devopts_cg),
744 ARRAY_AND_SIZE(hp_6632b_ch),
745 ARRAY_AND_SIZE(hp_663xx_cg),
747 .probe_channels = NULL,
751 { "HP", "66332A", PPS_OVP | PPS_OCP | PPS_OTP,
752 ARRAY_AND_SIZE(hp_6630b_devopts),
753 ARRAY_AND_SIZE(hp_6630b_devopts_cg),
754 ARRAY_AND_SIZE(hp_66332a_ch),
755 ARRAY_AND_SIZE(hp_663xx_cg),
757 .probe_channels = NULL,
761 { "HP", "6633B", PPS_OVP | PPS_OCP | PPS_OTP,
762 ARRAY_AND_SIZE(hp_6630b_devopts),
763 ARRAY_AND_SIZE(hp_6630b_devopts_cg),
764 ARRAY_AND_SIZE(hp_6633b_ch),
765 ARRAY_AND_SIZE(hp_663xx_cg),
767 .probe_channels = NULL,
771 { "HP", "6634B", PPS_OVP | PPS_OCP | PPS_OTP,
772 ARRAY_AND_SIZE(hp_6630b_devopts),
773 ARRAY_AND_SIZE(hp_6630b_devopts_cg),
774 ARRAY_AND_SIZE(hp_6634b_ch),
775 ARRAY_AND_SIZE(hp_663xx_cg),
777 .probe_channels = NULL,
780 /* Rigol DP700 series */
781 { "Rigol", "^DP711$", 0,
782 ARRAY_AND_SIZE(rigol_dp700_devopts),
783 ARRAY_AND_SIZE(rigol_dp700_devopts_cg),
784 ARRAY_AND_SIZE(rigol_dp711_ch),
785 ARRAY_AND_SIZE(rigol_dp700_cg),
787 .probe_channels = NULL,
789 { "Rigol", "^DP712$", 0,
790 ARRAY_AND_SIZE(rigol_dp700_devopts),
791 ARRAY_AND_SIZE(rigol_dp700_devopts_cg),
792 ARRAY_AND_SIZE(rigol_dp712_ch),
793 ARRAY_AND_SIZE(rigol_dp700_cg),
795 .probe_channels = NULL,
798 /* Rigol DP800 series */
799 { "Rigol", "^DP821A$", PPS_OTP,
800 ARRAY_AND_SIZE(rigol_dp800_devopts),
801 ARRAY_AND_SIZE(rigol_dp800_devopts_cg),
802 ARRAY_AND_SIZE(rigol_dp821a_ch),
803 ARRAY_AND_SIZE(rigol_dp820_cg),
805 .probe_channels = NULL,
807 { "Rigol", "^DP831A$", PPS_OTP,
808 ARRAY_AND_SIZE(rigol_dp800_devopts),
809 ARRAY_AND_SIZE(rigol_dp800_devopts_cg),
810 ARRAY_AND_SIZE(rigol_dp831_ch),
811 ARRAY_AND_SIZE(rigol_dp830_cg),
813 .probe_channels = NULL,
815 { "Rigol", "^(DP832|DP832A)$", PPS_OTP,
816 ARRAY_AND_SIZE(rigol_dp800_devopts),
817 ARRAY_AND_SIZE(rigol_dp800_devopts_cg),
818 ARRAY_AND_SIZE(rigol_dp832_ch),
819 ARRAY_AND_SIZE(rigol_dp830_cg),
821 .probe_channels = NULL,
824 /* Philips/Fluke PM2800 series */
825 { "Philips", "^PM28[13][123]/[01234]{1,2}$", 0,
826 ARRAY_AND_SIZE(philips_pm2800_devopts),
827 ARRAY_AND_SIZE(philips_pm2800_devopts_cg),
831 philips_pm2800_probe_channels,
834 /* Rohde & Schwarz HMC8043 */
835 { "Rohde&Schwarz", "HMC8043", 0,
836 ARRAY_AND_SIZE(rs_hmc8043_devopts),
837 ARRAY_AND_SIZE(rs_hmc8043_devopts_cg),
838 ARRAY_AND_SIZE(rs_hmc8043_ch),
839 ARRAY_AND_SIZE(rs_hmc8043_cg),
841 .probe_channels = NULL,
845 SR_PRIV unsigned int num_pps_profiles = ARRAY_SIZE(pps_profiles);