Content
CX3G/FX3GC PLC Programming manual
1. Overview
1.1 COOLMAY CX3G PLC has the following advantages:
1.2 Models of CX3G PLC
1.3 Models of FX3GC PLC
2. Soft element
2.1 Soft element table
3. Special relay and register
3.1 Special relay number and content
3.2 Special register number and content
4. Function Instructions
5. Application of analog
5.1 Analog input
5.2 Analog output
6. Application of high speed counter
7. Application of high speed pulse
7.1 high speed pulse output
7.2 Circular interpolation
8. Coolmay CX3G PLC Communication User Manual
8.1 Serial port 1: RS232( PLC programming port)
8.2 Serial port 2: RS485(A B)/RS232
8.3 Serial port 3:RS485(A1 B1)
8.4 Modbus Communication address number
8.5 CAN communication port
8.6 Network communication
.........................................................................................................................................................
...........................................................................................................................
........................................................................................................................
....................................................................................................................................................
..................................................................................................................................
................................................................................................................................
.........................................................................................................
...................................................................................................
.....................................................................................................................................
....................................................................................................................................
........................................................................................................................................
5.1.1 Analog input (temperature)
5.1.2 Analog input reading 1 (for software version 26210 and 26220)
5.1.3 Analog input reading 2 (for software version 26220)
5.1.4 Analog input reading 3 (for software version 26230 and above)
5.1.5 Analog input sampling
5.1.6 Analog input program example:
......................................................................................................................................
....................................................................................................................
.......................................................................................................................
..........................................................................................................................
7.2.1 Continuous interpolation function
7.2.2 Continuous interpolation function
8.2.1 Mitsubishi programming port protocol
8.2.2 Free port protocol
8.2.3 Modbus RTU Protocol
8.2.4 MODBUS RTU ADPRW command
8.3.1 Mitsubishi programming protocol
8.3.2 Mitsubishi programming protocol
8.3.3 Modbus RTU protocol RD3A/WR3A command
8.3.4 MODBUS RTU ADPRW Command
8.4.1 Bit device:
8.4.2 Word device:
8.4.3 ADPRW Command function parameter
................................................................................................................................
.....................................................................................................................
............................................................................................................................
...................................................................................................................
.....................................................................................................................
......................................................................................................
.............................................................................................................
...............................................................................................
................................................................................................................
............................................................................................
............................................................................................
.......................................................................................................
.............................................................................................................
.......................................................................................
................................................................................................................
............................................................................................
............................................................................................
.......................................................................................
...........................................................................................
II
...................................................................
.........................................
...........................................................
..........................................
....................................................................................
...................................................................................
....................................................................................
.....................................................................
..................................................................................
1
1
3
4
5
5
6
6
11
15
22
22
22
24
25
25
27
27
29
30
31
31
31
31
34
37
37
37
38
39
39
43
45
48
48
49
52
53
53
54
54
55
58
1. Overview
CX3G/FX3GC PLC Programming manual
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,easily achieve PLC communication with plc and other devices.
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, regular as single phase 6 channels 60KHz or AB(Z) phase 2 channels
◆
60KHz+ 1 channel 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.
1
1.2 Models of CX3G PLC
Fixed hole installation and DIN-Rail (35mm )
MT Output: NPN MR output: NO contact
Input: Passive NPN, public terminal isolated
Relay MR/Transistor MT/Both MRT
Maximum load of transistor is 500mA;Maximum load of relay is 5A
Normally 6 single-phase 60KHz or 2 AB(Z) phases 60KHz + 1 10KHz;
Up to 8 channels. Y0-Y3 is 100KHz, Y4-Y7is 10KHz.
High-speed counting + high-speed pulse total output can not exceed 480KHz
AI:0-10V/4-20mA/0-20mA/PT100/PT1000 /NTC10K/NTC50K/NTC100K /EKJST thermcouple (support negative
temperaturetc.
AO:0-10V/0-5V/0-20mA/4-20mA or mixed ones
Two programming port(1 Mini B type USB port,faster downloading speed;1 Rs232,Interface terminal is mouse
female port with 8 holes)
The total number of COM ports is 2. The default is 2 RS485;
Or customized as 1 RS485, 1 RS232;
Or customized as a RS485, 1 CAN;
Or customized as a RS232, 1 CAN.
The total number of COM ports is 3.
The default 2 RS485;
Or customized as 1 RS485, 1 RS232;
Optional CAN.
Compatible with WORKS 2/ GX Developer 8.86
Regular models:CX3G-16MT/MR/MRT(-485/232)CX3G-22MT/MR/MRT(-8AD4DA -485/232)
CX3G-24MT/MR/MRT(-6AD4DA -485/232)CX3G-30MT/MR/MRT(-2AD2DA -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/ FX3GC PLC Programming Manual
Support interruption,linear and arc interpolated,PID and modify parameters automatically; with capacity of 32K step program, 32K
holding register while power off.
*CX3G-24M,if with 8AD,maximum digits are 10DI;
*CX3G-32M,if with 2AD/2DA,maximum digits are 16DI/14DO.
CX3G/FX3GC PLC Programming manual
3
1.3 Models of FX3GC PLC
FX3GC-16M
Communication/analog extension module
can be added
Fixed hole installation and DIN-Rail (35mm)
MT Output: NPN MR output: NO contact
Input: Passive NPN, public terminal isolated
Relay MR/Transistor MT/Both MRT
Maximum load of transistor is 500mA;Maximum load of relay is 5A
Normally 4 single-phase 60KHz+2 10KHz or 2-3 AB(Z) phases up to 60KHz;
Can be specially customized 6 single phase 100KHz or 2 AB(Z) 60KHz+1 10KHz
Up to 8 channels. Y0-Y3 is 100KHz, Y4-Y7is 10KHz. Customized 8 channels 10-100KHz;
High-speed counting + high-speed pulse total output can not exceed 480KHz
AI:0-10V/4-20mA/0-20mA/PT100/PT1000/K type thermocouple /NTC10K/NTC50K/NTC100K etc.
AO:0-10V/0-5V/0-20mA/4-20mA or mixed ones
Analog extension module can be added
Two programming port(1 Mini-B type USB port,faster downloading speed;1 Rs422,Interface terminal
is 8 holes mouse female port)
Rs485/CAN extension module can be added
Compatible with Mitsubishi WORKS 2/GX Developer8.86
Regular models: FX3GC-16/32MT/MR/MRT
FX3GC-30MT/MR/MRT(-485)
Detailed info. refer to:COOLMAY CX3G/ FX3GC PLC Programming Manual
Support interruption、linear and arc interpolated、PID and modify parameters automatically; with capacity of 32K step
program, 32K holding register while power off.
Extension module can add at most 2 RS485,1 CAN port,6AD4DA,
Or 1 RS485,1 CAN port,8AD4DA,
Or 1RS485,8AD8DA,
Or 2 RS485,1 CAN port.
CX3G/FX3GC PLC Programming manual
4
2.1 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)
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)
C246~C250
Double –phase double counter
CX3G/FX3GC PLC Programming manual
2. Soft element
5
CX3G/FX3GC PLC Programming manual
Bi-direction (32 bit)(EEPROM
hold)
Data register(32 bit when using in pair)
Extended register·extended file register
Extended register(16 bit)
23000points Maintain when power off not supported
1000points for system internal
256 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
3. Special relay and register
C224 Increase/decrease counting
action
ON:decrease
action
OFF:increase
action
C225 Increase/decrease counting
action
After RUN, Output a scan cycle
ON
C226 Increase/decrease counting
action
After RUN, Output a scan cycle
OFF
C227 Increase/decrease counting
action
Oscillating in 10ms cycle
C228 Increase/decrease counting
action
*1: The 10ms timer will be affected by the scan cycle. If the scan period is 12ms, the timer becomes 12ms and is executed once.
3.1 Special relay number and content
6
CX3G/FX3GC PLC Programming manual
Oscillating in 100ms cycle
C229 Increase/decrease counting
action
C230 Increase/decrease counting
action
Oscillating in 1min cycle
C231 Increase/decrease counting
action
C232 Increase/decrease counting
action
C233 Increase/decrease counting
action
C234 Increase/decrease counting
action
C235 Increase/decrease counting
action
ON:decrease
action
OFF:increase
action
During instruction
execution,allow interrupt
C236 Increase/decrease counting
action
Instruction execution end flag
C237 Increase/decrease counting
action
Non-retentive memory is cleared
C238 Increase/decrease counting
action
Retentive memory is cleared
C239 Increase/decrease counting
action
C240 Increase/decrease counting
action
C241 Increase/decrease counting
action
C242 Increase/decrease counting
action
C243 Increase/decrease counting
action
C244 Increase/decrease counting
action
Prohibit reset of all outputs
C245 Increase/decrease counting
action
C246 Increase/decrease counting
action
ON:decrease
action
OFF:increase
action
C247 Increase/decrease counting
action
C248 Increase/decrease counting
action
Signal alarm is effective
C249 Increase/decrease counting
action
7
CX3G/FX3GC PLC Programming manual
Input interrupt (I00 is prohibited)
C250 Increase/decrease counting
action
Input interrupt (I10 is prohibited)
C251 Increase/decrease counting
action
Input interrupt (I20 is prohibited)
C252 Increase/decrease counting
action
Input interrupt (I30 is prohibited)
C253 Increase/decrease counting
action
Input interrupt (I40 is prohibited)
C254 Increase/decrease counting
action
Input interrupt (I50 is prohibited)
C255 Increase/decrease counting
action
Timer interrupt (I6 is prohibited)
1stpulse operation monitoring
Timer interrupt (I7 is prohibited)
Timer interrupt (I8 is prohibited)
Counter interrupt is prohibited
Interpolation relative/absolute
coordinate
Interpolation counterclockwise
Y000 clear signal output function is
valid
Serial communication error 0
Y000 specify the origin return
direction
Serial communication error 1
Y000 near-point DOG signal logic
inversion
Y000 zero signal logic inversion
Y000 interrupt signal logic inversion
Y000 positioning command driver
Sample tracking preparation start
command
2ndpulse operation monitoring
Sample tracking execution start
command
Y001 clear signal output function is
valid
Sample tracking execution
Y001 specify the origin return
direction
Sample tracking execution end
control
Sampling tracking system area
Y001 near-point DOG signal logic
inversion
8
CX3G/FX3GC PLC Programming manual
RS/RS2 command sends standby
Serial Port
2
refer to
chapter
2.11
Y001 zero signal logic inversion
RS/RS2 command to send
request
Y001 interrupt signal logic inversion
M8123
RS/RS2 command reception end
Y001 positioning command driver
RS/RS2 command data in
reception
MODBUS and Mitsubishi
function enablement
3rdpulse operation monitoring
RD3A/WR3A Receive
Completed
Y002 clear signal output function is
valid
RD3A/WR3A communication
timeout
Y002 specify the origin return
direction
5thpulse operation monitoring
6thpulse operation monitoring
7thpulse operation monitoring
Y002 near-point DOG signal logic
inversion
8thpulse operation monitoring
Y002 zero signal logic inversion
Y002 interrupt signal logic inversion
Software
26234 and
higher
Y002 positioning command driver
4thpulse operation monitoring
Y003 clear signal output function is
valid
Y003 specify the origin return
direction
Y003 near-point DOG signal logic
inversion
Y003 zero signal logic inversion
Programming port protocol and
other protocol enablement
Y003 interrupt signal logic inversion
Programming port protocol and
other protocol enablement
Y003 positioning command driver
4 times frequency of C251, C252,
C254
4 times frequency of C253
C254 function corresponds to input
phase
C200 Increase/decrease counting
action
RS2 command sends standby
Serial port 3
Refer to chapter
9
C201 Increase/decrease counting
action
RS2 command to send request
C202 Increase/decrease counting
action
RS2 command reception end
C203 Increase/decrease counting
action
RS2 command data in reception
C204 Increase/decrease counting
action
RS2 command data setting ready
C205 Increase/decrease counting
action
RD3A/WR3A Receive Completed
C206 Increase/decrease counting
action
RD3A/WR3A communication
timeout
C207 Increase/decrease counting
action
RS2 command sends standby
CAN
communication
Refer to chapter
2.11.4
C208 Increase/decrease counting
action
RS2 command to send request
C209 Increase/decrease counting
action
RS2 command reception end
C210 Increase/decrease counting
action
RS2 command data in reception
C211 Increase/decrease counting
action
RS2 command data send completed
C212 Increase/decrease counting
action
RS command master-slave and
multi-machine mode
C213 Increase/decrease counting
action
CAN data standard frame and
extended frame
C214 Increase/decrease counting
action
CAN communication MODBUS
response correct
C215 Increase/decrease counting
action
C216 Increase/decrease counting
action
C217 Increase/decrease counting
action
C218 Increase/decrease counting
action
Interpolation relative/absolute
coordinate
C219 Increase/decrease counting
action
Interpolation counterclockwise
C220 Increase/decrease counting
action
C221 Increase/decrease counting
action
CX3G/FX3GC PLC Programming manual
10
CX3G/FX3GC PLC Programming manual
Y0 deviation speed
Initial value:0
1stpulse maximum speed
Low
Y0 crawling speed
Initial value: 1000
Y0 Origin return speed
Initial value:50000
1stpulse acceleration time
1stpulse deceleration time
2ndposition pulse amount
Low
Y1 deviation speed
Initial value:0
2ndpulse maximum speed
Low
Y1 crawling speed
Initial value: 1000
Y1 Origin return speed
Initial value:50000
2ndpulse acceleration time
When DA is current,Bit setting
2ndpulse deceleration time
3rdposition pulse amount
Low
X0 Rising edge ring counter value
[1/6μs unit]
Low
Y2 deviation speed
Initial value:0
X0 falling edge ring counter value
[1/6μs unit]
3rdpulse maximum speed
Low
X0 pulse width / pulse period
[10μs unit]
Y2 crawling speed
Initial value: 1000
Y2 Origin return speed
Initial value:50000
X1 Rising edge ring counter value
[1/6μs unit]
3rdpulse acceleration time
X1 falling edge ring counter value
[1/6μs unit]
3rdpulse deceleration time
4thposition pulse amount
Low
X1 pulse width / pulse period
[10μs unit]
Low
Y3 deviation speed
Initial value:0
X3 Rising edge ring counter value
[1/6μs unit]
4thpulse maximum speed
Low
X3 falling edge ring counter value
12
CX3G/FX3GC PLC Programming manual
Y3 Origin return speed
Initial value:50000
X3 pulse width / pulse period
[10μs unit]
4thpulse acceleration time
X4 Rising edge ring counter value
[1/6μs unit]
Low
4thpulse deceleration time
X4 falling edge ring counter value
[1/6μs unit]
ADPRW command serial port
position
0~2147483647(1ms) Ring
count for incremental actions
X4 pulse width / pulse period
[10μs unit]
Low
Modbus RTU protocol
Communication parameters
Serial port3
Refer to
chapter 2.11.2
PLC type and system version
Number of special modules
connected
Y number of output refresh error
RS2 header 1, 2 <initial value:
STX>
Modbus RTU protocol
Communication parameters
Serial port2
Refer to chapter
2.11
Master and slave station number
RS2 trailer 1, 2 <initial value:
ETX>
RS command to send data remaining
points
RS command to receive points
monitoring
Master and slave station number
RS header <initial value: STX>
RS2 receives the summation
calculation result
RS trailer <initial value: ETX>
When the serial port 2 uses the
ADPRW command, the value is 0.
CAN
communication
Refer to
chapter 2.11.4
Serial port 2 interval period number
Specify the starting number of the
communication request of the lower
computer
Serial port2
Refer to chapter
2.11
D8426
Specify the number of data
requested by the lower computer
communication
13
CX3G/FX3GC PLC Programming manual
RS2 header 1, 2 <initial value:
STX>
RS2 trailer 1, 2 <initial value:
ETX>
RS2 receives the summation
receive data
7thposition pulse amount
Low
RS2 receives the summation
calculation result
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,M8130~M8159,M8161~M8169,M8178~M8191,
M8256~M8339,M8370~M8395,M8430~M8511.
Note:26234 and later version support M8161.
※ 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》
14
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
Parallel Run (Octal Mode)
2. Data conversion instructions
Conversion to Binary Coded Decimal
4. Function Instructions
Applied instructions【Sequence is according to instruct variety
(Contrast with MITSUBISHI)
Applied instruction can be divided into the following 18 kinds.
】
15
CX3G/FX3GC PLC Programming manual
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)
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
16