![Galil Motion Control DMC-42 0 Series User Manual Download Page 46](http://html1.mh-extra.com/html/galil-motion-control/dmc-42-0-series/dmc-42-0-series_user-manual_3267467046.webp)
The third level of Modbus communication uses standard Galil commands. Once the slave has been configured, the
commands that may be used are @IN[], @AN[], SB, CB, OB, and AO. For example, AO 2020,8.2 would tell I/O
number 2020 to output 8.2 volts.
If a specific slave address is not necessary, the I/O number to be used can be calculated with the following:
I/O Number = (HandleNum*1000) + ((Module-1)*4) + (BitNum-1)
Where HandleNum is the handle number from 1 (A) to 8 (H). Module is the position of the module in the rack from
1 to 16. BitNum is the I/O point in the module from 1 to 4.
Modbus Examples
Example #1
DMC-4240 connected as a Modbus master to a RIO-47120 via Modbus. The DMC-4240 will set or clear all 16 of the
RIO’s digital outputs
1. Begin by opening a connection to the RIO which in our example has IP address 192.168.1.120
IHB=192,168,1,120<502>2
(Issued to DMC-4240)
2. Dimension an array to store the commanded values. Set array element 0 equal to 170 and array element 1
equal to 85. (array element 1 configures digital outputs 15-8 and array element 0 configures digital
outputs 7-0)
DM myarray[2]
myarray[0] = 170
(which is 10101010 in binary)
myarray[1] = 85
(which is 01010101in binary)
3. a) Send the appropriate MB command. Use function code 15. Start at output 0 and set/clear all 16
outputs based on the data in myarray[]
MBB=,15,0,16,myarray[]
3. b) Set the outputs using the SB command.
SB2001;SB2003;SB2005;SB2007;SB2008;SB2010;SB2012;SB2014;
Results:
Both steps 3a and 3b will result in outputs being activated as below. The only difference being that step 3a will set
and clear all 16 bits where as step 3b will only set the specified bits and will have no affect on the others.
Bit Number
Status
Bit Number
Status
0
0
8
1
1
1
9
0
2
0
10
1
3
1
11
0
4
0
12
1
5
1
13
0
6
0
14
1
7
1
15
0
Chapter 4 Software Tools and Communication ▫ 42
DMC-42x0 User Manual
Summary of Contents for DMC-42 0 Series
Page 195: ...ICM 2900 PCB Layout Appendices 191 DMC 42x0 User Manual...
Page 205: ...CB 50 100 Drawings Appendices 201 DMC 42x0 User Manual...
Page 206: ...Appendices 202 DMC 42x0 User Manual...
Page 207: ...Appendices 203 DMC 42x0 User Manual...
Page 208: ...Appendices 204 DMC 42x0 User Manual...
Page 209: ...Appendices 205 DMC 42x0 User Manual...
Page 210: ...Appendices 206 DMC 42x0 User Manual...
Page 211: ...Appendices 207 DMC 42x0 User Manual...
Page 214: ...CB 50 80 Drawing Appendices 210 DMC 42x0 User Manual...