|
98 | 98 | ---@field nplc number | nil |
99 | 99 | ---@field aperture number | nil |
100 | 100 | ---@field rate `CONSTANTS.RATE_FAST` | `CONSTANTS.RATE_NORMAL` | nil |
| 101 | + ---@field range number | "AUTO" The range to use, or Auto |
101 | 102 | -- ---@field autozero boolean Whether autozero should be turned on or not |
102 | 103 | ---@field count integer The number of measurments to take |
103 | 104 | -- ---@field filter_enable boolean Whether to enable the filter or not |
|
386 | 387 | elseif self.measure.aperture ~= nil then |
387 | 388 | self.channel.measure.aperture = self.measure.aperture |
388 | 389 | end |
| 390 | + -- range |
| 391 | + if self.measure.range == CONSTANTS.AUTO then |
| 392 | + if self.measure.func == CONSTANTS.FUNC_DC_VOLTAGE then |
| 393 | + self.channel.measure.autorangev = self.slot.smu.ON |
| 394 | + elseif self.measure.func == CONSTANTS.FUNC_DC_CURRENT then |
| 395 | + self.channel.measure.autorangei = self.slot.smu.ON |
| 396 | + end |
| 397 | + else |
| 398 | + if self.measure.func == CONSTANTS.FUNC_DC_VOLTAGE then |
| 399 | + self.channel.measure.rangev = self.measure.range |
| 400 | + elseif self.measure.func == CONSTANTS.FUNC_DC_CURRENT then |
| 401 | + self.channel.measure.rangei = self.measure.range |
| 402 | + end |
| 403 | + end |
389 | 404 | -- count |
390 | 405 | self.channel.measure.count = self.measure.count |
391 | 406 | -- TODO: filter_enable |
|
788 | 803 | self.channel.measure.rate = self.channel.RATE_NORMAL |
789 | 804 | end |
790 | 805 | end |
| 806 | + -- range |
| 807 | + if self.measure.range == CONSTANTS.AUTO then |
| 808 | + if self.measure.func == CONSTANTS.FUNC_DC_VOLTAGE then |
| 809 | + self.channel.measure.autorangev = self.slot.psu.ON |
| 810 | + elseif self.measure.func == CONSTANTS.FUNC_DC_CURRENT then |
| 811 | + self.channel.measure.autorangei = self.slot.psu.ON |
| 812 | + end |
| 813 | + else |
| 814 | + if self.measure.func == CONSTANTS.FUNC_DC_VOLTAGE then |
| 815 | + self.channel.measure.rangev = self.measure.range |
| 816 | + elseif self.measure.func == CONSTANTS.FUNC_DC_CURRENT then |
| 817 | + self.channel.measure.rangei = self.measure.range |
| 818 | + end |
| 819 | + end |
791 | 820 | -- count |
792 | 821 | self.channel.measure.count = self.measure.count |
793 | 822 | -- TODO: filter_enable |
|
1309 | 1338 | <substitute name="BIAS-DEVICE:SRANGE">%SRANGE%</substitute> |
1310 | 1339 | <substitute name="BIAS-DEVICE:BIAS">%BIAS%</substitute> |
1311 | 1340 | <substitute name="BIAS-DEVICE:MFUNCTION">%MFUNCTION%</substitute> |
| 1341 | + <substitute name="BIAS-DEVICE:MRANGE">%MRANGE%</substitute> |
1312 | 1342 | <substitute name="BIAS-DEVICE:SENSE">%SENSE%</substitute> |
1313 | 1343 | <substitute name="BIAS-DEVICE:LIMITI">%LIMITI%</substitute> |
1314 | 1344 | <substitute name="BIAS-DEVICE:LIMITV">%LIMITV%</substitute> |
|
1329 | 1359 | }, |
1330 | 1360 | measure = { |
1331 | 1361 | nplc = nplc, |
| 1362 | + range = %MRANGE%, |
1332 | 1363 | aperture = aperture, |
1333 | 1364 | count = measure_count, |
1334 | 1365 | delay = measure_delay, |
|
1386 | 1417 | <substitute name="STEP-DEVICE:START">%START%</substitute> |
1387 | 1418 | <substitute name="STEP-DEVICE:STOP">%STOP%</substitute> |
1388 | 1419 | <substitute name="STEP-DEVICE:LIST">%LIST%</substitute> |
| 1420 | + <substitute name="STEP-DEVICE:MRANGE">%MRANGE%</substitute> |
1389 | 1421 | <substitute name="STEP-DEVICE:MFUNCTION">%MFUNCTION%</substitute> |
1390 | 1422 | <substitute name="STEP-DEVICE:SENSE">%SENSE%</substitute> |
1391 | 1423 | <substitute name="STEP-DEVICE:LIMITI">%LIMITI%</substitute> |
|
1435 | 1467 | }, |
1436 | 1468 | measure = { |
1437 | 1469 | nplc = nplc, |
| 1470 | + range = %MRANGE%, |
1438 | 1471 | aperture = aperture, |
1439 | 1472 | count = measure_count, |
1440 | 1473 | delay = measure_delay, |
|
1491 | 1524 | <substitute name="SWEEP-DEVICE:SRANGE">%SRANGE%</substitute> |
1492 | 1525 | <substitute name="SWEEP-DEVICE:START">%START%</substitute> |
1493 | 1526 | <substitute name="SWEEP-DEVICE:STOP">%STOP%</substitute> |
1494 | | - <substitute name="SWEEP-DEVICE:LIST">%LIST%</substitute> |
| 1527 | + <substitute name="SWEEP-DEVICE:LIST">%LIST%</substitute> |
| 1528 | + <substitute name="SWEEP-DEVICE:MRANGE">%MRANGE%</substitute> |
1495 | 1529 | <substitute name="SWEEP-DEVICE:MFUNCTION">%MFUNCTION%</substitute> |
1496 | 1530 | <substitute name="SWEEP-DEVICE:SENSE">%SENSE%</substitute> |
1497 | 1531 | <substitute name="SWEEP-DEVICE:LIMITI">%LIMITI%</substitute> |
|
1541 | 1575 | }, |
1542 | 1576 | measure = { |
1543 | 1577 | nplc = nplc, |
| 1578 | + range = %MRANGE%, |
1544 | 1579 | aperture = aperture, |
1545 | 1580 | count = measure_count, |
1546 | 1581 | delay = measure_delay, |
|
0 commit comments