
CX3G / FX3GC PLC
Programming Manual
(Difference comparing with Mitsubishi
FX3G)
Shenzhen Coolmay Technology Co.,Ltd
V8.71

CATALOG
1. Overview...............................................................................................................................1
1.1 COOLMAY CX3G PLC has the following advantages:....................................1
1.2 CX3G PLC..................................................................................................................3
1.3 Models of FX3GC PLC.............................................................................................4
2. Soft element......................................................................................................................... 5
3. Special relay and register not supported......................................................................... 8
4. Function Instructions...........................................................................................................9
5. Application of analog.........................................................................................................20
5.1 Analog input............................................................................................................. 20
5.1.1 Analog input (temperature)........................................................................ 20
5.1.2 Analog input reading 1 (for software version 26210 and 26220)...... 23
5.1.3 Analog input reading 2 (for software version 26220).......................... 24
5.1.4 Analog input reading 3 (for software version 26230 and above)...... 25
5.1.5 Analog input sampling..............................................................................27
5.2 Analog output...........................................................................................................27
5.3 PID instruction......................................................................................................... 28
6. Application of high speed counter.................................................................................. 29
7. Application of high speed pulse...................................................................................... 31
7.1 high speed pulse output.........................................................................................31
7.2 Circular interpolation...............................................................................................32
8. Coolmay CX3G PLC Communication User Manual.................................................... 37
8.1 Serial port 1: RS232( PLC programming port)................................................... 37
8.2 Serial port 2: RS485(A B)/RS232.........................................................................37
8.3 Serial port 3:RS485(A1 B1)...................................................................................49
8.4 Modbus Communication address number.......................................................... 60
8.5 CAN communication port.......................................................................................61
8.6 Network communication.........................................................................................65

CX3G/FX3GC PLC Programming manual
1. Overview
1.1 COOLMAY CX3G PLC has the following advantages:
◆Powerful, compatible with FX3G/FX3U/FX3S PLC, high processing speed.
◆Upper computer programming software compatible with Works 2/GX
Developer8.86
◆Military level 32 bit CPU adopted, which is faster and more adapted to industrial
environment of high electromagnetic interference.
◆Special encryption, prevent illegal reading thoroughly. 8-bit encryption, 12345678
as password can thoroughly prevent reading of ladder logic program.
◆Clock supported, rechargeable battery adopted.
◆With two PLC programming ports. CX3G PLC has one MiniB USB port with faster
downloading speed; one Rs232 programming port with 8 mouse hole
sockets.FX3GC PLC has one MiniB USB port with faster downloading speed; one
Rs422 programming port with 8 mouse hole sockets.
◆Support Mitsubishi programming port protocol/Modbus protocol/Rs protocol/BD
board protocol, PLC communication with each other and other devices is easily
achieved.
CX3G-16M/24M/32M/48M PLC is with 2 com ports. Default is with 2 RS485, or
customized as 1 RS485+1 RS232, or 1RS485+ 1 CAN port, or 1RS232 + 1 CAN port.
CX3G-34M/64M/80M PLC is with 3 com ports. Default is with 2 RS485,or customized
as 1 RS485+1 RS232,CAN port is optional for connecting HMI,VFD and other
equipment.
For FX3GC-30M, 1 Rs485 can be added;
For FX3GC-16M, com ports/ analog can be added, at most 2 Rs485+1 CAN
port+6AD4DA can be added; or 1 Rs485+1 CAN port+8AD4DA can be added; or 1
RS485 +8AD6DA can be added, or 2 RS485 +1 CAN port can be added.
◆High speed counter. For CX3G PLC,regularly single phase 4 channels 60KHz、2
channels
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
10KHz or double phase 2 -3channels up to 60KHz, and could be customized as single
phase 100khz or 2 channels double phase 60khz+ 1 channel 10khz; For FX3GC PLC,
regularly single phase 1 channels 100KHz、4 channels 20KHz or double phase 1
channels 60KHz、2 channels 10KHz
◆High speed pulse, regular as 8 channels Y0-Y3 in 100KHz,Y4-Y7 in 10KHz, could
be customized as 8 channels 10-100KHz;
Note: High speed counter+High speed pulse should be less 480KHz.
◆Support multiple types analog individually or mixed ones for analog output and
input.
Precision of AD/DA is 12bit.Temperature/current/voltage for input. current/voltage for
output.
For CX3G PLC, at most 16DI/8DO. For FX3GC-16M, com ports/ analog can be added,
at most 2 Rs485+1 CAN port+6AD/4DA can be added; or 1 Rs485+1 CAN
port+8AD/4DA can be added; or 1 RS485+8AD/6DA can be added or 2 RS485+ 1
CAN port can be added.
◆Up to 40DI/40DO for CX3G PLC, up to 16DI/16DO for FX3GC PLC.
Relay/transistor or mixed relay and transistor for output.
◆Convenient for wiring. CX3G adopts 5.00mm pluggable terminals. FX3GC adopts
3.5mm pluggable terminals.
◆Easy installation. DIN-Rail (35mm width) installation and fixed hole installation.
◆Flexible, can be customized accordingly.
www.coolmayplc.com

