AMETEK SLM-1 User Manual
Page 59
Sorensen SLM-1 Chassis
Appendix A
Example Program in BASICA
LOAD DECL.BAS using BASICA MERGE command.
100 REM You must merge this code with DECL.BAS
105 REM
110 REM Assign a unique identifier to the device "dev5" and store it in variable load%.
125 REM
130
udname$ = "dev5"
140
CALL ibfind (udname$,load%)
145 REM
150 REM Check for error on ibfind call
155 REM
160
IF load% < 0 THEN GOTO 2000
165 REM
170 REM Clear the device
175 REM
180
CALL ibclr (load%)
185 REM
190 REM Get the module load specification
195 REM
200
wrt$ = "NAME?" : CALL ibwrt(load%,wrt$)
210
rd$ = space$(20) : CALL ibrd(load%,rd$)
215 REM
220 REM Set the channel 1, preset off, current sink 1.0 amps and load on commands to the
load.
225 REM
230
wrt$ = "chan 1;pres off;curr:low 0.0;curr high 1.0;load on"
240
CALL ibwrt(load%,wrt$)
245 REM
250 REM Get the load actially sink current from the load
255 REM
260
wrt$ = "meas:curr?" : CALL ibwrt(load%,wrt$)
270
rd$ = space$(20) : CALL ibrd(load%,rd$)
275 REM
280 REM Go to local
285 REM
290 CALL ibloc(load%)
2000 REM Error routine to notify that ibfind failed.
2010 REM Check software configuration.
2020 PRINT "ibfind error !" : STOP
Operation and Programming Manual
A-3