| 1 | = Agilent 53181 周波数カウンタ = |
| 2 | |
| 3 | * KEK 下ヶ橋さん作成 |
| 4 | * ページ最下部から、直接ダウンロード可能 |
| 5 | |
| 6 | {{{ |
| 7 | Terminator = LF; |
| 8 | |
| 9 | #LockTimeout = 10000; |
| 10 | #WriteTimeout = 10000; |
| 11 | ReplyTimeout = 10000; ## 10000ms |
| 12 | #ReadTimeout = 10000; |
| 13 | |
| 14 | # |
| 15 | ############### *IDN? ############### |
| 16 | getIDN { |
| 17 | out "*IDN?"; in "%39c"; |
| 18 | } |
| 19 | |
| 20 | ############## *RST ############### |
| 21 | setRST { |
| 22 | out "*RST"; |
| 23 | } |
| 24 | |
| 25 | ############## *CLS ############### |
| 26 | setCLS { |
| 27 | out "*CLS"; |
| 28 | } |
| 29 | |
| 30 | ############## *SRE0 ############### |
| 31 | setSRE0 { |
| 32 | out "*SRE 0"; |
| 33 | } |
| 34 | |
| 35 | ############## *ESE0 ############### |
| 36 | setESE0 { |
| 37 | out "*ESE 0"; |
| 38 | } |
| 39 | |
| 40 | ############## STATUS PRESET ############### |
| 41 | setSTPR { |
| 42 | out ":STAT:PRES"; |
| 43 | } |
| 44 | |
| 45 | ############## FILTER OFForON ############### |
| 46 | getFILT { |
| 47 | out ":INPUT1:FILTER?"; in "%{0|1}"; |
| 48 | } |
| 49 | |
| 50 | setFILT { |
| 51 | out ":INPUT1:FILTER %{OFF|ON}"; |
| 52 | @init { getFILT; } |
| 53 | } |
| 54 | |
| 55 | ############## TRIGGER LEVEL AUTO ############### |
| 56 | getLEVAU { |
| 57 | out ":EVENT1:LEVEL:AUTO?"; in "%{0|1}"; |
| 58 | } |
| 59 | |
| 60 | setLEVAU { |
| 61 | out ":EVENT1:LEVEL:AUTO %{OFF|ON}"; |
| 62 | @init { getLEVAU; } |
| 63 | } |
| 64 | |
| 65 | ############### TRIGGER LEVEL ############### |
| 66 | getLEV { |
| 67 | out ":EVENT1:LEVEL?"; in "%f"; |
| 68 | } |
| 69 | |
| 70 | setLEV { |
| 71 | out ":EVENT1:LEVEL %f"; |
| 72 | @init { getLEV; } |
| 73 | } |
| 74 | |
| 75 | ############## COUPLING ############### |
| 76 | getCOUP { |
| 77 | out ":INPUT1:COUP?"; in "%{AC|DC}"; |
| 78 | } |
| 79 | |
| 80 | setCOUP { |
| 81 | out ":INPUT1:COUP %{AC|DC}"; |
| 82 | @init { getCOUP; } |
| 83 | } |
| 84 | |
| 85 | ############### IMPEDANCE ############### |
| 86 | getIMP { |
| 87 | out ":INPUT1:IMP?"; in "%f"; |
| 88 | } |
| 89 | |
| 90 | setIMP { |
| 91 | out ":INPUT1:IMP %f"; |
| 92 | @init { getIMP; } |
| 93 | } |
| 94 | |
| 95 | ############## TRIGGER SLOPE ############### |
| 96 | getSLOP { |
| 97 | out ":EVENT1:SLOPE?"; in "%{POS|NEG}"; |
| 98 | } |
| 99 | |
| 100 | setSLOP { |
| 101 | out ":EVENT1:SLOPE %{POS|NEG}"; |
| 102 | @init { getSLOP; } |
| 103 | } |
| 104 | |
| 105 | ############### CHANNEL SELECT ############### |
| 106 | getSENS { |
| 107 | out ":FUNC?"; in "%39c"; |
| 108 | # out ":FUNC?"; in "%{""FREQ""|""FREQ 2""}"; ##umaku ikazu... |
| 109 | } |
| 110 | |
| 111 | setSENS { |
| 112 | out ":FUNC 'FREQ %{1|2}'"; |
| 113 | # @init { getSENS; } |
| 114 | } |
| 115 | |
| 116 | ############## GATE MODE ############### |
| 117 | getGAMO { |
| 118 | out ":FREQ:ARM:STOP:SOUR?"; in "%{IMM|EXT|TIM|DIG}"; |
| 119 | } |
| 120 | |
| 121 | setGAMO { |
| 122 | out ":FREQ:ARM:STOP:SOUR %{IMM|EXT|TIM|DIG}"; |
| 123 | @init { getGAMO; } |
| 124 | } |
| 125 | |
| 126 | ############### GATE TIMER ############### |
| 127 | getGATI { |
| 128 | out ":FREQ:ARM:STOP:TIM?"; in "%f"; |
| 129 | } |
| 130 | |
| 131 | setGATI { |
| 132 | out ":FREQ:ARM:STOP:TIM %f"; |
| 133 | @init { getGATI; } |
| 134 | } |
| 135 | |
| 136 | ############### FREQUENCY? ############### |
| 137 | getFREQ { |
| 138 | out ":READ:FREQ?"; in "%f"; |
| 139 | # wait 10000; |
| 140 | # event 10000; |
| 141 | # connect 10000; |
| 142 | |
| 143 | } |
| 144 | |
| 145 | ############### DATA? ############### |
| 146 | getDATA { |
| 147 | out ":DATA?"; in "%f"; |
| 148 | } |
| 149 | |
| 150 | |
| 151 | |
| 152 | ############### RUN MODE ############### |
| 153 | #setRUN { |
| 154 | # out ":INIT:CONT ON"; |
| 155 | #} |
| 156 | |
| 157 | getRUN { |
| 158 | out ":INIT:CONT?"; in "%{0|1}"; |
| 159 | } |
| 160 | |
| 161 | setRUN { |
| 162 | out ":INIT:CONT %{OFF|ON}"; |
| 163 | @init { getRUN; } |
| 164 | } |
| 165 | |
| 166 | }}} |