1.2 CX3G PLC
Fixed hole installation and DIN-Rail (35mm )
Support interrupt, linear arc interpolation, PID auto-tuning. 32K program capacity, 32K retentive register
Input: Passive NPN, public terminal isolated
Transistor output: NPN
Relay output: Normally open dry contact
Transistor(MT)
or mixed(2T6R)
Relay(MR) or transistor(MT) or mixed(MRT)
6 channel single-phase 60KHz or AB(Z) phase 2 channel 60KHz, 1 channel 10KHz
8 channels, Y0-Y3 is 100KHz, Y4-Y7 is 10KHz
High-speed counting + high-speed pulse < 480KHz
Type E/K/S/T/J thermocouple/ PT100/ PT1000/ NTC10K/ NTC50K/ NTC100K/
0~10V/ 0~5V/ 0-20mA/ 4-20mA
-5V~5V/ -10V~10V(except for CX3G-16M)
0~10V/ 0-~5V/ 0~20mA/ 4~20mA
1 Mini type B USB port, 1 Rs232(Interface terminal is mouse female port with 8 holes), 2 RS485 ports
Default 2 RS485 ports can be customized as
1 RS485, 1 RS232,
or 1 RS485, 1 CAN (2.0A/B),
or 1 RS232, 1 CAN (2.0A/B)
Default 2 RS485 ports can be customized as 1 RS485, 1
RS232,
CAN (2.0A/B) port is optional
Software
Suggested models:CX3G-16MT/MRT(-485/232) CX3G-24MT/MR/MRT(-6AD4DA -485/232)
CX3G-32MT/MR/MRT(-2AD -485/232) CX3G-34MT/MR/MRT(-12AD8DA -485/232)
CX3G-48MT/MR/MRT(-8AD4DA -485/232) CX3G-64MT/MR/MRT(-16AD8DA -485/232)
CX3G-80MT/MR/MRT(-4AD4DA -485/232)
Detailed info. refer to:COOLMAY CX3G PLC Programming Manual CX3G PLC user manual
CX3G/FX3GC PLC Programming manual
www.coolmayplc.com

