EN

End

#CFGDOUT

Label

MODULE=2

Set variable

CFGVALUE=$180

Set variable

NUMOFIO=4

Set variable

JP #CFGJOIN

Jump to subroutine

#CFGAOUT

Label

MODULE=3

Set variable

CFGVALUE=$A7

Set variable

NUMOFIO=2

Set variable

JP #CFGJOIN

Jump to subroutine

#CFGAIN

Label

MODULE=5

Set variable

CFGVALUE=12

Set variable

NUMOFIO=2

Set variable

JP#CFGJOIN

Jump to subroutine

#CFGJOIN

Label

DM A[8]

Dimension array

I=0

Set variable

#CFGLOOP

Loop subroutine

A[I]=0

Set array element

I=I+1

Increment

A[I]=CFGVALUE

Set array element

I=I+1

Increment

JP #CFGLOOP,I<(2*NUMOFIO)

Conditional statement

MBF=6,16,632+(MODULE*8),NU

Configure I/O using Modbus function code 16 where the starting

MOFIO*2,A[]

register is 632+(MODULE*8), number of registers is

 

NUMOFIO*2 and A[] contains the data.

EN

end

#CFERR

Label

MG”UNABLE TO ESTABLISH

Message

CONNECTION”

 

EN

End

Using the equation

I/O number = (Handlenum*1000) + ((Module-1)*4) + (Bitnum-1)

MG @IN[6001] display level of input at handle 6, module 1, bit 2

DMC-2X00

Appendices y 205

Page 260
Image 260
Galil DMC-2X00 #Cfgdout, MODULE=2, CFGVALUE=$180, NUMOFIO=4, Jp #Cfgjoin, #Cfgaout, MODULE=3, CFGVALUE=$A7, NUMOFIO=2