4. Each Component Function
BX-2x0-DCxxxx, BX-2x0D-DCxxxx User’s manual
41
(2) Example programming
The following example is written in Intel 8086 assembly language.
The utility in IPC-SLIB-01 allows you to use this language in Windows.
(For the latest version of IPC-SLIB-01, visit the CONTEC website.)
;-------------------------------------------
;Open
;-------------------------------------------
CHK_OPEN1:
MOV
DX,2A4H
IN
AL,DX
TEST
AL,2
;Check status of output
JNZ
CHK_OPEN1
MOV
DX,2A0H
MOV
AL,87H
;Open Command
OUT
DX,AL
CHK_OPEN2:
MOV
DX,2A4H
IN
AL,DX
TEST
AL,2
;Check status of output
JNZ
CHK_OPEN2
MOV
DX,2A0H
MOV
AL,87H
;Open Command
OUT
DX,AL
CHK_OPEN3:
;Check status of input
MOV
DX,2A4H
IN
AL,DX
TEST
AL,1
JZ
CHK_OPEN3
MOV
DX,2A0H
IN
AL,DX
;Open success if AL = AAH
;-------------------------------------------
;Digital Input
;-------------------------------------------
CHK_DI1:
MOV
DX,2A4H
IN
AL,DX
TEST
AL,2
;Check status of output
JNZ
CHK_DI1
MOV
DX,2A0H
MOV
AL,90H
;Read DIO Command
OUT
DX,AL
CHK_DI2:
MOV
DX,2A4H
IN
AL,DX
TEST
AL,1
;Check status of input
JZ
CHK_DI2
Summary of Contents for bx200 SERIES
Page 1: ...IPC Series BOX PC for BX200 Series User s Manual CONTEC CO LTD ...
Page 7: ...vi BX 2x0 DCxxxx BX 2x0D DCxxxx User s manual ...
Page 19: ...2 System Reference 12 BX 2x0 DCxxxx BX 2x0D DCxxxx User s manual ...
Page 27: ...3 Hardware Setup 20 BX 2x0 DCxxxx BX 2x0D DCxxxx User s manual ...
Page 51: ...4 Each Component Function 44 BX 2x0 DCxxxx BX 2x0D DCxxxx User s manual ...
Page 91: ...5 BIOS Setup 84 BX 2x0 DCxxxx BX 2x0D DCxxxx User s manual ...
Page 113: ...6 Appendix 106 BX 2x0 DCxxxx BX 2x0D DCxxxx User s manual ...