1.3 Models of FX3GC PLC
FX3GC-16M
Communication/analog extension module can
be customized
DIN-Rail (35mm ) mounting
Support interrupt, linear arc interpolation, PID auto-tuning. 32K program capacity, 32K retentive register
Input: Passive NPN, public terminal isolated
Transistor Output: NPN
Relay output: NO contact
Relay(MR)/ Transistor (MT)/ Mixed (MRT)
Single phase 6 channel 60KHz or AB(Z) phase 2 channel 60KHz, 1 channel 10KHz
8 channels,Y0-Y3 is 100KHz,Y4-Y7 is 10KHz
High-speed counting + high-speed pulse < 480KHz
6AI/4AO or 8AI/4AO or 8AI/6AO
Type E/K/S/T/J thermocouple/ PT100/ PT1000/ NTC10K/
NTC50K/ NTC100K/
0~10V/ 0~5V/ 0-20mA/ 4-20mA
-5V~5V/ -10V~10V/ mixed
0-10V/ 0-5V/ 0-20mA/ 4-20mA
1 Mini type B USB port, 1 RS422(Interface terminal is 8 holes mouse female port)
Compatible with Mitsubishi WORKS 2/GX Developer8.86
Suggested models:FX3GC-16/32MT/MR/MRT FX3GC-30MT/MR/MRT(-485)
Analog and COM package of FX3GC-16M: 2 RS485, 1 CAN, 6AD4DA
Or 1 RS485, 1 CAN port, 8AD4DA
Or 1 RS485, 8AD/6DA
Or 2 RS485, 1 CAN
Detailed info. refer to:COOLMAY CX3G PLC Programming Manual
CX3G/FX3GC PLC Programming manual
www.coolmayplc.com

Soft element table
Soft element number is octal
Total 80points for I/O
Initial state (EEPROM hold)
Signal Alert (EEPROM hold)
1ms accumulative
(EEPROM hold)
100ms accumulative
(EEPROM hold)
CX3G/FX3GC PLC Programming manual
2. Soft element
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
General up counter (16bit)
EEPROM hold up counter
(16 bit)
General bi-direction (32 bit)
-2,147,483,648~+2,147,483,647
counter
EEPROM hold bi-direction
(32 bit)
-2,147,483,648~+2,147,483,647
counter
Single-phase single counter
input
Bi-direction (32 bit) (EEPROM
hold)
-2,147,483,648~+2,147,483,647 Counter
Software counter
Single phase:at most 6 channel, 60kHz
Double phase:double frequency:at most 2-3
channels,60KHz
M8198 is 4 times frequency sign of
C251.
Quad frequency:at most 2-3
channels,24kHz
M8199 is 4 times frequency sign
of C253.
Single-phase double counter
input
Bi-direction (32 bit) (EEPROM
hold)
Double –phase double counter
input
Bi-direction (32 bit)(EEPROM
hold)
Data register(32 bit when using in pair)
Extended register·extended file register
Extended register(16 bit)*1
24000points Maintain when power off not
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
2048 points
1281
points(26232 and
above)
CJ instruct、CALL instruct
-2,147,483,648~+2,147,483,647
-1.0×2128~-1.0×2-126,0,1.0×2-126~1.0×2128
Can be in the form of a decimal point and index
www.coolmayplc.com

