Download Print this page

Panasonic SL-PC104 Instruction Manual page 11

Sensor & wire-saving link system s-link pc/104 bus s-link control board

Advertisement

5. PROGRAM EXAMPLE (For MS-DOS Q Basic)
>$VVLJQPHQW@ ,2 DGGUHVV + WR )+
>2SHUDWLRQ@  6HW DGGUHVVHV  WR  DV RXWSXW DQG  WR  DV LQSXW
2) Put output addresses 0 to 15 ON.
3) Read out ON / OFF condition of addresses 0 to 127, and display in hexadecimal
4) Read out error flag, status flag and error address, and display in hexadecimal
>3URJUDP@
' ****************************************
' * SL-PC104 SAMPLE PROGRAM *
' *
H11. 12. 1
' ****************************************
'
PT = &H300
'
OUT PT + &H12, &H1
'
OUT PT + &H14, 0
'
WHILE INP(PT + &H15) <> 0
WEND
'
OUT PT+0, &HFF
OUT PT+1, &HFF
'
FOR I = 0 TO 15
DT = INP(PT + I)
PRINT "INPUT/OUTPUT DATA("; I; ")="; RIGHT$("0" + HEX$(DT), 2)
NEXT I
'
)/$*
,13 37  +
PRINT "FLAG="; RIGHT$("0" + HEX$(FLAG),2)
'
ADDR = INP(PT + &H11)
35,17 ´$'5(66 ´ 5,*+7 ´´  +(; $''5  ¶ XQLWV  ¿UVW DGGUHVV RI XQLWV ZLWK (5
'
END
number system, in units of 16 points.
number system.
*
' I/O Address = 0300H to 031FH
' Set 0 to 15: Output, 16 to 127: Input
' Bank change-over request register = 0
' Wait for bank change-over response
register = 0
' 0 to 7: Output ON
' 8 to 15: Output ON
' Read out and display ON / OFF condition
Rof 0 to 127
¶ 5HDG RXW DQG GLVSOD\ ÀDJ
' Read out and display the number of
connected
10

Advertisement

loading