|
33 | 33 | <substitute name="MEASURE-DELAY">%MEASURE-DELAY%</substitute> |
34 | 34 | <substitute name="EFFECTIVE-FILTER-COUNT">%EFFECTIVE-FILTER-COUNT%</substitute> |
35 | 35 | <snippet> |
36 | | - ---@diagnostic disable: deprecated |
37 | | - reset(true) |
38 | | - |
39 | | - LOGEVENTS = false |
40 | | - |
41 | | - local lognumber = 0 |
42 | | - local function logevent(device, message) |
43 | | - if LOGEVENTS then |
44 | | - device.slot.trigger.model.addblock.logevent(device.trigger_model, device.trigger_model .. lognumber, |
45 | | - device.slot.trigger.model.LOG_INFO1, device.channel_idx .. ": " .. message) |
46 | | - lognumber = lognumber + 1 |
47 | | - end |
48 | | - end |
49 | | - |
50 | 36 | ---------------------------------------------------------------------------- |
51 | 37 | -- START OF SWEEP SEGMENT ... do not modify this section |
52 | 38 | ---------------------------------------------------------------------------- |
|
1662 | 1648 | </composite> |
1663 | 1649 |
|
1664 | 1650 | <snippet> |
| 1651 | + |
| 1652 | + print("Init...") |
1665 | 1653 | Init(nodes) |
| 1654 | + print("Reset...") |
1666 | 1655 | Reset(nodes) |
| 1656 | + print("Configuring Channels...") |
1667 | 1657 | ConfigureChannels(nodes) |
| 1658 | + print("Configuring Trigger Model...") |
1668 | 1659 | ConfigureTriggerModel(nodes) |
| 1660 | + print("STEPS: " .. UTILITY.STEP_COUNT .. " SWEEPS: " .. UTILITY.SWEEP_COUNT .. " TOTAL: " .. UTILITY.TOTAL_COUNT) |
| 1661 | + print("Turning on Channels...") |
1669 | 1662 | TurnOnChannels(nodes) |
| 1663 | + print("Initiate Trigger Model...") |
1670 | 1664 | InitiateTriggerModels(nodes) |
| 1665 | + print("waitcomplete...") |
1671 | 1666 | waitcomplete() |
| 1667 | + print("Turn Off Channels...") |
1672 | 1668 | TurnOffChannels(nodes) |
1673 | 1669 | waitcomplete() |
1674 | 1670 | end |
1675 | 1671 |
|
1676 | 1672 | _Sweep() |
| 1673 | + |
| 1674 | + function iv_to_string(t) |
| 1675 | + if t == CONSTANTS.FUNC_DC_CURRENT then |
| 1676 | + return "CURRENT" |
| 1677 | + end |
| 1678 | + if t == CONSTANTS.FUNC_DC_VOLTAGE then |
| 1679 | + return "VOLTAGE" |
| 1680 | + end |
| 1681 | + end |
| 1682 | + |
| 1683 | + for i, n in ipairs(nodes.biases) do |
| 1684 | + for _, buf in ipairs(n.measure.buffers) do |
| 1685 | + print() |
| 1686 | + print("----------------------") |
| 1687 | + print("- BIAS[".. i .."] ".. iv_to_string(buf.type).." -") |
| 1688 | + print("----------------------") |
| 1689 | + printbuffer(1, buf.buffer.n, buf.buffer) |
| 1690 | + end |
| 1691 | + end |
| 1692 | + |
| 1693 | + for i, n in ipairs(nodes.steps) do |
| 1694 | + for _, buf in ipairs(n.measure.buffers) do |
| 1695 | + print() |
| 1696 | + print("----------------------") |
| 1697 | + print("- STEP[".. i .."] ".. iv_to_string(buf.type).." -") |
| 1698 | + print("----------------------") |
| 1699 | + printbuffer(1, buf.buffer.n, buf.buffer) |
| 1700 | + end |
| 1701 | + end |
| 1702 | + |
| 1703 | + for i, n in ipairs(nodes.sweeps) do |
| 1704 | + for _, buf in ipairs(n.measure.buffers) do |
| 1705 | + print() |
| 1706 | + print() |
| 1707 | + print("----------------------") |
| 1708 | + print("- SWEEP[".. i .."] ".. iv_to_string(buf.type).." -") |
| 1709 | + print("----------------------") |
| 1710 | + printbuffer(1, buf.buffer.n, buf.buffer) |
| 1711 | + end |
| 1712 | + end |
| 1713 | + |
1677 | 1714 | </snippet> |
1678 | 1715 | </composite> |
0 commit comments