3. Special relay and register not supported
Special relay and register not supported
※ Special relay not supported
M8004~M8010,
M8015~M8019,
M8024~M8027,
M8030,
M8038~M8039,
M8040~M8044,
M8060~M8074,
M8084~M8119,
CX3G/FX3GC PLC Programming manual
M8130~M8159,
M8161~M8169,
M8178~M8191,
M8256~M8339,
M8370~M8395,
M8430~M8511.
※ Special register not supported
D8004~D8009,
D8042~D8067,
D8069~D8073,
D8105~D8119,
D8150~D8168,
D8200~D8329,
D8468~D8511.
* Specific functions please refer to “Mitsubishi FX3G programming manual”
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
Data conversion instructions
Arithmetic operation instructions
Logical operation instructions
Special function instructions
Data operation instructions
Data operation instructions
Character string operation instructions
Program flow control instructions
Real time clock control instructions
Pulse output/positioning control instructions
Special block/unit control instructions
Extension register/extension file register control instructions
1. Data move instructions
4. Function Instructions
Applied instructions “Sequence is according to instruct variety”
(Contrast with MITSUBISHI)
Applied instruction can be divided into the following 18 kinds.
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
Parallel Run (Octal Mode)
2. Data conversion instructions
Conversion to Binary Coded Decimal
BIN19Conversion to Binary
Decimal to Gray Code Conversion
Gray Code to Decimal Conversion
Conversion to Floating Point
Floating Point to Integer Conversion
Floating Point to Scientific Notation
Conversion
Scientific Notation to Floating Point
Conversion
Floating Point Degree to Radian
Conversion
Floating Point Radian to degree
Conversion
3. Comparison instructions
Contact compare LD
(S1)=(S2)
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
Contact compare LD
(S1)>(S2)
Contact compare LD
(S1)<(S2)
Contact compare LD
(S1)≠(S2)
Contact compare LD
(S1)≦(S2)
Contact compare LD
(S1)≧(S2)
Contact compare AND
(S1)=(S2)
Contact compare AND
(S1)>(S2)
Contact compare AND
(S1)<(S2)
Contact compare AND
(S1)≠(S2)
Contact compare AND
(S1)≦(S2)
Contact compare AND
(S1)≧(S2)
Contact compare OR
(S1)=(S2)
Contact compare OR
(S1)>(S2)
Contact compare OR
(S1)<(S2)
Contact compare OR (S1)≠(S2)
Contact compare OR (S1)≦(S2)
Contact compare OR (S1)≧(S2)
Floating Point Zone Compare
High Speed Counter Zone Compare
High speed counter table compare
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
4. Arithmetic operation instructions
Floating Point Subtraction
Floating Point Multiplication
5. Logical operation instructions
6. Special function instructions
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
Floating Point Square Root
Floating Point Natural Logarithm
Floating Point Common Logarithm
Floating Point Arc Cosine
Floating Point Arc Tangent
Rotation right With Carry
Bit Shift Right with Carry
Bit Shift Left with Carry
Shift Write [FIFO/FILO Control]
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
Shift Read [FIFO Control]
Shift Last Data Read [FILO Control]
9. Data operation instructions
Check Specified Bit Status
4-bit Linking of Word Data
4-bit Grouping of Word Data
Scaling (Coordinate by Point Data)
Scaling 2 (Coordinate by X/Y Data)
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
Deleting Data from Tables
10. String processing instruction
Floating Point to Character String
Conversion
Character String to Floating Point
Conversion
BIN to Character String Conversion
Character String to BIN Conversion
Decimal ASCII to BIN Conversion
BIN to Decimal ASCII Conversion
Hexadecimal to ASCII Conversion
ASCII to Hexadecimal Conversion
Character String Transfer
Character String Length Detection
Extracting Character String Data From the
Right
Extracting Character String Data from the
Left
Random Selection of Character Strings
Random Replacement of Character Strings
11. Program flow control instructions
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
12. I/O refresh instructions
Refresh and Filter Adjust
13. Real time clock control instructions
Hour to Second Conversion
Second to Hour Conversion
14. Pulse output/positioning control instruction
Absolute Current Value Read
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
Batch Data Positioning Mode
Variable Speed Pulse Output
Acceleration/Deceleration Setup
15. Serial communication instructions
Inverter Parameter Block Write
Inverter multiple command
16. Special block/unit control instructions
Read From a Special Function Block
Write To a Special Function Block
Read form Dedicated Analog Block
Write to Dedicated Analog Block
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
17. Extension register/extension file register control instructions
18. Other handy instructions
Batch Store of Index Register
Batch POP of Index Register
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
Incremental Drum Sequencer
Digital switch (thumbwheel input)
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
Accuracy
(Total Measuring
range)
Accuracy
(Total Measuring
range)
5. Application of analog
This section refers to the software version query, the version number is stored in
the special register D8001, if necessary, please query the value of D8001.
5.1 Analog input
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 K-type thermocouple.
5.1.1 Analog input (temperature)
Below table for software version 26210
Below table for software version 26220
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
K-type
thermocouple
(Negative temp)
T-type
thermocouple
(Negative temp)
Accuracy
(Total Measuring
range)
K-type
thermocouple
(Negative temp)
Below table for software version 26230 and above
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
T-type
thermocouple
(Negative temp)
S-type
thermocouple
(Negative temp)
J-type
thermocouple
(Negative temp)
S-type
thermocouple
(Negative temp)
The transmitter which is integrated inside PLC is one of the above table or mixed
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
PT100 register
read value
NTC10K register
read value
4~20mA register
read value
ones, it is up to customers’s need when ordering.
5.1.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.
The K-type thermocouple registers read values are shown in the following table:
A decimal points should be retained for temperature. Namely 182=18.2℃.
Other types of read values are as the following table:
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
When it is less than 3.8mA, the value is 32760, that is off line.
5.1.3 Analog input reading 2 (for software version 26220)
Thermocouple K-type (minus temperature), T-type, T-type (minus temperature)
www.coolmayplc.com

