COOLMAY EX3G PLC/HMI All in one Programming manual
COOLMAY
EX3G PLC/HMI All in one
Programming manual
(plc part: Difference comparing with Mitsubishi FX3G)
All right belongs to Shenzhen Coolmay Technology Co.,Ltd
V8.112
Content
COOLMAY EX3G PLC/HMI All in one Programming manual
1. Overview
1.1 EX3G PLC/HMI Allin one Main Advantage:
1.2 Specification
1.3 Hardware description
2. PLC
2.1 PLC Programming notice
2.2 Soft element table
2.3 Special relay number and content
2.4 Special register number and content
2.5 Applied instructions【Sequence is according to instruct variety
2.6 Analog input
2.7 Analog output
2.8 PID instruction
2.9.Application of high speed counter
2.10.Application of high speed pulse
2.11 PLC Communication port User Manual
2.12 Network communication
2.13 Difference between EX3G and EX2N PLC/HMI All in one
3. HMI
3.1 HMI program software user introduction
3.2 HMI Display download
.........................................................................................................................................................
......................................................................................
..........................................................................................................................................
............................................................................................................................
1.3.1 EX3G-43HA/HB structure description and dimension
1.3.2 EX3G-43(50)KH structure description and dimension
1.3.3 EX3G-70KH structure description and dimension
1.3.4 EX3G-100HA structure description and dimension
1.3.5 Introduction of each interface and indicator
.................................................................................................................................................................
......................................................................................................................
..................................................................................................................................
.......................................................................................................
...................................................................................................
........................................................................................................................................
2.6.1 Analog input (temperature)
2.6.2 Analog input reading 1 (for software version 26210 and 26220)
2.6.3 Analog input reading 2 (for Main software version 26220)
2.6.4 Analog input reading 3 (for Main software version 26230 and above)
2.6.5 Analog input sampling
2.6.6 Demo example
......................................................................................................................................
2.10.1 high speed pulse output
2.10.2 Circular interpolation
2.10.3 Continuous interpolation function
2.11.1 Serial port 2: RS485(A B)/RS232
2.11.2 Serial port 3:RS485 (A1 B1)/RS232
2.11.3 Modbus Communication address number
...............................................................................................................................................................
3.1.1HMI Program software installation
3.1.2 New build HMI program
3.2.1 Online download step (USB download line download)
3.2.2 U disk download step (43HB series don’t support)
.........................................................................................................................
....................................................................................................................................
...................................................................................................................
.......................................................................................................................
......................................................................................................
.............................................................................................................
......................................................................................................
........................................................................................................
..........................................................................................................
.............................................................................................................
..........................................................................................
...........................................................................................
..........................................................................................
...........................................................................................
...........................................................................................
..........................................................................................................
..............................................................................
......................................................................................
..............................................................................
..............................................................
..............................................................
....................................................................
..................................................................
...................................................
】
.........................................
.................................................
................................
............................................................
...........................................................
.................................................................
1
1
2
3
3
4
5
6
7
8
8
8
10
13
17
24
24
26
27
27
28
29
30
30
30
31
31
32
34
37
37
44
51
55
57
61
61
61
61
62
62
65
COOLMAY EX3G PLC/HMI All in one Programming manual
3.3 Introduction when HMI is with com port for MODBUS RTU protocol
3.3.1 HMI as master
3.3.2 HMI as slave
3.4 Other HMI usage.
..........................................................................................................................
............................................................................................................................
................................................................................................................................
............................................
66
66
68
69
COOLMAY EX3G PLC/HMI All in one Programming manual
1. Overview
1.1 EX3G PLC/HMI Allin one Main Advantage:
◆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.
◆Default With one HMI Downloading port, two PLC programming ports: one MiniB USB port with faster
downloading speed; one Rs232 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.
◆EX3G-70KH/100HA,PLC is optional to add 1 rs485 or 2rs485(one of rs485 is changed from default
rs232)/CAN/ethernet (which can’t exist to hmi ethernet port)/WIFI(which will occupy default rs232port);
HMI is optional to add 1RS232 or RS485/ethernet (which can’t exist to plc ethernet port);
43HB(HA)/43(50)KH(A) PLC is optional to add 2 RS485;HMI is optional to add 1 RS232,used for external
hmi and inverters.
◆High speed counter.regularly single phase 6 channels 60KHz/ AB(Z) Phase 2 channels 60KHz + 1 channel
10KHz. EX3G-43HB regularly single phase 8 10KHz;
◆High speed pulse, regular as 8 channels Y0-Y3 in 100KHz,Y4-Y7 in 10KHz
Note: High speed counter+High speed pulse should be less 480KHz.
◆Support multiple types analog individually or mixed ones for analog output and input.
EX3G-70KH/100HA is up to 16AD/8DA,EX3G-43HB(HA)/43(50)KH is up to 4AD/2DA.Precision of
AD/DA is 12bit.Temperature/current/voltage for input. current/voltage for output.
◆EX3G-70KH/100HA is up to 30DI/30DO(MR:28 at most),DO is optional to choose
MR(max:5A)/MT(max:500mA)or mixed MRT;EX3G-43HB(HA)/43(50)KH is up to 12DI/12DO,DO is
optional to choose MR(max:5A)/MT(max:2A).
◆Convenient for wiring, adopting 3.81mm pluggable terminals.
◆Easy installation. DIN-Rail (35mm width) installation and fixed hole installation.
◆32K steps program capacity, 32k registers of hold on when power off, support interrupt,linear&circular
interpolation,PID and self-tuning,high powerful.
◆Flexible, can be customized accordingly.
1.2 Specification
Support Interrupt,linear arc interpolation,PID auto-tuning,32k program capacity, 32k retentive register
43KH:480*272
50KH:800*480
1 TP download port,1 USB 2.0 port
1 RS485 or RS232 optional
Can’t coexist with PLC ethernet port
CoolMayHMI V5.**(newest vesion pls see Http://coolmay.net)
Up to 30DI/30DO(At most 28 relay outputs)
MT Output: NPN MR output: NO contact Input: Passive NPN, public terminal isolated
MR/MOS
Maximum load: MOS is 2A; MR is 5A
MR/MT/MRT
Maximum load: MT is 500mA; MR is 5A
Single phase 6channel
10KHz or AB(Z) 3
channel 10KHz
Normally 6 single phase 60KHz Or 2channel ABl(Z) phase 60KHz+1 channel 10KHz;
8channels,Y0-Y3 is 100KHz,Y4-Y7 is 10KHz
;
Note: High speed counter+High speed pulse should be less 480KHz.
Analog input type is EKSTJ type thermocouple (supports
negative temperature) / PT100 / PT1000 / NTC10K /
NTC50K / NTC100K / 0 ~ 10V/0~5V/0~20mA/4~20mA
or mix type and other special specifications
Analog input type is EKSTJ type thermocouple (supports
negative temperature) / PT100 / PT1000 / NTC10K /
NTC50K / NTC100K / -5V ~ 5V / -10V ~ 10V / 0 ~
10V/0~5V/0~20mA/4~20mA or mix type and other
special specifications
AO: 0-10V/0-5V/0-20mA/4-20mA or mixed
2 programming ports(1 MiniB type USB port,faster downloading speed;1 Rs232 port
)
1 rs485 or 2rs485(one of rs485 is changed from default
rs232)/CAN(2.0A/B)/ethernet (which can’t exist to hmi
ethernet port)/WIFI(which will occupy default rs232port)
optional
Compatible with Mitsubishi GX Developer8.86 and WORKS 2
Regular models:EX3G-43HB/43KH/50KH-16MR/24MR/24MT(-4AD2DA-485P/232H)
EX3G-70KH100HA-16MR/24MR/44MT/44MRT(-16AD8DA-485P/232H)
*EX3G-70HA/100HA: If with 30DI/30DO,the maximum analogs are 5AD/2DA;If with 24DI/20DO,the maximum analogs are
16AD/8DA; Detailed info.refer to:《Coolmay HMI/PLC All-in-on Programming Manual》 《HMI/PLC All-in-one User Manual》
《
CoolMay HMI User Manual
》 《
EX3G PLC/HMI Programming Manual
》 《
EX3G PLC/HMI User Manual
》
COOLMAY EX3G PLC/HMI All in one Programming manual
1.3 Hardware description
1.3.1 EX3G-43HA/HB structure description and dimension
PLC Run light Com port of plc and hmi Power light
COOLMAY EX3G PLC/HMI All in one Programming manual
* Dimension(mm):134*102*30
* Cutout size(mm): 119*93
* Installation: Clip installation
* Display size(mm): 97*56
COOLMAY EX3G PLC/HMI All in one Programming manual
1.3.2 EX3G-43(50)KH structure description and dimension
PLC Run light Com port of plc and hmi Power light
* Dimension(mm):150*93*32
* Cutout size(mm):143*86
* Installation: Clip installation
* Display size(mm): EX3G-43KH:97*56
EX3G-50KH:108*65
COOLMAY EX3G PLC/HMI All in one Programming manual
1.3.3 EX3G-70KH structure description and dimension
PLC Run light Com port of plc and hmi Power light
* Dimension(mm):226*163*35.6
* Cutout size(mm): 218*153
* Installation: Clip installation
* Display size(mm): 154*87
COOLMAY EX3G PLC/HMI All in one Programming manual
1.3.4 EX3G-100HA structure description and dimension
PLC Run light Com port of plc and hmi Power light
* Dimension(mm):275*194*36
* Cutout size(mm): 261*180
* Installation: Clip installation
* Display size(mm): 222*133
COOLMAY EX3G PLC/HMI All in one Programming manual
1.3.5 Introduction of each interface and indicator
POWER: Power indicator, connected to the power light
RUN: PLC running status indicator. This light is on when the PLC is running.
COM: touch screen and PLC communication status indicator, when the two communicate, the light is on
Power terminal: The positive and negative terminals of the DC24V switching power supply are respectively
connected to the DC24V and 0V of the power supply terminal.
PLC programming port: two PLC programming ports (MiniB type usb port / RS232), PLC program can be
downloaded through 232 programming line or USB cable download
Touch screen programming port: download touch screen configuration program
USB interface: mainly can be directly inserted into the U disk of the file system FAT 32, can also be inserted
into the mouse.
For other hardware information, refer to "EX3G Series HMI/PLC All-in-One User Manual"
COOLMAY EX3G PLC/HMI All in one Programming manual
2. PLC
Soft element number is octal
Total 80points for I/O
Initial state (EEPROM hold)
2.1 PLC Programming notice
The PLC is compatible with GX 8.86/Works 2 and below. If you use other versions of the software,
incompatibility may occur.
When the PLC program is downloaded, there is a prompt error: Cannot specify the com port,
GX 8.86 software: Online - Transfer settings change com port;
Works 2: All targets - Change the com port in all connected targets;
If communication error occurs, cable is abnormal If prompted, remove it by powering off, detecting the cable,
detecting whether the power is normal, or replacing the computer.
In the Works 2 software version, choose the figure : (Note: the label is forbidden)
2.2 Soft element table
COOLMAY EX3G PLC/HMI All in one Programming manual
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)
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)
R0~R22999
23000points Maintain when power off not supported
1000points for system internal
256 points
1281 points(26232 and above)
CJ instruct、CALL instruct
Input interrupt
COOLMAY EX3G PLC/HMI All in one Programming manual
-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
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
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
M8029
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
Input interrupt (I00 is prohibited)
C250 Increase/decrease counting action
Input interrupt (I10 is prohibited)
C251 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.
2.3 Special relay number and content
COOLMAY EX3G PLC/HMI All in one Programming manual
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
M8077
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
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
RS/RS2 command reception end
Y001 positioning command driver
RS/RS2 command data in reception
MODBUS and Mitsubishi function
enablement
3rdpulse operation monitoring
M8128
RD3A/WR3A Receive Completed
Y002 clear signal output function is valid
RD3A/WR3A communication
timeout
Y002 specify the origin return direction
M8151
5thpulse operation monitoring
COOLMAY EX3G PLC/HMI All in one Programming manual
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
ON:decreas
e action
OFF:increas
e action
RS2 command sends standby
Serial port 3
Refer to chapter
2.11.2
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
C208 Increase/decrease counting
RS2 command to send request
COOLMAY EX3G PLC/HMI All in one Programming manual
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
C222 Increase/decrease counting
action
C223 Increase/decrease counting
action
5th- 8thpulse acceleration and
deceleration time
PLC type and system version
2...2K steps
;
4...4K steps
;
2.4 Special register number and content
COOLMAY EX3G PLC/HMI All in one Programming manual
8...8K steps
;
When 16K steps
and above,
D8002=8,D8102 is
corresponded to
16,32,64
10H:Programmable
controller built-in
memory
Input filter adjustment (0-60ms) initial
10
Z6 Register contents
D8030
1stposition pulse amount
Low
Y0 deviation speed
Initial value:0
1stpulse maximum speed
Low
Y0 crawling speed
Initial value: 1000
5th-8thpulse maximum speed
Low
1stpulse acceleration time
1stpulse deceleration time
2ndposition pulse amount
Low
Y1 deviation speed
Initial value:0
COOLMAY EX3G PLC/HMI All in one Programming manual
Y1 crawling speed
Initial value: 1000
Y1 Origin return speed
Initial value:50000
2ndpulse acceleration time
2ndpulse deceleration time
3rdposition pulse amount
Low
When DA is current,Bit setting
Y2 deviation speed
Initial value:0
X0 Rising edge ring counter value
[1/6μs unit]
3rdpulse maximum speed
Low
X0 falling edge ring counter value
[1/6μs unit]
Y2 crawling speed
Initial value: 1000
Y2 Origin return speed
Initial value:50000
X0 pulse width / pulse period
[10μs unit]
3rdpulse acceleration time
X1 Rising edge ring counter value
[1/6μs unit]
3rdpulse deceleration time
4thposition pulse amount
Low
X1 falling edge ring counter value
[1/6μs unit]
Low
Y3 deviation speed
Initial value:0
X1 pulse width / pulse period
[10μs unit]
4thpulse maximum speed
Low
X3 Rising edge ring counter value
[1/6μs unit]
Y3 crawling speed
Initial value:1000
Y3 Origin return speed
Initial value:50000
X3 falling edge ring counter value
[1/6μs unit]
4thpulse acceleration time
X3 pulse width / pulse period
[10μs unit]
4thpulse deceleration time
X4 Rising edge ring counter value
[1/6μs unit]
ADPRW command serial port
position
Refer to chapter 2.11.1
D8093
0~2147483647(1ms) Ring count for
incremental actions
X4 falling edge ring counter value
[1/6μs unit]
Low
Modbus RTU protocol
Communication parameters
Serial port3
Refer to chapter 2.11.2
X4 pulse width / pulse period
[10μs unit]
PLC type and system version
COOLMAY EX3G PLC/HMI All in one Programming manual
RS2 header 1, 2 <initial value: STX>
Number of special modules connected
Y number of output refresh error
RS2 trailer 1, 2 <initial value: ETX>
Modbus RTU protocol Communication
parameters
Serial port2
Refer to chapter
2.11
Master and slave station number
Master and slave station number
RS command to send data remaining
points
RS2 receives the summation
calculation result
RS command to receive points
monitoring
RS header <initial value: STX>
CAN communication
Refer to chapter 2.11.4
RS trailer <initial value: ETX>
When the serial port 2 uses the ADPRW
command, the value is 0.
Number of intervals
D8126
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
D8430
RS2 header 1, 2 <initial value: STX>
D8128
Specify the number of data requested
by the lower computer communication
RS2 trailer 1, 2 <initial value: ETX>
RS2 receives the summation
receive data
6thposition pulse amount
Low
RS2 receives the summation
calculation result
7thposition pulse amount
Low
Special relay and register not supported
※ Special relay not supported
M8004~M8010,
M8015~M8019,
M8024~M8027,
M8030,
M8038~M8039,
M8040~M8044,
M8060~M8074,
COOLMAY EX3G PLC/HMI All in one Programming manual
Data conversion instructions
Arithmetic operation instructions
Logical operation instructions
Special function 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
M8084~M8119
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
》
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
1. Data move instructions
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)
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)
COOLMAY EX3G PLC/HMI All in one Programming manual
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
4. Arithmetic operation instructions
Floating Point Subtraction
Floating Point Multiplication
5. Logical operation instructions