|
| 1 | +Terminator = CR; |
| 2 | + |
| 3 | +emission_ctrl { |
| 4 | + out "LC,%i"; |
| 5 | + in "LC"; |
| 6 | + @mismatch {in "%(\$1:errorString)s";} |
| 7 | +} |
| 8 | + |
| 9 | +setMode { |
| 10 | + out "%s"; |
| 11 | + in "%(\$1:mode_RBV)s"; |
| 12 | + @mismatch {in "%(\$1:errorString)s";} |
| 13 | +} |
| 14 | + |
| 15 | +autoZero { |
| 16 | + out "ZS,%i,\$1"; |
| 17 | + in "ZS"; |
| 18 | + @mismatch {in "%(\$2:\$1:errorString)s";} |
| 19 | +} |
| 20 | + |
| 21 | +setOffset { |
| 22 | + out "SW,OF,\$1,%+08.4f"; |
| 23 | + in "SW,OF"; |
| 24 | + @mismatch {in "%(\$2:\$1:errorString)s";} |
| 25 | +} |
| 26 | + |
| 27 | +setOffsetStr { |
| 28 | + out "SW,OF,\$1,%s"; |
| 29 | + in "SW,OF"; |
| 30 | + @mismatch {in "%(\$2:\$1:errorString)s";} |
| 31 | +} |
| 32 | + |
| 33 | +getOffset { |
| 34 | + out "SR,OF,\$1"; |
| 35 | + in "SR,OF,\$1,%f"; |
| 36 | + @mismatch {in "%(\$2:\$1:errorString)s";} |
| 37 | +} |
| 38 | + |
| 39 | +setScaling { |
| 40 | + out "SW,SC,\$1,+00.0000,+00.0000,+01.0000,%+08.4f"; |
| 41 | + in "SW,SC"; |
| 42 | + @mismatch {in "%(\$2:\$1:errorString)s";} |
| 43 | +} |
| 44 | + |
| 45 | +setScalingStr { |
| 46 | + out "SW,SC,\$1,%s"; |
| 47 | + in "SW,SC"; |
| 48 | + @mismatch {in "%(\$2:\$1:errorString)s";} |
| 49 | +} |
| 50 | + |
| 51 | + |
| 52 | +getScaling { |
| 53 | + out "SR,SC,\$1"; |
| 54 | + in "SR,SC,\$1,%*f,%*f,%*f,%f"; |
| 55 | + @mismatch {in "%(\$2:\$1:errorString)s";} |
| 56 | +} |
| 57 | + |
| 58 | +# Measurement value get request options. |
| 59 | +# 0: Measurement value only |
| 60 | +# 1: Measurement value + Measurement result information |
| 61 | +# 2: Measurement value + Judgment result |
| 62 | +# 3: Measurement value + Measurement result information + Judgment result |
| 63 | +# 4: Count value + Measurement value |
| 64 | +# 5: Count value + Measurement value + Measurement result information |
| 65 | +# 6: Count value + Measurement value + Judgment result |
| 66 | +# 7: Count value + Measurement value + Measurement result information + Judgment result |
| 67 | + |
| 68 | + |
| 69 | +getMeas { |
| 70 | + out "MS,%(\$2:\$1:measType)i,\$1"; |
| 71 | + in "MS,%(\$2:\$1:measString)s"; |
| 72 | + @mismatch {in "%(\$2:\$1:errorString)s";} |
| 73 | +} |
| 74 | + |
| 75 | +# generic send/receive a command. Note that it requires the first two chars of |
| 76 | +# the send string to be the length, so external formatting is required. |
| 77 | +sendCmd { |
| 78 | + out "%s"; |
| 79 | + in "%(\$2:\$1:replyString)s"; |
| 80 | +} |
| 81 | + |
| 82 | +# Unused/not fully tested or troubleshot |
| 83 | + |
| 84 | + |
| 85 | +startAuto { |
| 86 | + out "NS,%(\$2:\$1:measType),\$1"; |
| 87 | + in "NS"; |
| 88 | + @mismatch {in "%(\$2:\$1:errorString)s";} |
| 89 | +} |
| 90 | + |
| 91 | +stopAuto { |
| 92 | + out "NT"; |
| 93 | + in "NT"; |
| 94 | + @mismatch {in "%(\$2:\$1:errorString)s";} |
| 95 | +} |
| 96 | + |
| 97 | + |
0 commit comments