register read value are as the table below.
K-type (minus
temperature) register
read value
T-type register
read value
T-type (minus
temperature)
register read
value
AD4
(Environment
temperature)
CX3G/FX3GC PLC Programming manual
5.1.4 Analog input reading 3 (for software version 26230 and above)
Support FROM instructions or register read directly. Such as: FROM K0 K0 D400
K16 read 16 analog input, 0~10V.
The analog input of current, voltage, PT type and thermocouple type directly
reads the register: D[8030]~D[8045]. Constant scan time changed to D8059, started
www.coolmayplc.com

by M8039 (version 26232 and above).
AD4
(Environment temperature)
CX3G/FX3GC PLC Programming manual
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. 16 channels are
possible without the thermocouple type.
The value of the thermistor NTC is read in the 16 registers starting at R23660.
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
R23960 starts with a zero correction value and defaults to 0.
5.1.5 Analog input sampling
Filtering cycles=( R23600~R23615)* PLC scanning time, if R23600=1, sample
one time each scan circle and change the 1stanalog value for one time. The larger
R23600~R23615 value is, the result is more stable.
R23600~R23615 is filtering cycles, default is 0;
D8073 is smoothing filter coefficients of all analog input, range: 0~999
5.2 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.
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
When D8058.0~D8058.7=0
Means 0~20mA;
When D8058.0~D8058.7=1
Means 4~20mA。
5.3 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.
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
6. Application of high speed counter
Single phase
single counter
input
Single phase
double counter
input
AB phase
double counter
input
Assignment table of built-in high speed counter
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
U: up counter D: down counter
A: A phase input B:B phase input
R: External reset input S: External start input
Single phase: at most 6 channels, max frequency is 60KHz
AB phase: Double frequency: at most 2-3 channels, max frequency is 60KHz; M8198
is 4 times frequency
sign of C251
Quadruplicated frequency: at most 2-3 channels, max frequency is 24KHz; M8199 is
4 times
frequency sign of C253
* 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.
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
7. Application of high speed pulse
Pulse point
Function
Description
Pulse operation
monitoring
7.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).
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 (original return with DOG search) instructions.
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
accelerate /
decelerate
time
The original FX3G pulse program can be used directly.
All the instruction support 8 channels pulse, except DVIT、DSZR which support 4
channels.
7.2 Circular interpolation
The special flags when setting the interpolation route are as shown in the following
table: (26234 version has no interpolation function)
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
S. represents the pulse frequency, that is, the speed of the interpolation motion.
The direction and coordinates of the center and radius interpolation are as shown in
the following table: (26234 version has no interpolation function)
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.+2 represents the X-axis target address.
S.+4 represents 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.
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
X axis: Y0 pulse, Y4 direction
Y axis: Y1 pulse, Y5 direction
In the center interpolation mode:
S.+6 represents the center X coordinate address.
S.+8 represents the center Y coordinate address.
In radius interpolation mode:
S.+6 represents 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.
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.
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
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.
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
Mitsubishi
programming port
protocol
26232 or higher version:
power lost can not be
retentive
RS sending completion
mark
RS receiving
completion mark
Need manual reset
RS receiving process
8. Coolmay CX3G PLC Communication User Manual
CX3G PLC defaulted has a RS232 programming port, and two communication ports
( Rs232 or Rs485) can be added. Meanwhile, CANbus is also optional.
8.1 Serial port 1: RS232( PLC programming port)
Support Mitsubishi programming port protocol;Can be used to download PLC
program or communicate with devices which support MITSUBISHI programming
port protocol.
8.2 Serial port 2: RS485(A B)/RS232
Support MITSUBISHI programming port protocol,Mitsubishi BD board
protocol,RS protocol and MODBUS RTU protocol.
The special relays and registers related to this serial port are as below.
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
RS command 8/16 bits
differentiation mark
RS command CAN
master-slave mark
M8426=0 master-slave
mode, M8426=1
multi-device mode
RS command end
operation settings
RD3A\WR3A receiving
completion mark
RD3A\WR3A
communication
over-time mark
ADPRW command
completion mark
Command execution end
mark
Master-slave station
number
D8434:CAN slave station
NO
D8440\D8442
multi-device mode ID NO
RD3A/WR3A interval
period
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
M8196: the activation mark of using programming port protocol and other protocol.
(26232 or higher version is power lost not retentive.)
M8125: the activation flag of using MODBUS and the original Mitsubishi function.
M8122: RS2 command send mark (this bit needs to be set 1 when using the RS
instruction).
M8123: RS2 command receiving completion mark, needs manual reset.
M8124: RS2 command data is receiving.
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: RD3A/WR3A receiving completion mark, needs manual reset.
M8129: RD3A/WR3A communication overtime mark (this mark is ON while
communication overtime).
M8029: Communication completion flag (communication completion flag when using
ADPRW instruction, needs to be reset by hand).
D8120: The detailed communication parameter settings of saving Modbus RTU
protocol are seen as below.
D8121: Save the host or slave station number. (It must be set as max. K255 as
master)
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.
(26232 or below version)
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
1. When used as Mitsubishi programming port protocol: set M8196=0.
2. When used as MITSUBISHI free-port protocol: set M8196=1,M8125=0; the
Data length 0:7 bits 1:8bits
00: None
01: Odd
02: Even
Stop bit
0: 1 bit
1: 2 bits
BPS rate (b7,b6,b5,b4)
(0100):600bps (0101):1200bps (0110):2400bps
(0111):4800bps (1000):9600bps (1001):19200bps
(1010):38400bps (1011):57600bps (1101):115200bps
D8126: Interval period. Default as 10 times. (26232 or higher version uses this
register.)
D8397: When using the serial port 2 in the ADPRW instruction, set D8397 to 0.
(26232 and above 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.
difference between Mitsubishi protocol 1 and protocol 4 is with end mark OA OD
( stored in D8124 D8125 separately)
For the Mitsubishi protocol, the D8120 only needs to set the lower 8 bits.
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
Demo program:
Use the serial port tool by serial port 2 to monitor the data obtained is
[2017:11:01:10:49:16][receive]31 32 33
3, 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:
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.
For 26231 below version The RD3A and WR3A must be triggered with a rising edge.
For 26231 and above,it can be triggered by the normal signal.
www.coolmayplc.com

D8120 Parameter set
Data length
0:7 bit
1:8 bit
Parity
00:None
01:Odd
11:Even
Baud rate (b7b6b5b4)
0100:600bps
0101:1200bps
0110:2400bps
0111:4800bps
1000:9600bps
1001:19200bps
1010:38400bps
1011:57600bps
1100:115200bps
CX3G/FX3GC PLC Programming manual
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
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.
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:
Slave program:
Host program:
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
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:
[2017:07:05:17:41:20][receive]01 03 00 64 00 0A 84 12
[2017:07:05:17:41:20][receive]01 03 14 00 6F 00 DE 01 4D 01 BC 02 2B 02 9A 03 09
03 78 03 E7 00 00 7D 69
(This example sets the data of the slave D100-D109 to 111-999).
Write data to the slave instruction function and action description:
WR3A originally referred to the analog modules write.
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
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)
www.coolmayplc.com

