Specific functions please refer to《Mitsubishi FX3G programming manual
》
2.5 Applied instructions【Sequence is according to instruct variety】
(Contrast with MITSUBISHI FX3G PLC)
Applied instruction can be divided into the following 18 kinds.
COOLMAY EX3G PLC/HMI All in one Programming manual
18
1. Data move instructions
Mnemonic
FNC No.
Function
Support
MOV
12
Move
★
SMOV
13
Shift Move
★
CML
14
Compliment
★
BMOV
15
Block Move
★
FMOV
16
Fill Move
★
PRUN
81
Parallel Run (Octal Mode)
★
XCH
17
Exchange
★
SWAP
147
Byte Swap
★
EMOV
112
Floating Point Move
★
HCMOV
189
High Speed Counter Move
★
2. Data conversion instructions
Mnemonic
FNC No.
Function
Support
BCD
18
Conversion to Binary Coded Decimal
★
BIN19Conversion to Binary
★
GRY
170
Decimal to Gray Code Conversion
★
GBIN
171
Gray Code to Decimal Conversion
★
FLT
49
Conversion to Floating Point
★
INT
129
Floating Point to Integer Conversion
★
EBCD
118
Floating Point to Scientific Notation
Conversion
★
EBIN
119
Scientific Notation to Floating Point
Conversion
★
RAD
136
Floating Point Degree to Radian
Conversion
★
DEG
137
Floating Point Radian to degree Conversion
★
3.
Comparison instructions
Mnemonic
FNC No.
Function
Support
LD=
224
Contact compare LD
(S1)=(S2)
★
LD>
225
Contact compare LD
(S1)>(S2)
★
LD<
226
Contact compareLD
(S1)<(S2)
★
LD<>
228
Contact compare LD
(S1)≠(S2)
★
LD<=
229
Contact compare LD
(S1)≦(S2)
★
LD>=
230
Contact compare LD
(S1)≧(S2)
★
AND=
232
Contact compare AND
(S1)=(S2)
★
AND>
233
Contact compare AND
(S1)>(S2)
★
AND<
234
Contact compare AND
(S1)<(S2)
★
AND<>
236
Contact compare AND
(S1)≠(S2)
★
AND<=
237
Contact compare AND
(S1)≦(S2)
★
COOLMAY EX3G PLC/HMI All in one Programming manual
19
AND>=
238
Contact compare AND
(S1)≧(S2)
★
OR=
240
Contact compare OR
(S1)=(S2)
★
OR>
241
Contact compare OR
(S1)>(S2)
★
OR<
242
Contact compare OR
(S1)<(S2)
★
OR<>
244
Contact compare OR(S1)≠(S2)
★
OR<=
245
Contact compare OR(S1)≦(S2)
★
OR>=
246
Contact compare OR(S1)≧(S2)
★
CMP
10
Compare
★
ZCP
11
Zone Compare
★
ECMP
110
Floating Point Compare
★
EZCP
111
Floating Point Zone Compare
★
HSCS
53
High speed counter set
★
HSCR
54
High speed counter reset
★
HSZ
55
High Speed Counter Zone Compare
★
HSCT
280
High speed counter table compare
★
BKCMP=
194
Block compare(S1)=(S2)
★
BKCMP>
195
Block compare(S1)>(S2)
★
BKCMP<
196
Block compare(S1)<(S2)
★
BKCMP<>
197
Block compare(S1)≠(S2)
★
BKCMP<=
198
Block compare(S1)≦(S2)
★
BKCMP>=
199
Block compare(S1)≧(S2)
★
4. Arithmetic operation instructions
Mnemonic
FNC No.
Function
Support
ADD
20
Addition
★
SUB
21
Subtraction
★
MUL
22
Multiplication
★
DIV
23
Division
★
EADD
120
Floating Point Addition
★
ESUB
121
Floating Point Subtraction
★
EMUL
122
Floating Point Multiplication
★
EDIV
123
Floating Point Division
★
BK+
192
Block Data Addition
★
BK-
193
Block Data Subtraction
★
INC
24
Increase
★
DEC
25
Decrement
★
5. Logical operation instructions
Mnemonic
FNC No.
Function
Support
WAND
26
Word AND
★
WOR
27
Word OR
★
WXOR
28
Word Exclusive OR
★
COOLMAY EX3G PLC/HMI All in one Programming manual
20
6. Special function instructions
Mnemonic
FNC No.
Function
Support
SQR
48
Square Root
★
ESQR
127
Floating Point Square Root
★
EXP
124
Floating Point Exponent
★
LOGE
125
Floating Point Natural Logarithm
★
LOG10
126
Floating Point Common Logarithm
★
SIN
130
Floating Point Sine
★
COS
131
Floating Point Cosine
★
TAN
132
Floating Point Tangent
★
ASIN
133
Floating Point Arc Sine
★
ACOS
134
Floating Point Arc Cosine
★
ATAN
135
Floating Point Arc Tangent
★
RND
184
Random Number Generation
★
7. Rotate instructions
Mnemonic
FNC No.
Function
Support
ROR
30
Rotation Right
★
ROL
31
Rotation Left
★
RCR
32
Rotation right With Carry
★
RCL
33
Rotation Left with Carry
★
8. Shift instructions
Mnemonic
FNC No.
Function
Support
SFTR
34
Bit Shift Right
★
SFTL
35
Bit Shift Left
★
SFR
213
Bit Shift Right with Carry
★
SFL
214
Bit Shift Left with Carry
★
WSFR
36
Word Shift Right
★
WSFL
37
Word Shift left
★
SFWR
38
Shift Write [FIFO/FILO Control]
★
SFRD
39
Shift Read [FIFO Control]
★
POP
212
Shift Last Data Read [FILO Control]
★
9. Data operation instructions
Mnemonic
FNC No.
Function
Support
ZRST
40
Zone Reset
★
DECO
41
Decode
★
ENCO
42
Encode
★
MEAN
45
Mean
★
WSUM
140
Sum of Word Data
★
SUM
43
Sum of Active Bits
★
BON
44
Check Specified Bit Status
★
COOLMAY EX3G PLC/HMI All in one Programming manual
21
NEG
29
Negation
★
ENEG
128
Floating Point Negation
★
WTOB
141
WORD to BYTE
★
BTOW
142
BYTE to WORD
★
UNI
143
4-bit Linking of Word Data
★
DIS
144
4-bit Grouping of Word Data
★
CCD
84
Check Code
★
CRC
188
Cyclic Redundancy Check
★
LIMIT
256
Limit Control
★
BAND
257
Dead Band Control
★
ZONE
258
Zone control
★
SCL
259
Scaling(Coordinate by Point Data)
★
SCL2
269
Scaling 2 (Coordinate by X/Y Data)
★
SORT
69
Sort Tabulated Data
★
SORT2
149
Sort Tabulated Data 2
★
SER61Search a Data Stack
★
FDEL
210
Deleting Data from Tables
★
FINS
211
Inserting Data to Tables
★
10. String processing instruction
Mnemonic
FNC No.
Function
Support
ESTR
116
Floating Point to Character String Conversion
★
EVAL
117
Character String to Floating Point Conversion
★
STR
200
BIN to Character String Conversion
★
VAL
201
Character String to BIN Conversion
★
DABIN
260
Decimal ASCII to BIN Conversion
★
BINDA
261
BIN to Decimal ASCII Conversion
★
ASCI
82
Hexadecimal to ASCII Conversion
★
HEX
83
ASCII to Hexadecimal Conversion
★
$MOV
209
Character String Transfer
★
$+
202
Link Character Strings
★
LEN
203
Character String Length Detection
★
RIGH
204
Extracting Character String Data From the Right
★
LEFT
205
Extracting Character String Data from the Left
★
MIDR
206
Random Selection of Character Strings
★
MIDW
207
Random Replacement of Character Strings
★
INSTR
208
Character string search
★
COMRD
182
Read Device Comment Data
★
11. Program flow control instructions
Mnemonic
FNC No.
Function
Support
CJ00Conditional Jump
★
CALL
01
Call Subroutine
★
COOLMAY EX3G PLC/HMI All in one Programming manual
22
SRET
02
Subroutine Return
★
IRET
03
Interrupt Return
★
EI04Enable Interrupt
★
DI05Disable Interrupt
★
FEND
06
Main Routine Program End
★
FOR
08
Start a FOR/NEXT Loop
★
NEXT
09
End a FOR/NEXT Loop
★
12. I/O refresh instructions
Mnemonic
FNC No.
Function
Support
REF50Refresh
★
REFF
51
Refresh and Filter Adjust
★
13. Real time clock control instructions
Mnemonic
FNC No.
Function
Support
TCMP
160
RTC Data Compare
★
TZCP
161
RTC Data Zone Compare
★
TADD
162
RTC Data Addition
★
TSUB
163
RTC Data Subtraction
★
TRD
166
Read RTC data
★
TWR
167
Set RTC data
★
HTOS
164
Hour to Second Conversion
★
STOH
165
Second to Hour Conversion
★
14. Pulse output/positioning control instruction
Mnemonic
FNC No.
Function
Support
ABS
155
Absolute Current Value Read
★
DSZR
150
DOG Search Zero Return
★
ZRN
156
Zero Return
★
TBL
152
Batch Data Positioning Mode
★
DVIT
151
Interrupt Positioning
★
DRVI
158
Drive to Increment
★
DRVA
159
Drive to Absolute
★
PLSV
157
Variable Speed Pulse Output
★
PLSY
57
Pulse Y Output
★
PLSR
59
Acceleration/Deceleration Setup
★
15. Serial communication instructions
Mnemonic
FNC No.
Function
Support
RS80Serial Communication
★
R(S2)
87
Serial Communication 2
★
IVCK
270
Inverter Status Check
IVDR
271
Inverter Drive
COOLMAY EX3G PLC/HMI All in one Programming manual
23
IVRD
272
Inverter Parameter Read
IVWR
273
Inverter Parameter Write
IVBWR
274
Inverter Parameter Block Write
IVMC
275
Inverter multiple command
ADPRW
276
MODBUS read and write
★
16. Special block/unit control instructions
Mnemonic
FNC No.
Function
Support
FROM
78
Read From a Special Function Block
★
TO
79
Write To a Special Function Block
★
RD3A
176
Read form Dedicated Analog Block
★
WR3A
177
Write to Dedicated Analog Block
★
RBFM
278
Divided BFM Read
WBFM
279
Divided BFM Write
17. Extension register/extension file register control instructions
Mnemonic
FNC No.
Function
Support
LOADR
290
Load From ER
SAVER
291
Save to ER
RWER
294
Rewrite to ER
INITR
292
Initialize R and ER
INITER
295
Initialize ER
LOGR
293
Logging R and ER
18. Other handy instructions
Mnemonic
FNC No.
Function
Support
WDT
07
Watchdog Timer Refresh
★
ALT66Alternate State
★
ANS46Timed Annunciator Set
★
ANR
47
Annunciator Reset
★
HOUR
169
Hour Meter
★
RAMP
67
Ramp Variable Value
★
SPD56Speed Detection
★
PWM
58
Pulse Width Modulation
★
DUTY
186
Timing Pulse Generation
★
PID88PID Control Loop
★
ZPUSH
102
Batch Store of Index Register
★
ZPOP
103
Batch POP of Index Register
★
TTMR
64
Teaching timer
★
STMR
65
Special timer
★
ABSD
62
Absolute Drum Sequencer
★
INCD
63
Incremental Drum Sequencer
★
ROTC
68
Rotary Table Control
★
COOLMAY EX3G PLC/HMI All in one Programming manual
24
IST60Initial state
★
MTR
52
Input Matrix
★
TKY
70
Ten Key Input
★
HKY
71
Hexadecimal Input
★
DSW
72
Digital switch (thumbwheel input)
★
SEGD
73
Seven Segment Decoder
★
SEGL
74
Seven Segment With Latch
★
ARWS
75
Arrow Switch
★
ASC76ASCII code data input
★
PR77Print (ASCII Code)
★
VRRD
85
Volume Read
★
VRSC
86
Volume Scale
★
Input signal
Range
Register value
Resolution
Accuracy
(Total Measuring range)
K-type thermocouple
0~1100℃
Room temperature
~11000
0.1℃
1%
PT100
-200~350℃
-2000~3500
0.1℃
1%
NTC10K
-48~210℃
-480~2100
0.1℃
1%
Voltage
0~10V/0-5V
0~4000
2.5mV
1%
Current Type1
0~20mA
0~4000
5uA
1%
Current Type2
4~20mA
0~4000
4uA
1%
Input signal
Range
Register value
Resolution
Accuracy
(Total Measuring range)
K-type thermocouple
0~1100℃
Room temperature
~11000
0.1℃
1%
K-type thermocouple
(Negative temp)
-210~1200℃
-2100~12000
0.1℃
1%
T-type thermocouple
0~420℃
Room temperature
~4200
0.1℃
1%
T-type thermocouple
-210~420℃
-2100~4200
0.1℃
1%
2.6 Analog input
This section refers to the software version query, the version number is stored in the special register
D8001, D8101, if necessary, please query the value of D8001.
Input precision of coolmay CX3G/FX3GC PLC and EX3G plc hmi all-in-one is 12-bit, directly read the
corresponded register value of each analog while using. Environment temperature is only used in
thermocouple.
2.6.1 Analog input (temperature)
Below table for software version 26210
Below table for software version 26220
25
(Negative temp)
PT100/PT1000
-200~350℃
-2000~3500
0.1℃
1%
NTC
-48~210℃
-480~2100
0.1℃
1%
Voltage
0~10V/0-5V
0~4000
2.5mV
1%
Current Type1
0~20mA
0~4000
5uA
1%
Current Type2
4~20mA
0~4000
4uA
1%
Below table for software version 26230 and above
Input signal
Range
Register value
Resolution
Accuracy
(Total Measuring
range)
K-type thermocouple
0~1100℃
Room temperature
~11000
0.1℃
1%
K-type thermocouple
(Negative temp)
-210~1200℃
-2100~12000
0.1℃
1%
T-type thermocouple
0~420℃
Room temperature
~4200
0.1℃
1%
T-type thermocouple
(Negative temp)
-210~420℃
-2100~4200
0.1℃
1%
S-type thermocouple
0~1710℃
Room temperature
~17100
0.1℃
1%
S-type thermocouple
(Negative temp)
-26~1710℃
-260~17100
0.1℃
1%
J-type thermocouple
0~800℃
Room temperature
~8000
0.1℃
1%
J-type thermocouple
(Negative temp)
-90~950℃
-900~9500
0.1℃
1%
E-type thermocouple
0~600℃
Room temperature
~6000
0.1℃
1%
E-type thermocouple
(Negative temp)
-110~730℃
-1100~7300
0.1℃
1%
PT100/PT1000
-200~500℃
-2000~5000
0.1℃
1%
NTC50K/100K
-48~210℃
-480~2100
0.1℃
1%
NTC10K
-48~110℃
-480~1100
0.1℃
1%
Voltage
0~10V/0-5V/
-10~10V/-5~5V
0~4000
2.5mV
1%
Current Type1
0~20mA
0~4000
5uA
1%
Current Type2
4~20mA
0~4000
4uA
1%
COOLMAY EX3G PLC/HMI All in one Programming manual
customers’s need when ordering.
The transmitter which is integrated inside PLC is one of the above table or mixed ones, it is up to
COOLMAY EX3G PLC/HMI All in one Programming manual
26
NO
Register Value
AD0
R23680
AD1
R23681
AD2
R23682
AD3
R23683
Environment temperature
R23684
AD4
R23685
AD5
R23686
AD6
R23687
AD7
R23688
AD8
R23689
AD9
R23690
AD10
R23691
AD11
R23692
AD12
R23693
AD13
R23694
AD14
R23695
NO
PT100
NTC10K
0~10V/0-5V/0~20mA
4~20mA
AD0
R23640
R23660
D8030
R23620
AD1
R23641
R23661
D8031
R23621
AD2
R23642
R23662
D8032
R23622
AD3
R23643
R23663
D8033
R23623
AD4
R23644
R23664
D8034
R23624
AD5
R23645
R23665
D8035
R23625
AD6
R23646
R23666
D8036
R23626
AD7
R23647
R23667
D8037
R23627
AD8
R23648
R23668
D8038
R23628
AD9
R23649
R23669
D8039
R23629
AD10
R23650
R23670
D8040
R23630
AD11
R23651
R23671
D8041
R23631
AD12
R23652
R23672
D8042
R23632
2.6.2 Analog input reading 1(for software version 26210 and 26220)
Support FROM instruction or register directly read. Such as: FROM K0 K0 D400 K16, read out 16
analog input, 0-10V.
K type thermocouple (1~4 channel) are in the 4 registers from R23680, the 5this temperature
compensation, R23684 reveals the environment temperature. The below keep the same, that is to say that
read thermocouple (6~16 channels) are the 11 registers from R23685
A decimal points should be retained for temperature. Namely 182=18.2℃.
Other types of registers read values are shown below table:
COOLMAY EX3G PLC/HMI All in one Programming manual
27
AD13
R23653
R23673
D8043
R23633
AD14
R23654
R23674
D8044
R23634
AD15
R23655
R23675
D8045
R23635
No
K type(negative
temperature)
T type
T type(negative
temperature)
AD0
R23720
R23700
R23740
AD1
R23721
R23701
R23741
AD2
R23722
R23702
R23742
AD3
R23723
R23703
R23743
AD4(Environment
temperature)
R23724
R23704
R23744
AD5
R23725
R23705
R23745
AD6
R23726
R23706
R23746
AD7
R23727
R23707
R23747
AD8
R23728
R23708
R23748
AD9
R23729
R23709
R23749
AD10
R23730
R23710
R23750
AD11
R23731
R23711
R23751
AD12
R23732
R23712
R23752
AD13
R23733
R23713
R23753
AD14
R23734
R23714
R23754
AD15
R23735
R23715
R23755
NO
Register Value
AD0
D8030
AD1
D8031
AD2
D8032
AD3
D8033
AD4 (environment temp)
D8034
AD5
D8035
AD6
D8036
When 4~20mA,<3.8mA,value is 32760,which is the disconnection value.
2.6.3 Analog input reading 2(for Main software version 26220)
Thermocouple K (negative temperature), T type, T type (negative temperature) register read values are
shown as below table:
2.6.4 Analog input reading 3(for Main software version 26230 and above)
input, 0~10V.
constant scan time is changed to D8059, and it is started by M8039 (version 26232 and above);
Support FROM instructions or register read directly. Such as: FROM K0 K0 D400 K16 read 16 analog
The register is directly read: D[8030]~D[8045] is the output value set for the corresponding type, the
COOLMAY EX3G PLC/HMI All in one Programming manual
28
AD7
D8037
AD8
D8038
AD9
D8039
AD10
D8040
AD11
D8041
AD12
D8042
AD13
D8043
AD14
D8044
AD15
D8045
NO
Register Value
AD0
R23660
AD1
R23661
AD2
R23662
AD3
R23663
AD4
R23664
AD5
R23665
AD6
R23666
AD7
R23667
AD8
R23668
AD9
R23669
AD10
R23670
AD11
R23671
AD12
R23672
AD13
R23673
AD14
R23674
AD15
R23675
When the analog input has a thermocouple type, it can only do up to 15 channels, of which AD4 is the
ambient temperature of the thermocouple. You can do 16 channels without the thermocouple type.
Tthermistor NTC is shown as below table:
negative temperature amplification).
sampled values.
2.6.5 Analog input sampling
one time and change the 1stanalog input value for one time. The larger R23600~R23615 value is, the result
is more stable.
R23960 starts with a zero correction value and default is 0 (Namely, size correction).
R23980 starts with a negative temperature amplification. The default is 4633 (temporarily only have
The 16 registers starting from R23620 are 0~10V or 0~20mA corresponding values, that is, real-time
Filtering cycles=( R23600~R23615)* PLC scanning time, if R23600=1, One PLC scan cycle sample
R23600~R23615 is filtering cycles, default is 100 (range 2~20000), data can’t be equal to or less than 0;
D8073 is smoothing filter coefficients of all analog input, range: 0~999
COOLMAY EX3G PLC/HMI All in one Programming manual
29
2.6.6 Demo example
Below is an example of EX3G 1 channel temperature analog AD0 acquisition. The program reads the
values as follows:
Connect the signal terminal of the temperature sensor to the AD0 input of the PLC and the other end to
the GND of the analog input port.
When the PLC is running, the value of the data register D8030 corresponding to AD0 will be
transmitted to D0, the value of D0 will be put into D10 after floating point operation, and then the floating
point number division operation will be performed on D10, and then operation result will be put into D20,
the result D20 is the actual Temperature value.
In the ladder diagram, you can also directly divide the value of D8030.
Note: When the input is 0-10V analog, the actual analog value = register reading / 400;
When the input is temperature, the actual temperature value = register reading/10;
When the input is 0-20mA analog, the actual analog value = register reading / 200;
When the input is 4-20 mA analog, the actual analog value = register reading / 250 + 4.
The analog correction is corrected for the size. The following figure is an example of correcting the
AD0 temperature after acquisition:
If the current temperature is 37.9℃,the actual test is 47.9°C, the error is 10°C, you need to modify
the size correction register, show as below:
COOLMAY EX3G PLC/HMI All in one Programming manual
30
Counter type
No.
Input assignment
Single phase single
counter input
X000
X001
X002
X003
X004
X005
X006
X007
C235
U/D
C236
U/D
DA register
Range
Output type
DA0
D8050
0-4000
When
D8058.0~D8058.7=0
Means 0~20mA;
When
D8058.0~D8058.7=1
Means 4~20mA。
DA1
D8051
0-4000
DA2
D8052
0-4000
DA3
D8053
0-4000
DA4
D8054
0-4000
DA5
D8055
0-4000
DA6
D8056
0-4000
DA7
D8057
0-4000
In the above figure, when M0 is closed, the value -100 is transmitted to the correction register
R23960, and now you can see that the value of the actual measured temperature D20 is close to the
actual temperature which is 37.9 °C.
2.7 Analog output
Analog output range 0~4000, precision is 12 bit. Support TO instruction or register assignment operation
directly.
Adopts TO K0 K0 D500 K8, 8 channels 0~10V or 0~20mA analog output.
Register assignment operation directly: D8050~D8057.
When the analog output is current, the bit of D8058 needs to be set:
When the default D8058.0~D8058.7=0, it means 0~20mA; when D8058.0~D8058.7=1, it means
4~20mA.
Example:Below shows the 0-10V voltage analog output.
red pen is connected to the DA0 terminal, and the black pen is connected to the GND terminal. The multimeter
is displaying 5V voltage value.
2.8 PID instruction
Detailed information please refer to <Mitsubishi FX3G Programming Manual>
The self-tuning method in the PID instruction has only a step response mode. The step value is S0+22.
2.9.Application of high speed counter
2.9.1Assignment table of built-in high speed counter
At this point, use a multimeter to check the voltage of the DA0 terminal, that is, the multimeter's
COOLMAY EX3G PLC/HMI All in one Programming manual
31
C237
U/D
C238
U/D
C239
U/D
C240
U/D
C241
U/D
R
C242
U/D
R
C243
U/D
R
C244
U/DRS
C245
U/DRS
Single phase
double counter
input
C246
U
D
C247
UDR
C248
UDR
C248(OP)*1
U
D
C249
UDR
S
C250
UDR
S
AB phase double
counter input
C251
A
B
C252
ABR
C253
ABR
C253(OP)*1
A
B
C254(OP)*1
A
B
C255
ABR
S
U: up counterD: down counter
A: A phase inputB:B phase input
R: External reset inputS: External start input
Single phase: at most 6 channels, max frequency is 60KHz
AB(Z) phase:
2 times frequency: 2 channels 60KHz+1 way 10KHz;
4 times frequency: 2 channels 24KHz; M8198 is C251 4 times frequency signal;M8199 is C253 4 times
frequency signal.
* High speed input C254:
When M8396=0, the original C254 is AB phase corresponded to X3 X4.
When M8396=1, C254 changes to AB phase corresponded to X6 X7.
2.10.Application of high speed pulse
2.10.1 high speed pulse output
Coolmay CX3G default has 8 channels high speed pulse, Y0-Y3 each 100KHz, Y4-Y7 each
10KHz,variable speed supported, the initial/final speed of start/stop is 0, diagram as below: (take accelerate
and decelerate time D8148 as an example).
COOLMAY EX3G PLC/HMI All in one Programming manual
32
26233 Version and lower
Interpolation mode
M8343
M8342
Line Interpolation
0
1
Center interpolation
1
0
Radius interpolation
1
1
26235 Version and higher
Interpolation mode
M8343
M8342
Line Interpolation
0
1
Center interpolation
1
0
Radius interpolation
1
1
Pulse point
Function
Description
Y0Y1Y2Y3Y4Y5Y6
Y7
Pulse operation
monitoring
M8340
M8350
M8360
M8370
M8151
M8152
M8153
M8154
Position pulse(32bit)
D8340
D8341
D8350
D8351
D8360
D8361
D8370
D8371
D8140
D8141
D8142
D8143
D8144
D8145
D8160
D8161
accelerate / decelerate
time
D8348
D8349
D8358
D8359
D8368
D8369
D8378
D8379
D8148
D8148
D8148
D8148
Pulse stop bit
M8349
M8359
M8369
M8379
M8450
M8451
M8452
M8453
Maximum speed
D8343
D8344
D8353
D8354
D8363
D8364
D8373
D8374
D8146
D8147
D8146
D8147
D8146
D8147
D8146
D8147
Acceleration/deceleration time T calculation= (target speed-current speed) * acceleration/deceleration
time÷maximum speed.
For example, target speed = 50000, current speed = 20000, acceleration time 100 (ms), maximum speed =
100,000, T = 30 ms.
CX3G: 8 channels of pulse, the last 4 channels of acceleration and deceleration = D8148, the maximum
speed is D8146, D8147.
PLSY, ZRN, PLSV, DRVI, DRVA, DVIT, DSZR, only Y0-Y3 supports DVIT (interrupt positioning),
DSZR (originary return with DOG search) instructions.
The original FX3G pulse program can be used directly.
All the instruction support 8 channels pulse, except DVIT、DSZR which support 4 channels.
2.10.2 Circular interpolation
The special flags when setting the interpolation route are as shown in the following table: ( No interpolation function in
26234 version)
The direction and coordinates of the center and radius interpolation are as shown in the following table: ( No
interpolation function in 26234 version)
COOLMAY EX3G PLC/HMI All in one Programming manual
33
26233 Version and lower
Clockwise
M8348=0
Counterclockwise
M8348=1
Relative position
M8344=0
Absolute position
M8344=1
26235 Version and higher
Clockwise
M8348=0
Counterclockwise
M8348=1
Relative position
M8344=0
Absolute position
M8344=1
S.represents the pulse frequency, that is, the speed of the interpolation motion.
D8340 shows the current address of X axis,D8350 shows the current address of Y axis.
In CoolMay 3G PLC,interpolation motion still adopts DPLSR for pulse output.
Description of the Operand:
S.+2represents the X-axis target address.
S.+4represents the Y-axis target address.
D.:Specify the Y number with pulse output (currently only Y0 is supported), and the default Y1 is
another axis.
X axis: Y0 pulse, Y4 direction
Y axis: Y1 pulse, Y5 direction
In the center interpolation mode:
S.+6represents the center X coordinate address.
S.+8represents the center Y coordinate address.
In radius interpolation mode:
S.+6represents the radius length. When it is positive, the path is a small circle; when it is a negative value,
the path is a large circle.
For example: DPLSR D100 D102 D104 Y000
In the linear interpolation: D100 speed, D102 is the X-axis target address, and D104 is the Y-axis target
address.Y0 and Y1 respectively pulse the X-axis and Y-axis.
COOLMAY EX3G PLC/HMI All in one Programming manual
34
In the Center interpolation: D100 speed, D102 is the X-axis target address, D104 is the Y-axis target address,
and D106 is the center X address. D108 is the center Y address. Y0 and Y1 respectively pulse the X-axis and
Y-axis.
Note 1: The current address of X and Y must be on the same circle as the destination address.
Note 2: When the current address coincides with the target address, it indicates that the motion track is a full
circle.
In the radius interpolation: D100 speed, D102 is the X-axis target address, D104 is the Y-axis target address,
and D106 is the radius length. Y0 and Y1 respectively pulse the X-axis and Y-axis.
2.10.3 Continuous interpolation function
M8436 is the flag for the normal interpolation mode and continuous interpolation mode.
M8436=0: regular interpolation mode;
M8436=1: continuous interpolation mode;
In CoolMay 3G PLC 26236 and higher version, continuous interpolation motion uses DPLSR for pulse
output.
COOLMAY EX3G PLC/HMI All in one Programming manual
Operand Description: All use 32-bit registers.
S1. indicates the pulse frequency, that is, the speed of the interpolation motion.
S2. indicates the X-axis target address.
S2.+2 indicates the Y-axis target address.
In the center mode: S2.+4 and S2.+6 indicates the Center coordinates.
In radius mode: S2.+4 indicates the radius length, and S2.+6 ignores and unused.
S2.+4 positive value: the path is a small circle;
S2.+4 negative value: the path is a big circle.
S2.+8 is the control register.
D.: Specify the Y number with pulse output (currently only Y0 is supported), and the default Y1 is another
axis.
In continuous interpolation mode, M8432~M8435 are determined by the5thparameter (ie S.+10).
The function description of each bit of the 32-bit register S2.+8 is as follows:
When S2.+8 is used, it is expressed in hexadecimal. The bit values of each group are as below shown :
PS: When using linear mode interpolation, b7~b4 is ignored and can be set to any value from 2~F.
S1. and S2. may be set discontinuous. For example, S1.=D100, S2.=D120.
S2. Must be consecutive with the next four 32-bit registers. For example, it must be set to D102, D104,
D106, D108, D110.
For example: draw a line and two arcs, as shown below:
36
Program as below :
COOLMAY EX3G PLC/HMI All in one Programming manual
COOLMAY EX3G PLC/HMI All in one Programming manual
37
Functions
Serial port
2(A/B)
Serial port
3(A1/B1)
CAN(H/L)
Remark
Mitsubishi programming port
protocol
M8196=0
M8192=0
-
26232 or higher version: power lost
can not be retentive
RS port protocol
M8196=1
M8125=0
M8192=1
RS sending mark
M8122=1
M8402=1
M8422=1
Need manual reset
RS sending completion mark
-
-
M8425
Need manual reset
RS receiving completion mark
M8123
M8403
M8423
Need manual reset
RS receiving process mark
M8124
M8404
M8424
Data is receiving
RS command 8/16 bits
differentiation mark
M8161
M8161
M8161
RS command CAN
master-slave mark
-
-
M8426
M8426=0 master-slave mode,
M8426=1 multi-device mode
RS command end operation
settings
012
MODBUS RTU function
M8196=1
M8125=1
M8192=1
-
RD3A\WR3A receiving
completion mark
M8128
M8408
M8428
Need manual reset
RD3A\WR3A communication
over-time mark
M8129
M8409
M8429
Need manual reset
ADPRW command completion
mark
M8029
M8029
M8029
Command execution end mark
Communication parameters
D8120
D8400
D8420
Communication mode
-
D8401
D8421
Master-slave station number
D8121
D8414
D8434
D8440
D8442
D8434:CAN slave station NO
D8440\D8442 multi-device mode
ID NO
RD3A/WR3A overtime
D8129
D8409
D8429
Unit: ms
2.11 PLC Communication port User Manual
PLC defaulted has a RS232 programming port, and two communication ports ( Rs232 or Rs485) can be
added. Meanwhile, CANbus is also optional.
2.11.1 Serial port 2: RS485(A B)/RS232
Support MITSUBISHI programming port protocol,Mitsubishi BD board protocol,RS protocol and
MODBUS protocol;
Special relay involved in this serial port: M8196,M8125,M8122,M8123,M8128,M8161,M8029
Special register involved in this serial port:D8120,D8121,D8124,D8125,D8126(26232 version
lower),D8397(26232 version and higher).
COOLMAY EX3G PLC/HMI All in one Programming manual
38
RD3A/WR3A interval period
D8126
D8406
D8426
Main version 26232 or higher
version
RD3A\WR3A end operation -1
012
ADPRW command settings
D8126=0
D8126=1
D8126=2
Main version 26232 or higher
version
ADPRW command settings
D8397=0
D8397=1
D8397=2
Main version 26232 or higher
version
CAN data frame
-
-
M8427
M8196: the activation flag of using programming port protocol and other protocol (Main version 26232 and
higher, modified to not maintain power failure).
M8125: the activation flag of using MODBUS and the original Mitsubishi function.
M8122: Send flag (this bit needs to be set 1 when using the RS instruction).
M8123: Communication completion flag (communication completion flag when using RS command, needs
to be reset by hand).
M8161: 8-bit/16-bit mode distinguishing flag for RS/RS2 instruction (used in version 26230 and above,
always in 8-bit mode in versions 26210 and 26220)
M8128: Communication completion flag (valid when using RD3A and WR3A for MODBUS
communication, needs to be reset by hand).
M8029: Communication completion flag (communication completion flag when using ADPRW instruction,
needs to be reset by hand).
D8120: Save the communication parameters of the Modbus RTU protocol, and the highest bit of the
communication parameters must be set to E.
D8121: Save the host or slave station number.
D8129: RD3A and WR3A time-out period. (Unit: ms. Better not over 100ms while setting).
D8126: When using the serial port 2 in the ADPRW instruction, set D8126 to 0. (Main version 26232 or
lower)
D8126: Interval period. Default as 10 times. (Main version 26232 or higher.)
D8397: When using the serial port 2 in the ADPRW instruction, set D8397 to 0. (Main version 26232 and
higher version)
Support RS,WR3A,RD3A,ADPRW, Can be set in parameter zone,correspond to serial port 2
Parameter zone settings are valid only for this channel. Invalid for serial port 3.
2.11.1.1 Mitsubishi programming port protocol
When used as programming port protocol: set M8196=0.
2.11.1.2 Free port protocol
When used as MITSUBISHI protocol: set M8196=1,M8125=0;the difference between Mitsubishi
protocol 1 and protocol 4 is with end mark OA OD ( stored in D8124, D8125 separately)
2.When used the Mitsubishi protocol, the D8120 only needs to set the lower 8 bits.
。
COOLMAY EX3G PLC/HMI All in one Programming manual
39
b0
Data length0:7 bit1:8 bit
b2
b1
Parity
00:None
01:Odd
11:Even
b3
Stop bit
0:1 bit
1:2 bit
b4
b5
b6
b7
Baud rate (b7b6b5b4)
0100:600bps
0101:1200bps
0110:2400bps
0111:4800bps
1000:9600bps
1001:19200bps
1010:38400bps
1011:57600bps
1100:115200bps
Demo Program:
Use the serial port tool by serial port 2 to monitor the data obtained: [2017:11:01:10:49:16][receive]31 32 33
2.11.1.3 Modbus RTU Protocol
When used as MOdbus RTU:set M8196=1,M8125=1; set D8120 as communication parameters, D8121 set
as slave station. For example: D8120=HE081,D8121=H1(communications parameter as 9600/8/n/1,station
number is 1
)
When PLC is as host, ADPRW,RD3A and WR3A is supported.
RD3A and WR3A only support the below MODBUS functions:
Hold register readout (function code: 0x03),
Register write (function code: 0x06),
COOLMAY EX3G PLC/HMI All in one Programming manual
40
Bit number
Content
b0
Data length
0:7 bit
1:8 bit
b2
b1
Parity
00:None
01:Odd
11:Even
b3
Stop bit
0:1 bit
1:2 bit
b4
b5
b6
b7
Baud rate (b7b6b5b4)
0100:600bps
0101:1200bps
0110:2400bps
0111:4800bps
1000:9600bps
1001:19200bps
1010:38400bps
1011:57600bps
1100:115200bps
b8
Set 0
b9
b10
b11
b12
Set 0
b13
Set 1
b14
Set 1
b15
Set 1
Batch register write (function code: 0x10).
For Main version 26231 lower,The RD3A and WR3A must be triggered with a rising edge. For 26231 and
higher main version,it can be triggered by the normal signal.
D8120 Parameter set
Read slave data instruction function and action description:
RD3A originally referred to the analog module readout.
For CoolMay PLC, the RD3A instruction corresponds to Modbus's No. 03 function.
COOLMAY EX3G PLC/HMI All in one Programming manual
41
In the instruction,
m1 represents the station number of the read slave device,range:1-247;
m2 represents the first address number of the read data in the slave device;
D represents the number of registers read, range: 1-32, and the read data is sequentially stored in the
host D.+1, D.+2.
D-1 address value must be set to 0. (=0: serial port 2; =1: serial port 3; =2: CAN)
Program example:
Master program:
Slave program:
Program explanation:
D300 saves the numbers of registers read, which means that 10 data is read.
D299 must be set to 0.
This program represents that 10 data of the registers D100-D109 in the PLC with the slave station 1 are read
and stored in the registers D301-D310 of the master station PLC.
Use the serial port tool to monitor the results:
(This example sets the data of the slave D100-D109 to 111-999).
Write data to the slave instruction function and action description:
COOLMAY EX3G PLC/HMI All in one Programming manual
42
WR3A originally referred to the analog modules write.
For CoolMay PLC, the WR3A instruction corresponds to Modbus's 06 and 10 functions.
In the instruction,
m1 represents the station number of the slave device to be written, range :1-247.
m2 represents the first address number of the write register in the slave device;
S represents the numbers of registers to be written, ranging:1-32. The data to be written is sequentially
stored in the host S.+1, S.+2.
S=1, the WR3A instruction corresponds to the Modbus 06 function.
S=2-32, the WR3A instruction corresponds to the Modbus 10 function.
S.-1 address value must be set to 0. (=0: serial port 2; =1: serial port 3; =2: CAN)
Program example:
Master program:
Slave program:
COOLMAY EX3G PLC/HMI All in one Programming manual
43
Program explanation:
This program represents that 1 data of the register D301 in the master PLC is written to the PLC in Slave 1,
and is stored in the register D100 of the slave PLC.
Use the serial port tool to monitor the results:
ADPRW instruction supports all functions of the MODBUS RTU;
No. 01: Read coil status and get the current status (ON/OFF) of a group of logic coils, range 1-512
No. 02: Read the input status and get the current status (ON/OFF) of a group of switch inputs, range
1-512
No. 03: Read the retentive register and get the current binary value in one or more retentive
registers, ranging from 1-32
No. 04: Get the current binary value in one or more input registers, range 1-32
No. 05: Force a single coil to force the on/off state (write bit) of a logic coil, range 1
No. 06: Load specific binary values into a retentive register (write register), range 1
No. 15: Force multiple coils, forcibly open and close a series of continuous logic coils (write multiple
bits), range 1-512
No. 16: Preset multiple registers, load specific binary values into a series of consecutive holding
registers (write multiple registers). Range 1-32
ADPRW function and action description
:
S. indicates the station number of the slave device to be read and written, the range is 0-32;
S1. indicates the function code (that is, the functions NO 01-06, 15, and 16 );
S2. The function parameter corresponding to each function code (the operand indicates the
MODBUS start address when the function is 01);
S3. The function parameters corresponding to each function code (the operand indicates the
number of access points when the function is 01, and the parameter is fixed to 0 when the 05
function is used);
D. indicates the starting position of the data storage device.
03 function code hold register output Program example:
Master program:
44
Slave program:
Functions
Serial port
2(A/B)
Serial port
3(A1/B1)
CAN(H/L)
Remark
Mitsubishi programming port
protocol
M8196=0
M8192=0
-
26232 or higher version: power
lost can not be retentive
COOLMAY EX3G PLC/HMI All in one Programming manual
Use the serial port tool to monitor serial port 2 for below data:
Support Mitsubishi programming port protocol,RS2 protocol and MODBUS protocol.
The special relays and registers related to this serial port are as below.
COOLMAY EX3G PLC/HMI All in one Programming manual
45
RS port protocol
M8196=1
M8125=0
M8192=1
-
RS sending mark
M8122=1
M8402=1
M8422=1
Need manual reset
RS sending completion mark
-
-
M8425
Need manual reset
RS receiving completion mark
M8123
M8403
M8423
Need manual reset
RS receiving process mark
M8124
M8404
M8424
Data is receiving
RS command 8/16 bits
differentiation mark
M8161
M8161
M8161
RS command CAN
master-slave mark
-
-
M8426
M8426=0 master-slave mode,
M8426=1 multi-device mode
RS command end operation
settings
012
MODBUS RTU function
M8196=1
M8125=1
M8192=1
-
RD3A\WR3A receiving
completion mark
M8128
M8408
M8428
Need manual reset
RD3A\WR3A communication
over-time mark
M8129
M8409
M8429
Need manual reset
ADPRW command completion
mark
M8029
M8029
M8029
Command execution end mark
Communication parameters
D8120
D8400
D8420
Communication mode
-
D8401
D8421
Master-slave station number
D8121
D8414
D8434
D8440
D8442
D8434:CAN slave station NO
D8440\D8442 multi-device mode
ID NO
RD3A/WR3A overtime
D8129
D8409
D8429
Unit: ms
RD3A/WR3A interval period
D8126
D8406
D8426
26232 or higher version
RD3A\WR3A end operation -1
012
ADPRW command settings
D8126=0
D8126=1
D8126=2
26232 or lower version
ADPRW command settings
D8397=0
D8397=1
D8397=2
26232 or higher version
CAN data frame
-
-
M8427
Special relay involved in this serial port 3: M8192,M8402,M8403,M8408,M8029,M8161.
Special register involved in this serial port 3: D8400,D8401,D8414,D8126,D8397(26232 version
higher).
M8192:the activation flag of using programming port protocol and other protocol (Main version 26232 and
higher, modified to not maintain power failure).
M8402:Send flag (use when RS2 instruction)。
M8403:Communication completion flag (communication completion flag when using RS instruction, needs
to be reset by hand).
M8408:Communication completion flag (valid when using RD3A and WR3A for MODBUS
communication, needs to be reset by hand).
COOLMAY EX3G PLC/HMI All in one Programming manual
46
Bit number
Content
b0
Data length
0:7 bit
1:8 bit
b2
b1
Parity
00:None
01:Odd
11:Even
b3
Stop bit
0:1 bit
1:2 bit
b4
b5
b6
b7
Baud rate (b7b6b5b4)
0100:600bps
0101:1200bps
0110:2400bps
0111:4800bps
1000:9600bps
1001:19200bps
1010:38400bps
1011:57600bps
1101:115200bps
b8
Unavailable, Set 0
b9
b10
b11
b12
Unavailable, Set 0
b13
b14
b15
M8029:Communication completion flag (communication completion flag when using ADPRW instruction,
needs to be reset by hand).
M8161:8-bit/16-bit mode distinguishing flag for RS/RS2 instruction (used in version 26230 and above,
always in 8-bit mode in versions 26210 and 26220)
D8400:Save the communication parameters of the Modbus RTU protocol
D8401:Save the communication mode of serial port 3. D8401=H11 represents PLC as Slave;D8401=H1
represents PLC as Master;D8401=H0 represents the RS free communication mode.
D8414:Save the host or slave station number.
D8126:When using the serial port 3 in the ADPRW instruction, set D8126 to 1. (26232 version lower)
D8397:When using the serial port 3 in the ADPRW instruction, set D8397 to 1. (26232 version and higher)
Support RS2,WR3A,RD3A,ADPRW instructions,Can be set in parameter zone,correspond to serial port 3.
Parameter zone settings are valid only for this channel. Invalid for serial port 2.
D8400 Parameter set
COOLMAY EX3G PLC/HMI All in one Programming manual
47
b0
Select protocol
0: Other communication protocol
1: MODBUS protocol
b1~b3
Unavailable, Set 0
b4
Master/Slave setting
0: MODBUS Master
1: MODBUS Slave
b5~b15
Unavailable, Set 0
D8401 Parameter set
2.11.2.1 Mitsubishi programming protocol
When using as mitsubishi programming port protocol: set M8192=0.
2.11.2.2 Mitsubishi programming protocol
When using as mitsubishi free portprotocol: set M8192=1, M8402=1;
Program example:
COOLMAY EX3G PLC/HMI All in one Programming manual
48
Use the serial port tool to monitor serial port 3 for below data:[2017:11:01:11:49:16][receive]37 38 39
Last parameter of RS2 instruction =0: serial port 2;=1: Serial port 3;=2: CAN.
2.11.2.3 Modbus RTU protocol RD3A/WR3A command
Used as MOdbus RTU:set M8192=1; set D8400 as communication parameters, set D8414 s as master slave
station no. For example: D8400=H81,D414=K1(communications parameter as 9600/8/n/1,slave station
number is 1
)
When PLC is as master, ADPRW,RD3A and WR3A is supported.
RD3A and WR3A only support the below MODBUS functions:
Function No. 03: Reads the holding register and takes the current binary value range of 1-32 in one or more
holding registers.
Function No. 06: Load the specific binary value into a holding register (write register) with a range of one.
Function No. 16: Preset multiple registers, load specific binary values into a series of consecutive holding
registers (write multiple registers), The range is 1-32.
Note: For main version 26231 lower,The RD3A and WR3A must be triggered with a rising edge. For 26231
version and higher,it can be triggered by the normal signal.
ead slave data instruction function and action description:
R
RD3A originally referred to the analog module readout.
For CoolMay PLC, the RD3A instruction corresponds to Modbus's No. 03 function.
In the instruction,
m1 represents the station number of the read slave device,range:1-247;
m2 represents the first address number of the read data in the slave device;
D represents the number of registers read, range: 1-32, and the read data is sequentially stored in the
host D.+1, D.+2.
D-1 address value must be set to 0. (=0: serial port 2; =1: serial port 3; =2: CAN)
Program Example:
Master program
:
Slave program
:
COOLMAY EX3G PLC/HMI All in one Programming manual
49
Master program
Slave program
Use the serial port tool to monitor serial port 3 for below data:
Write data to the slave instruction function and action description:
WR3A originally referred to the analog modules write.
For CoolMay PLC, the WR3A instruction corresponds to Modbus's 06 and 10 functions.
In the instruction,
m1 represents the station number of the slave device to be written, range :1-247.
m2 represents the first address number of the write register in the slave device;
S represents the numbers of registers to be written, ranging:1-32. The data to be written is sequentially
stored in the host S.+1, S.+2.
S=1, the WR3A instruction corresponds to the Modbus 06 function.
S=2-247, the WR3A instruction corresponds to the Modbus 10 function.
S.-1 address value must be set to 0. (=0: serial port 2; =1: serial port 3; =2: CAN)
Program Example
COOLMAY EX3G PLC/HMI All in one Programming manual
50
Use the serial port tool to monitor serial port 3 for below data:
ADPRW instruction supports all functions of the MODBUS RTU;
No. 01: Read coil status and get the current status (ON/OFF) of a set of logic coils, range 1-512.
No. 02: Read the input status and get the current status (ON/OFF) of a group of switch inputs, range 1-512.
No. 03: Read the retentive register and get the current binary value in one or more retentive registers, ranging
from 1-32.
No. 04: Get the current binary value in one or more input registers, range 1-32.
No. 05: Force a single coil to force the on/off state (write bit) of a logic coil, range 1.
No. 06: Load specific binary values into a holding register (write register), range 1
No. 15: Force multiple coils, forcibly open and close a series of continuous logic coils (write multiple bits),
range 1-512.
No. 16: Preset multiple registers, load specific binary values into a series of consecutive holding registers
(write multiple registers), range 1-32.
DPRW function and action desciption:
S. indicates the station number of the slave device being read and written, the range is 0-32;
S1. indicates the function code (that is, the functions 01-06, 15, and 16 written above);
S2. The function parameter corresponding to each function code (the operand indicates the MODBUS start
address when the function is 01);
S3. The function parameters corresponding to each function code (the operand indicates the number of
access points when the function is 01, and the parameter is fixed to 0 when the 05 function is used);
indicates the starting position of the data storage device.
04 input register read Program Example
Master program
Slave program
COOLMAY EX3G PLC/HMI All in one Programming manual
51
MODBUS device
CX3G/FX3GC device
Input (readout dedicated)
Coil (read/write)
0x0000~0x1DFF
0x0000~0x1DFF
M0~M7679
0x1E00~0x1FFF
0x1E00~0x1FFF
M8000~M8511
0x2000~0x2FFF
0x2000~0x2FFF
S0~S4095
0x3000~0x313F
0x3000~0x313F
TS0~TS319
0x3140~0x31FF
0x3140~0x31FF
Unused address
0x3200~0x32FF
0x3200~0x32FF
CS0~CS255
0x3300~0x337F
0x3300~0x337F
Y0~Y177
0x3380~0x33FF
-
Unused address
0x3400~0x347F
-
X0~X177
An error occurs when accessing an unused address
MODBUS device
CX3G/FX3GC device
Input register (readout dedicated)
Holding register (read/write)
0x0000~0x1F3F
0x0000~0x1F3F
D0~D7999
0x1F40~0x213F
0x1F40~0x213F
D8000~D8511
0x2140~0x7EFF
0x2140~0x7EFF
R0~R23999
Use the serial port tool to monitor serial port 3 for below data:
COOLMAY EX3G PLC/HMI All in one Programming manual
52
0x7F00~0xA13F
0x7F00~0xA13F
Unused address
0xA140~0xA27F
0xA140~0xA27F
TN0~TN319
0xA280~0xA33F
0xA280~0xA33F
Unused address
0xA340~0xA407
0xA340~0xA407
CN0~CN199
0xA408~0xA477
0xA408~0xA477
CN200~CN255
0xA478~0xA657
0xA478~0xA657
M0~M7679
0xA658~0xA677
0xA658~0xA677
M8000~M8511
0xA678~0xA777
0xA678~0xA777
S0~S4095
0xA778~0xA78B
0xA778~0xA78B
TS0~TS319
0xA78C~0xA797
0xA78C~0xA797
Unused address
0xA798~0xA7A7
0xA798~0xA7A7
CS0~CS255
0xA7A8~0xA7AF
0xA7A8~0xA7AF
Y0~Y177
0xA7B0~0xA7B7
-
Unused address
0xA7B8~0xA7BF
-
X0~X177
An error occurs when accessing an unused address
CN200~255 is a 32-bit counter
Operand function
S1.
Function code
S2.
MODBUS
address/subfunction code
S3.
Access points/subfunction
data
D.
Data storage device
start
Coil readout
1H
MODBUS Address:
0000H~FFFFH
Access points:1~2000
Read object device
D.R.M.Y.S
Input readout
2H
MODBUS Address:
0000H~FFFFH
Access points:1~2000
Read object device
D.R.M.Y.S
Holding register
readout
3H
MODBUS Address:
0000H~FFFFH
Access points:1~125
Read object device
D.R
Input register readout
4H
MODBUS Address:
0000H~FFFFH
Access points:1~125
Read object device
D.R
Single coil write
5H
MODBUS Address:
0000H~FFFFH
0(Fix)
Write object device
D.R.X.Y.M.S
0=OFF
1=ON
Single register write
6H
MODBUS Address:
0000H~FFFFH
0(Fix)
Write object device
D.R
Bulk coil writing
FH
MODBUS Address:
0000H~FFFFH
Access points:1~1968
Write object device
D.R.X.Y.M.S
Bulk register write
10H
MODBUS Address:
0000H~FFFFH
Access points:1~123
Write object device
D.R
2.11.3.3 ADPRW Command function parameter
2.11.4 CAN communication port
Support RS2 protocol and MODBUS protocol
COOLMAY EX3G PLC/HMI All in one Programming manual
53
Functions
Serial port
2(A/B)
Serial port
3(A1/B1)
CAN(H/L)
Remark
Programming port
M8196=0
M8192=0
-
26232 or higher version: power
lost can not be retentive
RS2 functions
M8196=1
M8125=0
M8192=1
-
RS2 sending mark
M8122=1
M8402=1
M8422=1
Need manual reset
RS2 sending completion mark
--M8425
Need manual reset
RS2 receiving completion mark
M8123
M8403
M8423
Need manual reset
RS2 receiving process mark
M8124
M8404
M8424
Data is receiving
RS command 8/16 bits
differentiation mark
M8161
M8161
M8161
RS2 command CAN
master-slave mark
--M8426
M8426=0 master-slave mode,
M8426=1 multi-device mode
RS2 command end operation
settings
012
MODBUS RTU function
M8196=1
M8125=1
M8192=1
-
RD3A\WR3A receiving
completion mark
M8128
M8408
M8428
Need manual reset
RD3A\WR3A communication
over-time mark
M8129
M8409
M8429
Need manual reset
ADPRW command completion
mark
M8029
M8029
M8029
Command execution end mark
Communication parameters
D8120
D8400
D8420
Communication mode
-
D8401
D8421
Master-slave station number
D8121
D8414
D8434
D8440
D8442
D8434:CAN slave station NO
D8440\D8442 multi-device mode
ID NO
RD3A/WR3A time-out period
D8129
D8409
D8429
Unit: ms
RD3A/WR3A interval period
D8126
D8406
D8426
26232 or higher version
RD3A\WR3A end operation -1
012
ADPRW command settings
D8126=0
D8126=1
D8126=2
26232 or lower version
ADPRW command settings
D8397=0
D8397=1
D8397=2
26232 or higher version
CAN data frame
--M8427
The special relays and registers related are as below.
Special relay involved: M8426,M8422,M8424,M8425.
Special register involved: D8420,D8421,D8126,D8397(version in 26232 and above),D8440,D8442.
M8422: Send data and needs manual reset.
M8423: Date receiving completion.
COOLMAY EX3G PLC/HMI All in one Programming manual
54
M8424: Data is under receiving.
M8425: The transmission is completed and needs manual reset.
M8426: Switch between multi-machine mode and master-slave mode
M8426=1: CAN is in multi-machine mode, there is no master-slave division, and it can
transmit up to 8 bytes of data.
M8426=0: CAN is the master-slave mode. There must be one master on the bus line,
which is similar to the MODBUS function.
M8427: =0 means setting as CAN2.OB extension frame.=1 means setting as CAN2.OA
standard frame.
M8428: Set as ON while right response of MODBUS communication and needs manual reset.
M8429: Communication times out.
D8420:Communication parameters.
D8420: The 0th to 9th bits are CAN baud rate, 1K~1023K. The default is 500.
Supported baud rate:5 10 15 20 25 40 50 62 80 100 125 200 250 400 500 666 800 1000.
D8421: Communication protocol and description of master-slave station.
RS2 command: Setting as D8421=H10, which means RS protocol.
RD3A, WR3A, ADPRW command: D8421=H1 is master station, D8421=H10 is slave station.
D8126: When using the ADPRW instruction, set the D8126 to 2 when using CAN. (lower than
26232 version)
D8397: When using the ADPRW instruction, set the D8397 to 2 when using CAN. (versions
26232 and above)
D8426: Interval period. Default as 12 times.
D8429: Time-out period.
D8434: Slave station number.
D8440: Save the local ID number (slave station number).
D8442: When multiplexed, save the slave ID number (the slave what data is read).
1,Support RS2 instruction
RS2 finial parameter=0: serial port 2;
=1: serial port 3;
=2:CAN
When RS2 support CAN, multiple channels can communicate with each other, ID(read 29 bit )=D8442
ID(write 29 bit)=D8440,at most 8 length.
29 digits indicate that the first three are useless. Multi-channel interconnection example:
LD M8000 RS2 D600 K8 D800 K8 K2
LD M8002 MOV H10 D8421
LDI M8422 ANI M8424 SET M8422
2,Support WR3A,RD3A instruction.
For specific operation explanation, please refer to WR3A and RD3A instructions of serial port 2 or serial
port 3
;
COOLMAY EX3G PLC/HMI All in one Programming manual
55
Functions
Network
Remark
Network preparation
M8193
Write network address
M8197
26232 or higher version
MODBUS time out
M8062
IP address conflict
M8063
Switch mark between
Mitsubishi functions and
MODBUS
D8395
ADPRW command settings
D8397=3
Router address
R23800 R23801
Mask address
R23802 R23803
MAC address
R23804~R23806
Local IP address
R23807 R23808
Target IP address
R23810 R23811
Terminal
R23812
Default as 502
RD3A/WR3A command
cycling times
R23813
MODBUS time-out period
R23814
InfoPacketSend
R23815
26235 and higher version
InfoPacketReceive
R23816
26235 and higher version
S.-1 address value must be set to 2. (=0: serial port 2; =1: serial port 3; =2: CAN)
3,Support ADPRW instruction
( Set D8126=2Corresponds to optional CAN port)
For example, CAN port program of expansion board
LD M8002MOV H1 D8421:CAN port of this PLC is the master station
LD M8000MOV K2 D8126
LD M8 ADPRW H1 H2 H2000 K16 M100
It means that the CAN port of the PLC communicates with the CAN port of the slave PLC, and reads
16-bit S0~S15 of the slave PLC to the M100~M115 of the master PLC.
The default state is compatible with Mitsubishi original programs. The Mitsubishi PLC only has one port
to support the ADPRW instruction, depends on D8401 (in prior) and D8421. All three ports of Coolmay PLC
support the ADPRW instruction.
2.12 Network communication
Automatically detect the network after power-on. M8193=1 when there is a network chip,
network preparation.
Special relays, registers and registers that IP addresses used are as below.
M8193:=1 Represents that there is a network chip, network preparation
M8197:=1 Write network address, automatic reset (Not support 26231 version, you can write
COOLMAY EX3G PLC/HMI All in one Programming manual
56
the above parameters and then restart).
M8062:=1 Represents MODBUS timeout, MODBUS_TCP is used.
M8063:=1 Represents IP address is conflict.
D8395:Switch between Mitsubishi function and MODBUS_TCP
D8397:While using ADPRW command, it needs to set D8397 to 3 when using
MODBUS_TCP.(26232 and higher version)
R23800,23801 is the router address. Default:192 .168. 1 .1. Namely R23800=0XC0A8
R23801=0X0101.
R23802,23803 is the mask address,Default:0 .0. 0 .0. Namely R23802=0,R23803=0
R23804~23806 is the MAC address,is generated by the system, basically no duplication,can
also be set. Note: MAC addresses on the same network cannot be duplicated, otherwise
communication will be abnormal.
R23807,R23808 is the local IP address. Default:192 .168. 1 .250.Namely R23807=0XC0A8
R23808=0X01FA.
R23810,R23811 is the MODBUS target IP
,
R23812 Port default =502
R23813 default=100 (Cycle numbers) is the WR3A RD3A sequential execution interval.
R23814 default=20(200ms), is the MODBUS timeout setting, only retry twice, each time =
( R23814 * 5) ms.
R23815 is MODBUS InfoPacketSend. (26235 and higher version)
R23816 is MODBUS InfoPacketReceive. (26235 and higher version)
1,The master station supports WR3A and RD3A instruction.
,
。
,
For specific operation explanation, please refer to WR3A and RD3A instructions of serial port 2 or
serial port 3
S.-1 address value must be set to 3. (=0: serial port 2; =1: serial port 3; =2: CAN; =3: MODBUS)
For example: WR3A D300 D400 D500,RD3A D300 D400 D500.The S.-1 address value must be set to
3, Namely D499=3.
D499=0, It is serial port 2 MODBUS.
D499=1, It is serial port 3 MODBUS.
D499=2, It is CAN_MODBUS.
D499=3, It is Network MODBUS.
The slave response function code does not support 0X7 0X8 0XB 0XC 0X11, all others are supported
COOLMAY EX3G PLC/HMI All in one Programming manual
57
Series
Difference
EX2N series HMI/PLC all in one
EX3G series HMI/PLC all in one
Size difference
Cutout size
EX2N-43H series is the same as the EX3G-43HB series ,Dimension:134*102*30mm,Cutout:
119*93mm;
EX2N-43KH/50KH is the same as EX3G-43(50)KH series,Dimension:150*93*32mm,Cutout:
143*86mm;
EX2N-100HA series is the same as EX3G-100HA series,Dimension:275*194*36mm,Cutout:
261*180mm;
EX2N-70H series Dimension:212*148*40mm,Cutout:194*138mm;
EX3G-70KH series Dimension:226*163*35.6mm,Cutout:218*153mm。
HMI
Resolution
EX2N-43H/43KH:480*272
EX2N-50KH/70H:800*480
EX2N-70H/100HA:1024*600
EX3G-43HB/43KH:480*272
EX3G-50KH/70KH:800*480
EX3G-70KH/100HA:1024*600
RAM
H/KH:64MB;HA(S):128MB
43HB:32MB
43(50)KH:64MB
43HA/43(50)/70KH/100HA:128MB
CPU
H/KH series ARM9 core 400MHz
HB:ARM9 core 216MHz
KH:ARM9 core 400MHz
2.13 Difference between EX3G and EX2N PLC/HMI All in one
COOLMAY EX3G PLC/HMI All in one Programming manual
58
COM
Optional communication port supports the
Mitsubishi programming port protocol/MODBUS
protocol/RS protocol. EX2N-43H/43KH/50KH
Optional 1 RS232, optional audio, no optional
network port; EX2N-70H /100HA optional 1
RS232 or 1 RS485,Optional network port and
audio.
The optional communication port supports the
Mitsubishi programming port
protocol/MODBUS protocol/RS protocol.
EX3G-43HB/43(50)KH can be equipped with
1 RS232.
No optional network port;
The EX3G-70KH/100HA can be equipped
with one 232 or one 485, and the optional
network port (can not coexist with the PLC
network port).
PLC
Instruction
operation time
About 30ns/basic instruction;About 200ns(8K
steps about 25ms)/application instruction
0.42μs/basic instructions; 1.6μs/application
instructions
Digital input
Active NPN (common terminal connect with
negative)
Passive NPN, common side isolation
PLC type
Compatible with Mitsubishi FX2N
Compatible with Mitsubishi FX3G
PLC
programming
software
Compatible with Works 2/GX Developer8.52
Compatible with Works 2/GX Developer 8.86
version
Write mode
write when run is not supported
Support RUN write, modify the program
more convenient and fast
PLC
programming
port
DB9 port RS232 programming port
It comes with two PLC programming ports
(Mini B type USB port and RS232 port), USB
programming port download can reach
115200bps, USB programming port download
speed can reach 12Mbps.
COM port
Optional communication port supports the
Mitsubishi programming port protocol/MODBUS
protocol/RS protocol. EX2N-43H/43KH50KH
can be optionally equipped with one RS485;
EX2N-70H/100HA can be equipped with one
RS232 or one RS485.
The optional communication port supports
Mitsubishi programming port
protocol/MODBUS protocol/RS protocol/BD
board protocol, which facilitates PLC
interconnection and communication with
external devices.
EX3G-43HB/EX3G-43(50)KH series can be
equipped with 2 485; EX3G-70KH/100HA
can be equipped with 1 485 or 2 485 (optional
2 485, one of them) 485 is changed from the
default 232 special), optional CAN port,
network port (and touch screen network port
can not coexist), optional WIFI (will occupy
the default 232 port).
Program
Capacity
8K steps
32K steps
COOLMAY EX3G PLC/HMI All in one Programming manual
59
Auxiliary
register range
[M0~M499] 500 points General;
[M500~M1535] 1036 points Keep in;
[M8000~M8255] 256 points Special.
[M0~M383] 384 points General;
[M384~M1535] 1152 points to keep in;
[M1536~M7679] 6144 points General;
[M8000~M8511] 512 points Special.
Data register
range
[D0~D199] 200 points General;
[D200~D999] 800 points Keep in ;
[D8000-D8255] 256 points Special.
[D0~D127] 128 points General;
[D128~D7999] 7872 points to keep in;
File register [R0~R23999] 24000 points to
keep;
[D8000-D8511] 512 points Special.
Status register
range
[S0~S9] 10 pointsInitial status;
[S10~S499] 490 points General;
[S500~S999] 500 points keep in.
[S0-S9] 10 points for initial state;
[S10~S999] 990 points to keep in use;
[S1000~S4095] 3096 points Generally used.
Timer range
[T0~T199] 200 points 100ms General;
[T200~T245] 46 points 10ms General;
[T246~249] 4 points 1ms, General;
[T250~T255] 6 points 100ms Cumulative keep
in.
[T0~T199] 200 points 100ms is general;
[ T200~T245] 46 points 10ms for general use;
[T246~T249] 4 points 1ms cumulatively
used;
[T250~T255] 6 points 100ms cumulatively
used;
[T256~T319] 64 points 1ms Normal use.
Counter range
[C0~C99] 100 points Generally 16 bits;
[C100~C199] 100 pointsPower outage
remains 16 bits; [C200~C234] 35 pointsPower
outage remains 32 bits.
[C0~C15] 16 points, generally 16 bits;
[C16~C199] 184 points, power failure to
maintain 16 places;
[C200~C219] 20 points, generally 32 bits;
[C220~C234] 15 points Power failure to
maintain 32 bits.
Pointer,
interrupt
[P0~P127] 128 points JUMP CALL.
[P0~P255] 256 points JUMP CALL;
[P0~P1280] 1281 points JUMP CALL (26232
and above);
Input interrupt 6 points I0□□~I5□□;
The timer is interrupted by 3 points
I6□□~I8□□.
DI/DO
Up to 24DI/20DO, at most 18 relay can be
available.
Supports up to 30DI/30DO and up to 28 MR.
Note: When the switch quantity reaches
30DI/30DO, the analog quantity can be up to
5AD/2DA; when the switch quantity is
24DI/20 DO, the analog quantity can be up to
16AD/ 8DA.
DO type and
load
Relay MR(Maximum load: 5A)/Transistor
MT(Maximum load:500mA)/Mixed output MRT.
EX3G-43H/HB/EX3G-43(50)KH series
optional
Relay MR (maximum load 5A) / MOS tube
(maximum load 2A)
EX3G-70KH/100HA optional relay MR
(maximum load 5A) /
Transistor MT (maximum load 500mA) /
COOLMAY EX3G PLC/HMI All in one Programming manual
60
mixed output MRT.
Analog
Support multiple analog input and output, single
or mixed, at most 20AD/8DA, analog input
precision 12 bit, output 10 bit.
Analog input is read the value of special registers,
analog output is to reset standard bit ON and then
value special registers.
AD type:EK thermocouple /S thermocouple /J
thermocouple / PT100 / PT1000 /NTC10K/
NTC50K/NTC100K /0-20mA /4-20mA /0- 10V
/0-5V
DA type: 0-10V/0-5V /0-20mA
Support multiple channels of various types of
analog single or mixed input and output, a
single device up to 16 in 8 out, analog input
and output accuracy 12 bits. The CX3G
analog input read supports direct read
registers, and can also use the FROM
instruction. The analog output supports direct
register assignment or the TO instruction.
Analog input type: EKSTJ type thermocouple
(can support negative temperature) /
PT100/PT1000/NTC10K/NTC50K/NTC100
K/0-10V/0-5V/0-20mA/4-20mA or hybrid
and other special specifications;
EX3G-70KHA(S)/100HA all-in-one supports
-5V~5V And -10V~10V voltage input.
Analog output type:
0-10V/0-5V/0-20mA/4-20mA or hybrid type
optional.
High speed
counter
Regularly with 2 channels single or AB phase
10Khz high speed counter. At most 6 channels
single phase(410-100K,2 5-10K)or 3 channels
AB phase (2 10-100K,15-10K)or 3 ABZ phase(1 10-100K,2 5-10K). Fixed double frequency.
EX3G-43HB single phase 6 channel 10KHz
or AB (Z) phase 3 channel 0KHz.
Conventional single-phase 6 channel 60KHz
or AB(Z) phase 2 channel 60KHz+1 channel
10KHz.
Pulse
Regularly 4 channels 20Kpulse, Y0/Y1/Y6/Y7,
at most can be customized to 5channel 20-200K.
Acceleration and deceleration is the same
register.
The conventional 8 channel Y0-Y3 is
100KHz, and the Y4-Y7 is 10KHz;
Acceleration and deceleration independent,
high-speed counting + high-speed pulse total
transmission can not exceed 480KHz.
Supported
instructions
Compatible with most instructs of FX2N ,
position instruct andfloating points of 3U(123
instructs in total).EI and high speed compare not
supported. PID supported, adjust automatically
not supported, users need to modify parameters
by hand.
Support interrupt, support linear arc
interpolation, support high-speed instruction
such as high-speed set reset, PID support
auto-tuning (only step response mode is
supported), support for index multi-point
transfer instruction/binary floating-point
number transfer, Gray code conversion,
binary Floating point angle arc conversion,
data block addition and subtraction, cam
matrix, digital tube command, etc. (More than
76 instructions supported by CX2N).
COOLMAY EX3G PLC/HMI All in one Programming manual
61
3. HMI
3.1 HMI program software user introduction
3.1.1HMI Program software installation
Coolmay HMI program software, compatible with XP/WIN7/WIN8/WIN10 system. If it can not be installed
for use, pls try by replacing another computer, re-installing the system, and higher user rights. Among them,
The WIN7 system must change the user account control settings to never notify, WIN8 system, WIN10 system
must turn off the digital signature to reduce trouble.
Installation:Double-click “CoolMayHMI V*.** .exe”and follow the prompts to click Next.
Note: If it is not the latest version, please ask the customer service or enter the official website of Shenzhen
Coolmay Technology Co., Ltd. “www.coolmay.net”.
3.1.2 New build HMI program
1,Double click, then Click [New], or click the iconin the toolbar, or use the defaulted
hotkey Ctrl+N.
COOLMAY EX3G PLC/HMI All in one Programming manual
62
3.2 HMI Display download
EX3G-50KH/50KHA/70KHAS select MT6070H(800*480)
EX3G-70KHA/100HA select MT6100HA(1024*600)
;
;
3.2.1 Online download step (USB download line download)
1. After saving the program, click “application” --- ”compile” in the software (shortcut F5)
COOLMAY EX3G PLC/HMI All in one Programming manual
63
After compiling, it will prompt to create the target file successfully;
2. Under the target file path (view the default disk in the software application---target file path, the
default is on the C drive)
Confirm that the C drive has generated a file with the same file name and the same name as .hw6, as shown
in the test program”. hw6”
64
3. Click “Application”--”Download”.
COOLMAY EX3G PLC/HMI All in one Programming manual
4.The download window pops up, the HMI connection is OK, the IP setting is OK, wait for the download
command prompt, and then click download;
5.The download will complete and the update will be successful.
65
3.2.2 U disk download step (43HB series don’t support)
2.Under the target file path (view the default disk in the software application---target file path, the default
3. Copy the .hw6 file in the target file path to the USB flash drive;
4. Insert the USB flash drive into the usb port of the product - the USB setting screen will pop up;
1. After saving the program, compile the program (shortcut F5);
is on the C drive)
COOLMAY EX3G PLC/HMI All in one Programming manual
Find the file generated in C disk, which name is “.hw6” and same as program file.
COOLMAY EX3G PLC/HMI All in one Programming manual
66
5. Click “Update *.hw6 file”, enter the corresponding level password , the default super password is
1) Open "Application --- Setting OP Parameters --- Communication Settings"
12345678, the default normal password is empty (direct confirmation);
if you changed the password, you need to enter the corresponding correct password;
After confirming, find the “.HW6” file in the lower right corner. After double-clicking, the confirmation box
will pop up. The progress bar will be updated automatically.
3.3 Introduction when HMI is with com port for MODBUS RTU protocol
3.3.1 HMI as master
Note: When the HMI is used as a Master with one slave, the communication port can be set to COM2 in
Link1 or Link2 settings (Optional RS485 or RS232 for HMI, multiple slaves not available for RS232), and
COM1 is used for communicating HMI of all-in-one to PLC of all-in-one.
1.HMI as master and connect to only one slave settings:
link2 settings are as below:
Communication port : COM2
Device Type: Modbus RTU Slave
Communication speed, communication timeout, check bit, data bit, stop bit: according to your own
communication needs, , the master and salve must be set as the same.
Device ID : The slave number to be read.
COOLMAY EX3G PLC/HMI All in one Programming manual
67
2) Communication Parameter setting: Open "Application --- Setting OP --- Network Settings"
1) In communication parameters setting,Open "Application --- Setting OP parameters --- Communication
2) In Communication Parameter Settings, Open "Application --- Set Working Parameters --- Network
Controller ID Address Mode: Select the default standard mode
2.HMI as mater and connect to multi-slaves setting:
Note: When the HMI is used as the Master with multiple slaves, the communication port must be set to
COM2 in the Link1 setting (HMI optional RS485). In the Link2 setting, the communication port is changed
to COM1 for communicating HMI of all-in-one to PLC of all-in-one.
settings"
Settings in the link1 are as follows:
Communication port: COM2.
Device type: Modbus RTU Slave.
Communication speed, communication timeout, check bit, data bit, stop bit: according to their own
communication needs, the master and salve must be set as the same.
Settings" .
Controller ID Address Mode: Select Extended Mode.
COOLMAY EX3G PLC/HMI All in one Programming manual
68
1. Communication parameter setting,Open "Application --- Set OP Parameters --- Communication
Extended communication ID switching interval: The default is 35ms, which can be adjusted according to
actual communication.
Extended Mode Start ID: The default is 1, which is the first slave station number of the connected slave.
Each ID address register number: 100-30000 range can be set according to the actual register range setting of
each slave.
The following figure shows:
the HMI is connected with multiple slaves, the first slave station number is from 1.
Number of each ID address register set 1000 When 4x0-4x999 indicates the address register of slave 0-999,
4x1000-4x1999 indicates 0-999 of slave 2.The register address, 4x2000-4x2999, represents register address
0-999 of slave 3... and so on.
3.3.2 HMI as slave
Note: When the HMI is used as a slave, the communication port can be set to COM2 in Link1 or Link2
settings (Optional RS485 or RS232 for HMI), and COM1 is used for communicating HMI of all-in-one to
PLC of all-in-one.
Settings"
link1 or link2 settings are as below:
Device Type: Modbus RTU Slave
Communication speed, communication timeout, check bit, data bit, stop bit: according to your own
communication needs, , the master and salve must be set as the same.
69
2. station number setting
1) Put a function key on the HMI program and jump to the 255 system menu page, and then compile and
COOLMAY EX3G PLC/HMI All in one Programming manual
download the program to the HMI.
As shown below:
3.4 Other HMI usage.
please refer to CoolMay HMI User Manual,CoolMay HMI Programming Manual
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.