Galil DMC-2X00 User Manual

Page 260

Advertising
background image

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
MOFIO*2,A[]

Configure I/O using Modbus function code 16 where the starting
register is 632+(MODULE*8), number of registers is
NUMOFIO*2 and A[] contains the data.

EN end

#CFERR Label
MG”UNABLE TO ESTABLISH
CONNECTION”

Message

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

250

Appendices

DMC-2X00

Advertising