CDS-3310
Appendices
i
99
#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
#CFGERR 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
SB 6006
set bit of output at handle 6, module 2, bit 3 to one
or
OB 6006,1
AO 608,3.6
set analog output at handle 6, module 53, bit 1 to 3.6 volts
MG @AN[6017] display voltage value of analog input at handle6, module 5, bit 2
Summary of Contents for CDS-3310
Page 26: ...18 i Chapter 2 Getting Started CDS 3310 THIS PAGE LEFT PLANK INTENTIONALLY...
Page 32: ...24 i Chapter 3 Connecting I O CDS 3310 THIS PAGE LEFT PLANK INTENTIONALLY...
Page 124: ...CDS 3310 Chapter 8 Hardware Software Protection i 63 THIS PAGE LEFT PLANK INTENTIONALLY...
Page 138: ...CDS 3310 Chapter 10 Theory of Operation i 77 THIS PAGE LEFT BLANK INTENTIONALLY...