I never used the accompanying module. It looks like it could make programs a little shorter. Using the Extended I/O module, I was able to easily do everything needed, and maybe with a few synthetic instructions to shorten the code. I was going through the HP82169A HPIL-to-IEEE488 interface converter though, so some of the instructions might not have worked, as IEEE-488 (HP-IB) devices did not have the autoaddressing capability. The program had this kind of look to it (I wrote up the comments for someone who's not familiar with the 41)
Code:
90 LBL 04 \ Numeric label. Alphanumeric labels are allowed too, but they're less efficient in this case.
91 FC? 10 \ If it was testing the right earphone before (indicated by Flag 10 being Clear),
92 "0046" \ then connect the left instead. This string of digits (as text) is a command to the Cytec relay box.
93 "├01471145 " \ Add to string: Disconnect +13V from DMM line, and connect microphone DC voltage line to DMM line.
94 7
95 SELECT \ Now select the Cytec relay unit to talk to (whose address is #7 on the HPIB bus). It has 128 relays.
96 OUTA \ OUTput the Alpha register (now containing the text string of digits formed above) to it.
97 22
98 SELECT \ Now select the DMM (digital multimeter) to talk to (whose address is #22 on the bus),
99 IND \ and INput a Decimal number from it, which from previous set-up, makes it take a voltage reading and send it.
100 STO 17 \ STOre it in register 17.
101 FIX 02 \ Put the display mode in FIXed-point, showing two decimal places.
102 VIEW X \ Put the resulting reading in the display. It is also stored and will be printed later if operator chooses.
103 "01451142" \ Disconnect the mic DCV line from the DMM and connect the mic plug tip voltage (for push-to-talk test).
104 7 \ (The string of digits is a command to the relay box.)
105 SELECT \ As above, select the Cytec relay box to talk to.
106 OUTA \ Like line 96. The string in line 103 gets sent to the relay box.
107 22
108 SELECT \ Select the DMM again.
109 IND \ Like line 99. Get mic plug tip voltage to check for shorts to center ring or ground.
110 STO 14 \ STOre the voltage in register 14.
111 9
112 X<Y? \ Is 9V less than the tip voltage? (ie, is the tip voltage over 9V?)
113 GTO 05 \ If so, skip the problem message and go down to label 05. Normally it's at the voltage of the 13V power supply.
114 SF 08 \ Set Flag 08, signaling a problem.
115 FS? 09 \ Is Flag 09 Set? A "yes" mean it's in printout mode and should not stop with each problem but rather continue,
116 GTO 05 \ and skip the problem message in the display. (Resume down at label 05, and print all test results at the end.)
<snip>
137 22
138 SELECT \ Get ready to talk to the DMM again. (22 is the bus address of the DMM.)
139 "ACV;R,5,.02" \ Tell it to get ready to measure AC voltage with a maximum of 5V input and give .02% (1mV) precision
140 OUTA \ (This sets the range and number of digits.)
<snip>
150 9
151 SELECT \ Get ready to talk to the signal generator (which is at address 9 on the bus).
152 CLRDEV \ CLeaR DEVice (like a software reset).
153 INSTAT \ INput STATus to clear any error conditions that may exist.
154 "A.05P1I" \ Set Amplitude of signal generator to .05V (50mV) and enable output. The "I" makes it go ahead and execute
155 OUTA \ the command string. (Frequencies and amplitude adjustments come later.)