Program example:
Slave program:
Master program:
CX3G/FX3GC PLC Programming manual
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:
[2017:10:31:16:47:22][receive]01 06 00 64 00 6F 88 39
[2017:10:31:16:47:22][receive]01 06 00 64 00 6F 88 39
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
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
03 function code hold register output.
Program example:
Master program:
www.coolmayplc.com

Slave program:
CX3G/FX3GC PLC Programming manual
Use the serial port tool to monitor serial port 2 for below data:
[2017:11:01:17:48:54][receive]01 03 00 00 00 06 C5 C8
[2017:11:01:17:48:54][receive]01 03 0C 00 0C 00 17 00 22 00 38 00 4E 00 63 C4 29
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
Mitsubishi
programming port
protocol
26232 or higher version:
power lost can not be
retentive
RS sending completion
mark
RS receiving
completion mark
RS receiving process
mark
RS command 8/16 bits
differentiation mark
RS command CAN
master-slave mark
M8426=0 master-slave
mode, M8426=1
multi-device mode
RS command end
operation settings
8.3 Serial port 3:RS485(A1 B1)
Support Mitsubishi programming port protocol,RS2 protocol and MODBUS RTU
protocol.
The special relays and registers related to this serial port are as below.
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
RD3A\WR3A receiving
completion mark
RD3A\WR3A
communication
over-time mark
ADPRW command
completion mark
Command execution end
mark
Master-slave station
number
D8434:CAN slave station
NO
D8440\D8442
multi-device mode ID NO
RD3A/WR3A interval
period
RD3A\WR3A end
operation -1
M8192:the activation mark of using programming port protocol and other protocol.
(26232 and higher version is power lost not retentive)
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
M8402:Send mark (use when RS2 command).
M8403:Communication completion mark (communication completion flag when using
RS command, needs manual reset).
M8404: Data is receiving.
M8408:Communication completion mak (Valid while using ADPRW command and
needs manual reset).
M8409: Communication time out.
M8029: Communication completion mark (communication completion mark while
using ADPRW instruction and needs manual reset).
M8161: 8-bit/16-bit mode distinguishing mark for RS/RS2 command (version 26230
and above, always in 8-bit mode)
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.
D8406: Interval period. Default as 12 times.
D8409: Time-out period. (Unit: ms. Better not over 100ms while setting.)
D8414: Save the master or slave station number (The value mast be set as max K255
as master).
D8126: When using the serial port 3 in the ADPRW instruction, set D8126 to 1.
(26232 or lower version)
D8397: When using the serial port 3 in the ADPRW instruction, set D8397 to 1.
(26232 and higher version)
Support RS2,WR3A,RD3A,ADPRW commands. 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.
www.coolmayplc.com

