Example- Communicating with OPTO-22 SNAP-B3000-
ENET
Controller is connected to OPTO-22 via handle F. The OPTO-22’s IP address is 131.29.50.30. The Rack has the
following configuration:
Digital Inputs Module 1
Digital Outputs Module 2
Analog Outputs (+/-10V) Module 3
Analog Inputs (+/-10V) Module 4
Instruction Interpretation
#CONFIG Label
IHF=131,29,50,30<502>2 Establish connection
WT10 Wait 10 milliseconds
JP #CFGERR,_IHF2=0 Jump to subroutine
JS #CFGDOUT Configure digital outputs
JS #CFGAOUT Configure analog outputs
JS #CFGAIN Configure analog inputs
MBF = 6,6,1025,1 Save configuration to OPTO-22
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
DMC-40x0 User Manual Appendices • 228