D8400 Parameter set
Data length
0:7 bit
1:8 bit
Parity
00:None
01:Odd
11:Even
Baud rate (b7b6b5b4)
0100:600bps
0101:1200bps
0110:2400bps
0111:4800bps
1000:9600bps
1001:19200bps
1010:38400bps
1011:57600bps
1101:115200bps
CX3G/FX3GC PLC Programming manual
www.coolmayplc.com

D8401 Parameter set
Select protocol
0: Other communication protocol
1: MODBUS protocol
Master/Slave setting
0: MODBUS Master
1: MODBUS Slave
CX3G/FX3GC PLC Programming manual
1. When using as Mitsubishi programming port protocol: set M8192=0.
2. When using as the RS protocol function: set M8192=1, M8402=1;
www.coolmayplc.com

Program example:
3. Used as MOdbus RTU: set M8192=1; set D8400 as communication parameters,
CX3G/FX3GC PLC Programming manual
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.
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 host, ADPRW,RD3A and WR3A is supported.
RD3A and WR3A only support the below MODBUS functions:
No. 03: Reads the retentive register and takes the current binary value range of 1-32
in one or more retentive registers.
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
No. 06: Load the specific binary value into a retentive register (write register) with a
range of one.
No. 16: Preset multiple registers, load specific binary values into a series of
consecutive retentive registers (write multiple registers),
The range is 1-32.
For 26231 below version The RD3A and WR3A must be triggered with a rising edge.
For 26231 and above,it can be triggered by the normal signal.
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.
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:
Slave program:
www.coolmayplc.com

Master program:
CX3G/FX3GC PLC Programming manual
Use the serial port tool to monitor serial port 3 for below data:
[2017:11:01:09:00:11][receive]01 03 00 64 00 0A 84 12
[2017:11:01:09:00:11][receive]01 03 14 00 42 00 4D 00 58 00 58 00 63 00 37 00 2C
00 21 00 16 00 0B 9F C7
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)
www.coolmayplc.com

Program Example
Master program
CX3G/FX3GC PLC Programming manual
Use the serial port tool to monitor serial port 3 for below data:
[2017:11:01:09:25:20][receive]01 10 00 64 00 08 10 00 0B 00 16 00 21 00 2C 00 37 00 42 00 4D 00 58
D1 6C
[2017:11:01:09:25:20][receive]01 10 00 64 00 08 10 00 0B 00 16 00 21 00 2C 00 37 00 42 00 4D 00 58
D1 6C
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.
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
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.
04 register input readout.
Program Example
Master program
www.coolmayplc.com

Slave program
CX3G/FX3GC PLC Programming manual
Use the serial port tool to monitor serial port 3 for below data:
[2017:11:01:17:38:34][receive]01 04 00 00 00 06 70 08
[2017:11:01:17:38:34][receive]01 04 0C 00 15 00 20 00 2B 00 41 00 57 00 00 5F A7
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
Input (readout dedicated)
An error occurs when accessing an unused address
Input register (readout
dedicated)
Holding register (read/write)
0x0000~0x1F3F
8.4 Modbus Communication address number
Bit device:
Word device:
www.coolmayplc.com

An error occurs when accessing an unused address
CN200~255 is a 32-bit counter
8.5 CAN communication port
26232 or higher version:
power lost can not be
retentive
RS2 sending
completion mark
RS2 receiving
completion mark
Need manual reset
RS2 receiving process
CX3G/FX3GC PLC Programming manual
Support RS2 protocol and MODBUS RTU protocol
The special relays and registers related are as below.
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
RS command 8/16 bits
differentiation mark
RS2 command CAN
master-slave mark
M8426=0 master-slave
mode, M8426=1
multi-device mode
RS2 command end
operation settings
RD3A\WR3A receiving
completion mark
RD3A\WR3A
communication
over-time mark
ADPRW command
completion mark
Command execution end
mark
Master-slave station
number
D8434:CAN slave station
NO
D8440\D8442
multi-device mode ID NO
RD3A/WR3A time-out
period
RD3A/WR3A interval
period
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
RD3A\WR3A end
operation -1
M8422: Send data and needs manual reset.
M8423: Date receiving completion.
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
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
1. Support RS2 instruction
2. Support WR3A,RD3A instruction.
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).
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
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 2. (=0: serial port 2; =1: serial port 3; =2: CAN)
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
3. Support ADPRW instruction
Switch mark between Mitsubishi
functions and MODBUS
( Set D8126=2 Corresponds to optional CAN port)
For example, CAN port program of expansion board
LD M8002 MOV H1 D8421:CAN port of this PLC is the master station
LD M8000 MOV 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.
8.6 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.
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
RD3A/WR3A command cycling
times
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 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
D8395=0:Mitsubishi function
D8395=1:MODBUS_UPD Slave
D8395=2:MODBUS_UPD Master
D8395=3:MODBUS_TCP Slave
D8395=4:MODBUS_TCP Master
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
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
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)
www.coolmayplc.com

CX3G/FX3GC PLC Programming manual
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
www.coolmayplc.com