◆ Could use GX Developer and GX Works2 software to program,read,download,
verify, diagnose,monitor and process sequence.
◆ Could customize 12 channels AD and 2 channels DA,in 12bit precision,use RD3A
to read AD data and WRA3 to output DA data (can set upper and lower limit ranges.)
◆ Support optional one RS485 or RS232 COM Port,support Programming port
protocol and MODBUS-RTU master-slave protocol.It can be switched in the program
through D8120,support communication through RS485 networking and inverter etc.
◆ Support RTC function,when password is 12345678,the programming software
can't modify clock data.
◆ High Speed counter input conventional 6 channels single-phase counting (X0-X5)
or 2 channels AB phase counting (X0-X1/X3-X4)10KHz, it can be customized 6
channels single-phase counting at most (4 channels 60KHz,2channels 60KHz).
◆ High speed pulse output conventional 4 channels 20KHz Y0/Y1/Y2/Y3, it can be
customized 4 channels Y0/Y1 200KHz,Y2/Y3 100KHz.
◆ Support Watch dogs function-compatible with Mitsubishi FX2N.
◆ Support external interrupt function-compatible with the original,support pulse
capture function,support 6 channels X0-X5.
◆ Support super password: When password is 12345678,the program can't read
except the device data. When password is changed,the program will be cleaned. You
can also open the PLC program to disable the read mode on setup software (Once
open, no matter what the password is,the program can't be read.)
◆ Support Power-down data protection (All power-down is Kept by FLASH,data
will be checked when power-on.)
◆ Check the downloaded ladder program
◆ When the program run in the PLC,it will check the program instructions and the
components range,corresponding problem will be reported when being detected.
◆ Run light flashes when switch turns to "RUN", run light goes out when to "STOP".
◆ During running. If check slight fault,the ERR light flashes. If serious fault,ERR
light is on always.
◆ Support constant scan mode: D8039-Constant scan time,M8039-Constant scan
mode.
◆ Support CAN networking communication function. Support 32 slaves at
most,master-slaves share 32 registers at most,communication baud rate could be set.
◆ Optional High speed pulse output function, PWM support the highest frequency
900KHz,duty ratio is -100%.
◆ Support function of thermocouple temperature measuring: automatic cold junction
compensation,could connect 2 channels K/E/J thermocouple at most,could measure
negative temperature.
◆ Support function of program limit : could select clock date limit,power-up
MX2N series HMI PLC all in one programming manual
4
Type
MX2N-43HB
MX2N-70HB
Image
Dimension
134*102*30mm
212*148*40mm
Cutout size
120*94mm
194*138mm
HMI
Features
60K colors resistive panel
Display size
97*56mm
154*87mm
Resolution
(pixels)
480*272
800*480
RAM
32MB
64MB
ROM
128MB
Operation
system
NULL
CPU
ARM9 216MHz
ARM9 288MHz
COM port
1 TP download port,1 USB port
1 RS232 /1 RS485 optional
Software
CoolMayHMI V5.**(newest vesion pls see HTTP://coolmay.net)
PLC
cumulative time limit.
◆ Support function of NTC thermistor to measure temperature,support NTC of
10K,50K,B value of 3950.
◆ Support optional digital tube display function, support 24keys input,10 common
positive digital display,you can choose dingle and double bits display,or whether to
decode the display.
◆ MX2N-70HB is optional to add 1 channel load cell function (occupy AD0-AD2).
1.2 Type & Specification
MX2N series HMI PLC all in one programming manual
5
Digital I/O
12DI/12DO
24DI/20DO
I/O level
NPN,COM
Output type
MT(MOS) : 2A at most/ MR (Relay): 5A at most
High speed
Counting
Normally 6 single phase counting (X0-X5) or 2 AB phase counting
(
X0-X1/X3-X4)10KHz
High speed
Counting
At most 6 single counting can be customized (4 60KHz、2 10KHz)
or 2 AB phase counting( 2 60KHz)
High speed
Pulse
Normally 4 channels 20KHz,Y0-Y3
2 channels 200KHz and 2 channels 100KHz can be customized
Analog I/O
AI: 0-5V/0-10V/0-20mA/NTC10K/NTC50K/EKJ
Note: NTC type needs to occupy AD4 as a common terminal;
optional EKJ thermocouple has only 2 channels, which occupies
AD4~AD7; (NTC type and thermocouple type cannot coexist)
AO:0-10V/0-5V/0-20mA or mixed
Optional voltage and current could be done 4 channels at most.
485P= PLC to add 485;485H/232H= HMI to add 485/232
Detailed info. refer to:<Coolmay MX2N Series PLC Programming Manual>
<HMI PLC All In One User Manual> <Coolmay HMI User Manual>
MX2N series HMI PLC all in one programming manual
6
1.3 Hardware description
1.3.1 MX2N-43HB structure description and dimension
POWER:Power indicator, light on when connected to power
RUN:PLC operating status indicator, the lamp is on when PLC is running
COM:Touch screen and PLC communication status indicator, light on when
communicated
Power terminal: The positive and negative poles of the DC24V switching power
supply are connected to the DC24V and 0V power terminals.
PLC programming port: download by 232 programming line
HMI programming port: Download touch screen configuration program
MX2N series HMI PLC all in one programming manual
9
Input X
X0~X47 40 points
Out put Y
Y0~Y47 40 points
Ministrant
relay M
M0~M38
3 384
points
(general)
M384~M1535 1052 points
(keep)
M8000~M8255 255
points (special)
State relay
S
S0~S9 10 points
(State keep)
S10~S999 990 points (keep)
Timer T
T0~T199
200 points
100ms
T200~T254
46 points
10ms
T246~T249
4points 1ms
accumulation
T250~T255 6points
100ms accumulation
Counter C
16 Bits counter
32 Bits counter
C0~C15
16 points
(general)
C16~C199
184
points (keep)
C200~C219
20 points
(general)
C220~C23
4 15points
(keep)
C235~C255
20points
(HS keep)
R D.V.Z
D0~D127
128 points
(general)
D128~D7999
7872
points (keep)
D8000~D819
5
196 points
(special,keep)
D8196~D8
255
59points
(special)
V0~V7
Z0~Z7
16points
(index)
Nested
Pointer
N0~N7 8
points
(master)
P0~P127 128 points
(jump,subroutine)
IO 口口~I5 口口 6
points (External interrupt)
Constant
K(10
digits)
16 bits-32768~32767
32bits-2147483648~2147
483647
H(16
digits
16 bits O~FFFF
32 bits 0~FFFFFFFF
2 Component Range
MX2N series HMI PLC all in one programming manual
10
Mnemonics
Function
Available soft
Elements
Program Step
LD
NO Logic operation begin
X,Y,M,S,T,C
1
LDI
NC Logic operation begin
X,Y,M,S,T,C
1
LDP
Rising Edge detection operation
begin
X,Y,M,S,T,C
2
LDF
Falling Edge detection operation
begin
X,Y,M,S,T,C
2
AND
NO series connection
X,Y,M,S,T,C
1
ANI
NC series connection
X,Y,M,S,T,C
1
ANDP
Rising edge detects series
connection
X,Y,M,S,T,C
2
ANDF
Falling edge detects series
connection
X,Y,M,S,T,C
2
OR
NO parallel connection
X,Y,M,S,T,C
1
ORI
NC parallel connection
X,Y,M,S,T,C
1
ORP
Rising edge detects parallel
connection
X,Y,M,S,T,C
2
ORF
Falling edge detects parallel
connection
X,Y,M,S,T,C
2
ANB
Series connection of parallel
circuit blocks
1
ORB
Parallel connection of series
circuit blocks
1
OUT
Coils drive
Y,M,S,T,C
Note 1
SET
Action holding
Y,M,S
Note 2
RST
Clear "Action holding",Register
to clear zero
Y,M,S,T,C,D,
V,Z
MC
Connection command of common
series point
Y,M(Exclude
Special M)
3
MCR
Eliminate command of common
series points
2
MPS
Operation memory
1
3 PLC Supported instruction
3.1 Basic Logic instructions
●The program step for soft element Y and general M is 1,for S and special auxiliary
relay M,timer T,counter C is 2,for Data register D ,index register V and Z is 3.
3.2 Step command instructions
MX2N series HMI PLC all in one programming manual
11
MRD
Memory read
1
MPP
Memory read and reset
1
INV
Inversion of operation result
1
PLS
Rising edge differential output
Y,M(Exclude
Special M)
1
PLF
Falling edge differential output
Y,M(Exclude
Special M)
1
OUT
Counter coils drive
C
32-bit counter:5
16- bit counter:3
SET
Action holding
Y,M,S
Y,M:1
S,Special -M:2
RST
Clear "Action holding",Current
value and
Register to zero
Y,M,S,T,C,D,
V,Z
Y,M:1
S,Special -M:2
T,C:2
D,V,Z Special
D:3
NOP
No action
1
END
Input,Output and Return to begin
1
Mnemonics
Function
Available soft
Elements
Program Step
SEL
Step Action begin
S
1
RET
Step Action end
/
1
Sorts
FN
C
instruction
mnemonics
Function
Support
command
NO
programming flowchart
00CJConditional jump
★
01
CALL
Subroutine call
★
02
SRET
Subroutine return
★
03
IRET
Interrupt return
★
04EIInterrupt the license
★
05DIInterruption forbidden
★
06
FEND
Main program end
★
07
WDT
Monitor timer
★
08
FOR
Cycle range begin
★
●STL(Support 8 branches at most)RET
3.3 Function instruction table( Compared with Mitsubishi PLC)
MX2N series HMI PLC all in one programming manual
12
09
NEXT
Cycle range end
★
Transmission and
comparison
10
CMP
Comparison
★
11
ZCP
Region comparison
★
12
MOV
Transfer
★
13
SMOV
Shift Transfer
★
14
CML
Reverse transfer
★
15
BMOV
Transfer together
★
16
FMOV
Multi-casting
★
17
XCH
Exchange
★
18
BCD
BCD exchange
★
19
BIN
BIN exchange
★
Four logical operations
20
ADD
BIN addition
★
21
SUB
BIN subtraction
★
22
MUL
BIN multiplication
★
23
DIV
BIN division
★
24
INC
BIN plus 1
★
25
DEC
BIN minus 1
★
26
WAND
Logic word and
★
27
WOR
Logic word or
★
28
WXOR
Logic word XOR
★
29
NEG
Complementary code
★
Cyclic shift
30
ROR
Rotate right
★
31
ROL
Rotate left
★
32
RCR
Carry rotate right
★
33
RCL
Carry rotate left
★
34
SFTR
Shift right
★
35
SFTL
Shift left
★
36
WSFR
Word move to right
★
37
WSFL
Word move to left
★
38
SFWR
Shift write
★
39
SFRD
Shift read out
★
Data processing
40
ZRST
Batch reset
★
41
DECO
Ze code
★
42
ENCO
Coding
★
43
SUM
ON digits
★
44
BON
ON digits determination
★
45
MEAN
Average value
★
46
ANS
Signal alarm set
★
47
ANR
Signal alarm reset
★
48
SQR
BIN extraction of a root
★
49
FLT
BIN Integer→floating conversion
★
MX2N series HMI PLC all in one programming manual
13
High-speed processing
50
REF
Input and output refresh
★
51
REFF
Input refresh (with filter settings
52
MTR
Matrix input
53
HSCS
Compare High speed counting set
54
HSCR
Compare High speed counting reset
55
HSZ
Compare high speed counting zone
56
SPD
Pulse density
★
57
PLSY
Pulse output
★
58
PWM
Pulse modulation
★
59
PLSR
Acceleration and deceleration pulse
output
★
Convenient instructions
60
IST
Initialization state
61
SER
Data retrieval
★
62
ABSD
Cam control (absolute)
63
INCD
Cam control (increment)
64
TTMR
Teaching timer
65
STMR
Special timer
66
ALT
Alternate output
★
67
RAMP
Ramp signal
★
68
ROTC
Rotary table control
69
SORT
Data arrangement
Peripheral equipment I/O
70
TKY
Numeric key input
71
HKY
16-key input
72
DSW
Digital switch
73
SEGD
7-segment decoding
★
74
SEGL
7 segment code time display
75
ARWS
Arrow switch
76
ASC
ASCⅡtransformation
77PRASCⅡprintout
78
FROM
BFM readout
**2
79TOBFM write
**2
Peripheral equipment
SER
80RSSerial data transmission
★
81
PRUN
8-bit transmission
82
ASCI
HEX to ASC
Ⅱ
★
83
HEX
ASC-HEX exchange
★
84
CCD
Check code
★
85
VRRD
Potentiometer readout
86
VRSC
Potentiometer scale
87
88
PID
PID operation
89
MX2N series HMI PLC all in one programming manual
14
Floating points
110
DECMP
Binary floating point comparison
★
111
DEZCP
Binary floating point zone comparison
★
118
DEBCD
Binary floating point-decimal
★
119
DEBIN
Decimal floating point-binary
★
120
DEADD
Binary floating point addition
★
121
DESUB
Binary floating point subtraction
★
122
DEMUL
Binary floating point multiplication
★
123
DEDIV
Binary floating point division
★
127
DESQR
Binary floating point extraction
★
129
INT
Binary floating-bin integer conversion
★
130
SIN
Floating point SIN operation
★
131
COS
Floating point COS operation
★
132
TAN
Floating point TAN operation
★
147
SWAP
Up and down byte conversion
★
Positioning
155
ABS
ABS current value
156
ZRN
Origin regression
★
157
PLSV
Variable speed pulse output
★
158
DRVI
Relative positioning
★
159
DRVA
Absolute positioning
★
Clock operation
160
TCMP
Clock data comparison
★
161
TZCP
Clock data zone comparison
★
★
162
TADD
Clock data addition
★
163
TSUB
Clock data subtraction
★
166
TRD
Clock data readout
★
167
TWR
Clock data write
★
169
HOUR
Calculagraph
★
Peripheral
equipment
170
GRY
Gray code transformation
★
171
GBIN
Gray code inverse transformation
★
176
RD3A
Analog block readout
**1
17
WR3A
Analog Block Write
**1
Contact comparison
224
LD=
(Sl)=(S2)
★
225
LD﹥(Sl)>(S2)
★
226
LD﹤(Sl)<(S2)
★
228
LD◇
(Sl)◇(S2)
★
229
LD≥
(Sl)≥(S2)
★
230
LD≤
(Sl)≤(S2)
★
232
AND=
(Sl)=(S2)
★
233
AND
﹥
(Sl)>(S2)
★
MX2N series HMI PLC all in one programming manual
15
234
AND﹤
(Sl)<(S2)
★
236
AND◇
(Sl)◇(S2)
★
237
AND≥
(Sl)≥(S2)
★
238
AND≤
(Sl)≤(S2)
★
240
OR=
(Sl)=(S2)
★
241
OR﹥
(Sl)>(S2)
★
242
OR﹤
(Sl)<(S2)
★
244
OR◇
(Sl)◇(S2)
★
245
OR≥
(Sl)≥(S2)
★
246
OR≤
(Sl)≤(S2)
★
Note :
**1--When set analog input and output,read wrote data;
**2--Optional RS485/RS232 is used for
MODBUS-RTU master function,to read/write slave data.
Remarks :
1)Support 32-bit instructions,and P instructions;
2)When unsupported instruction is used,6056 fault will be detected;
3)“★”indicates the function instructions supported by MX2N series PLC;
4)Instruction details refer to《FX series PLC Programming manual》
No
Content
No
Content
M8000
Operation monitoring contact
M8081-
M8104
24 Keys input
M8001
Operation monitoring
anti-contact
M8112
M8002
Initialize pulse contact
M8113
M8003
Initialize pulse anti-contact
M8114
M8004
Error indication contact
M8115
Thermocouple open circuit
fault
M8005
Random number generate relay
M8116
M8006
Prohibit 6300-6399 fault flash
"ERR"
M8117
M8008
Power-failure detection(0N
/OFF)
M8118
Special use
M8011
10ms clock pulse
M8235
Drive high speed count
C235 :Down counting mode
M8012
100ms clock pulse
M8121~
M8124
RS and MODBUS use
M8013
1s clock pulse
M8129
Series 2 communication
3.4 Special relay & register function
MX2N series HMI PLC all in one programming manual
16
timeout flag
M8014
1m clock pulse
M8140
ZRN Instruction clear output is
valid
M8015
Set clock
M8145
Prohibit Y0 pulse output
M8016
Clock display stopped
M8146
Prohibit Y1 pulse output
M8017
Clock ±30 s correction
M8147
Y0 in Pulse output
M8018
Real clock flag
M8148
Y1 in Pulse output
M8019
Clock error flag
M8149
CAN communication timeout
M8020
Zero flag
M8150
CAN allowed working flag
M8021
Borrow flag
M8155
Prohibit Y2 pulse output
M8022
CF (carry flag)
M8157
Y2 Pulse in output
M8029
Instruction execution end
M8158
Y3 Pulse in output
M8031
Non-Latch data clear
M8161
16-bit/8-bit switch flag
M8032
Latch data clear
M8168
SMOV instruct HEX
processing function
M8034
Prohibit all outputs
M8170
X0 Pulse capture
M8039
Constant scanning mode
M8171
X1 Pulse capture
M8047
STL Effective monitoring
M8172
X2 Pulse capture
M8048
S900-S999 -"ON "
M8173
X3 Pulse capture
M8049
Valid signal alarms
M8174
X4 Pulse capture
M8050
I0 口口 Interruption prohibition
M8175
X5 Pulse capture
M8051
I1 口口 Interruption prohibition
M8196
C251 C252 C254 2 multiplier
M8052
I2
口口
Interruption prohibition
M8197
C253 C255 2 multiplier flag
M8053
I3
口口
Interruption prohibition
M8198
C251 C252 C254 4 multiplier
M8054
I4 口口 Interruption prohibition
M8199
C253 C255 2 multiplier flag
M8055
I5 口口 Interruption prohibition
M8200~
M8234
C200-C234 count direction set
M8074
Optional External Digital
Tube/key Single/Dual Display
Mode
M8235~
M8345
C235-C245 count direction set
M8075
Optional external digital
tube/key low 6-bit ,decoding
Optional external digital
tube/key high 4-bit ,decoding
M8246~
M8255
C246-C255 count direction
flag
M8076
Optional external digital
tube/button low 6-bit register
display selection
Optional external digital
tube/button height 4-digit
register display selection
MX2N series HMI PLC all in one programming manual
17
No
Content
No
Content
D8000
Monitor timer setting
(Default 200)
D8120
Series 2 communication
parameter settings
D8005
Low random number 16 bits
D8121
MODBUS RTU of series 2 slave
station(1~255
)
D8006
High random number 16 bits
D8122
RS Remaining numbers
instruction sent
D8007
Power-down hold D register
end address
D8123
RS Instruction received numbers
D8008
Power-down detection time
(Setting value:1~100,
Default 10ms)
D8126
MODBUS Master/slave
communication
delay time(1=1ms)
D8010
Scan time current value
(0.1ms)
D8127
MODBUS Master station
communication
real time(1=10ms)
D8011
Minimum scan time(0.1ms)
D8128
MODBUS Master
communication
maximum time (1=10ms)
D8012
Maximum scan time(0.1ms
)
D8129
RS/MODBUS Master
communication timeout
(
1=10ms,Default 500
)
D8013-
D8019
Corresponding to seconds,
minutes, hours, days,
months, years, and weeks
D8136
Y0 Y1 high-speed output
count:32 bit
D8020
X0-X17 filter ratio(Setting:
0~60ms,Default 10)
D8140
Y0 pulse output counter register
D8021
X20-X47 filter ratio(Setting:
1~60ms,Default 10)
D8142
Y1 pulse output counter register
D8022
Optional external digital tube /
button press scan time
(Setting:5~100,Default
10,1=10ms)
D8145
ZRN\DRVI\DRVA command
Y0 Y1 minimum speed
D8028
Z0 Index register contents
D8146
ZRN\DRVI\DRVA command
Y0 Y1 maximum speed
D8029
V0 Index register contents
D8148
ZRN\DRVI\DRVA command
Y0 Y1 acceleration and
deceleration time
D8030-
D8038
Sampling address of Analog
input AD0-AD8
D8149
CAN Master/slave communicate
timeout(1=1ms
)
D8050-
D8052
Sampling address of Analog
input AD9-AD11
D8150
Master/Slaver Station No(0~32)
D8039
Constant scan time
D8151
Slaves number(1~32,Default:8)
MX2N series HMI PLC all in one programming manual
18
(Unit: 1ms, Default 0)
D8040-
D8047
1st to 8th activity STL status
D8152
Shared register
number(1~32, Default:8)
D8049
Minimum activity STL status
D8153
CAN Communication baud rate
(20K~100K, Default:250K)
D8058
D8154
Y2 Pulse output count register
D8059
D8156
Y3 Pulse output count register
D8074
Optional external digital
tube/key,Brightness
(Setting:0~7,Default1)
D8159
ZRN\DRVI\DRVA command
Y2 Y3 minimum speed
D8075
Optional External Digital
Tube/Key Low 6-bit
Flashing Register
D8160
ZRN\DRVI\DRVA command
Y2 Y3 maximum speed
D8076
Optional External Digital
Tube/Key Low 6-digit
Decimal Point Position
Register
D8162
ZRN\DRVI\DRVA command
Y2 Y3 acceleration and
deceleration time
D8077
Optional external digital
tube/button High 4-digit
flash register
D8166
Y2 Y3 High-speed output
count:32 bit
D8078
Optional External Digital
Tube/Key High 4-digit
decimal point position register
D8182
Z1 Address register contents
D8080-
D8089
Optional external digital
tube/key,show register
D8183
V1 Address register contents
D8090
Sampling filter numbers
(0-22,Default 0)
D8184
Z2 Address register contents
D8091
Thermocouple type
(K-0,E-1,J-2)
D8185
V2 Address register contents
D8093
Thermocouple cold junction
temperature
D8186
Z3 Address register contents
D8094
1st thermocouple Temperature
D8187
V3 Address register contents
D8095
Temperature of second
thermocouple
D8188
Z4 Address register contents
D8096
Analog DA0 Output
data(0~4095)
D8189
V4 Address register contents
D8097
Analog DA1 Output
data(0~4095)
D8190
Z5 Address register contents
D8112
D8191
V5 Address register contents
D8113
D8192
Z6 Address register contents
D8114
D8193
V6 Address register contents
D8115
D8194
Z7 Address register contents
MX2N series HMI PLC all in one programming manual
19
D8116
D8195
V7 Address register contents
D8117
D8196
CAN Slave can't communicate
1~16
D8118
D8197
CAN Slave can't communicate
17~32
D8119
D8198
CAN Slave summary no
communicate 1~16
D8199
CAN Slave summary no
communicate 17~32
D8200
CAN Communication time
(1-1ms)
20
4.1 Analog input type
Input signal type
Range
Register
reading value
Resolution
Accuracy
total range
E type thermocouple
Environment
temperature
~599.9
℃
Room
temperature~5
999
0.1℃1%
K type
thermocouple
Environment
temperature
~999.9
℃
Room
temperature~9
999
0.1℃1%
J type thermocouple
Environment
temperature
~999.9℃
Room
temperature~9
999
0.1℃
1%
Thermistor
NTC10K
-19.9~109.9
℃
-199~1099
0.1℃1%
Thermistor
NTC50K
-40~199.9
℃
-400~1999
0.1℃1%
Voltage analog
0~10V/0-5V
0~4000
2.5mV
1%
Current analog
0~20mA
0~4000
5uA
1%
NO
Register reading
value
AD0
D8030
AD1
D8031
AD2
D8032
AD3
D8033
AD4
D8034
AD5
D8035
AD6
D8036
AD7
D8037
AD8
D8038
AD9
D8050
AD10
D8051
AD11
D8052
MX2N series HMI PLC all in one programming manual
4 Analog Usage
4.1.1 Analog input reading
Analog input could be up to 4 channels, and the precision is in 12 bits.
MX2N series HMI PLC all in one programming manual
21
NO
Register reading value
1stchannel
D8094
2ndchannel
D8095
Cold junction temperature
D8093
Thermocouple sampling filter times
D8090(0-22,Default 0)
Output signal type
Range
Register
reading value
Voltage analog
0~10V/0-5V
0~4095
Current analog
0~20mA
0~4095
NO
Register reading
value
DA0
D8096
DA1
D8097
Thermocouple analog reading register:
Calculate the input voltage formula:
Measure voltage = D803n (n = 0-11) * (VRF reference voltage / 4095);
Analog input sampling period:Fixed to 22 PLC scan cycles.
4.2 Analog output type.
4.2.1 Analog output reading
Analog output could be up to 2 channels, and the precision is in 12 bits.
* When PLC is in “STOP”, D8096 D8097 is automatically set as 0 , DA output is also 0.
* When data setting of analog output is incorrect, 6712 fault will be defected, and DA output
is 0.
MX2N series HMI PLC all in one programming manual
22
Example:LDPM0M0 - No Pulse
SET
M8005
SET M8005
LDF
M8005
M8005 ‘s Down -Conversion completed
DMOV
D8005D0
Extract random numbers toD0 D1
5 Random number instructions
1) Random number related register: Start convert relay-M8005
Random number save register-D8005 (low) D8006 (high)
2) If you need to generate the random number, just need to set M8005 ON in the program.
When the random number is generated and be saved to D8005 D8006, M8005 will be set OFF
automatically.
3) Therefore, M8005 is set from OFF to ON, then start the random number conversion.
And M8005 turn from ON to OFF, then the conversion is completed.
4)
MX2N series HMI PLC all in one programming manual
23
Counter
Type
Counter
Model
Input assigned
Single Phase
single count
input
X000
X001
X002
X003
X004
X005
X006
X007
C235
U/D
C236
U/D
C237
U/D
C238
U/D
C239
U/D
C240
U/D
C241
U/D
R
C242
U/D
R
C243
U/D
R
C244
U/DRS
C245
U/DRS
Single Phase
double count
input
C246
U
D
C247
UDR
C248
UDR
C248(OP
)*1
U
D
C249
UDR
S
C250
UDR
S
Double phase
double count
input
C251
A
B
C252
ABR
C253
ABR
C253(OP
)*1
A
B
C254
ABR
S
C254(OP
)*1
A
B
C255
ABR
S
6 High speed counter application
6.1 Inside high speed counter input distribution table
● Input X000~X007, as shown in the above table, corresponding to each high-speed
counter number. Inputs X000~X007 cannot be used repeatedly by high-speed
counters. They can be used for general input when the input terminals are not used as
high-speed counters.
MX2N series HMI PLC all in one programming manual
24
● The input X000~X007 cannot be reused. For example, once C251 is used, X000
and X001 are occupied, so C235, C236, C241, C244, C246, C247, C249, C252, C254
and interrupt input pointers *I00, *I01 and corresponding input SPD instructions
cannot be used.
6.2 High speed count input instructions
1) Maximum response frequency of C251 C252 C254 (AB phase): 60KHz;
2) Maximum response frequency of C253 C255 (AB phase): 60KHz;
3) Maximum response frequency of C235 C241 C244 C238 (single phase): 60KHz;
4) Other high-speed counter’s highest response frequency: 10KHz;
5) High speed counter of the AB phase can be set to 2 times and 4 times frequency
(setting is valid only for OUT drive same cycle):
** When M8196-ON, C251 C252 C254 count pulse is 2 times frequency;
**When M8197-ON, the C253 C255 count pulse is 2 times frequency;
** When M8198-ON, C251 C252 C254 count pulse is 4 times frequency;
**When M8199-ON, C253 C255 count pulse is 4 times frequency;
For example: If you use an AB phase encoder, it is 1024 pulse inputs in one turn. If
not set the frequency multiplier, then adjust the counter count 1024 (the original
FX1N does not support frequency multiplier, but the FX3U can set 4 times frequency),
If you set 2 times the frequency, then turn the counter to count 2048; if you set 4
times, then turn the counter to count 4096.
Usage instruction:
No Multiplier
2 Times Frequency
4 Times Frequency
** Other usage are consistent with the original FX1N, see the FX programming manual for
details;
** If high-speed input function is not selected, Then SPD, external interrupt, and C235~C255
high-speed counter cannot be used normally.
MX2N series HMI PLC all in one programming manual
25
7 Pulse capture function application
1) Supports the pulse capture function of X0-X5, corresponding to: X0-M8170, X1-M8171,
X2-M8172, X3-M8173, X4-M8174, X5-M8175.
2) Using the pulse capture function, you need to use the EI instruction first. The example is
as follows:
MX2N series HMI PLC all in one programming manual
26
Y0Y1Y2
Y3
Min output
frequency(default:
0)
D8145
D8145
D8159
D8159
Max output
frequency
D8146 D8147
D8146 D8147
D8160
D8160
Acceleration time
(default:100ms)
D8148
D8148
D8162
D8162
Output pulse stops
immediately
M8145
M8146
M8155
M8156
In outputting pulse
M8147
M8148
M8157
M8158
Output pulse
accumulation
D8140、D8141
D8142、D8143
D8154
D8156
Output pulse
accumulation
D8136、D8137
D8166、D8167
8 High speed pulse output application
1) Normally with two high-speed pulses (Y0 and Y1), pulse transmission single channel
maximum frequency: 100Khz, dual channel maximum: 30Khz; maximum optional four-way
high-speed pulse, Y0 and Y1 can output 200KHZ at the same time, Y2 and Y3 can output
100KHz at the same time;
2) Regarding the positioning command with direction output: after driving, the direction
output delay is 20ms before outputting the pulse;
3) Special components used for pulse instructions:
MX2N series HMI PLC all in one programming manual
27
9 MX2N-70HB Optional com port instructions
9.1 Function Description
1) MX2N-70HB supports the optional 1 RS485 communication port, but can not coexist with
its own 232 port.
2) Support exchange between Mitsubishi programming protocol and MODBUS-RTU
protocol. (When PLC stops, it will be back to Mitsubishi programming protocol; When PLC
start, the protocol depends on D8120.)
3) Communication data of optional communication port is set in the D8120 and it will take
effect after PLC runs (the modification could be made until the STOP-RUN is valid again
when the PLC is in effect, the D8120 is reset to 0 when the PLC is in STOP), and the
MODBUS-RTU slave station number is set in the D8121 ( Range 1~255).
4) Use FROM to read slave data when using MODBUS-RTU master, to write slave data
(supports broadcast sending function)
5) Set the optional communication port to MODBUS-RTU protocol. the baud rate of slave is
9600 . as follows:
9.2Modbus-RTU Protocol special registers & relays
Master:
M8121-Master data transmission.
M8122-Master receive Slave data, check error.
M8123-Master receive completed signal
M8124-Master receive broadcast signal
M8129-Communication timeout signal
D8120-Communication parameter and function
D8126-Sending interval(1=1ms,default 20ms,interval between two communication)
D8122-Station number with communication timeout
D8123-Real receiving time(1=10ms)
D8124-Max receiving time(1=10ms)
D8129-Receive timeout setting (1=10ms,default 50=500ms,Time from sending completed
to receiving completed)
Slave:
D8120-Communication parameters and function
D8121-Slave address(Range:1~255)
Note: 1.M8121, M8122, M8123, M8124 are only for internal use. Don’t write to the
MODBUS-RTU master when using it.
2.When D8129 receives the timeout, please set according to the actual setting. When
the setting time is too long, if there is a slave communication failure, the waiting time for
re-communication (namely D8129) will be very long.
9.3 D8120 Parameter and Function setting
D8120 Setting function diagram as below:(D8120 communication parameter selection
register)
*1:The start and end characters can be set by user
MX2N series HMI PLC all in one programming manual
29
*2:D8121 is MODBUS-RTU slave station number setting
*3:When the data bit is in 7 bit,the parity can’t be selected---No checking. (6038 failure).
*Mitsubishi Programming port protocol:Data length is 7,stop bit is 1,Parity EVEN is fixed,
the rate can be set;
*MODBUS-RTU protocol:data length, stop bit, parity, rate can be set;
*RS instruction: Data length, stop bit, parity, rate, start character, and end character can all be
set.
9.4Modbus-RTU Master station instructions
Master read slave data usage instruction
* Transfer the data of register from address 0 of 1ststation to D0
M1--low 8 bits indicate the slave address, high 8 bits indicate the sent instruction;
Such as: H301-command 03 (read register instruction), slave address 01; if the high 8 bit is 0,
then the command is default as 03;
M2--slave element address; (Slave address of MX2N series PLC refers to slave element
address table);
D - master station data register, this register holds the data which read from the slave station;
N -- read data length (1~64);
Master write slave data usage instruction
* Write the data of D0 to the register with the 1stslave in address 0
M1--The lower 8 bits indicate the slave address ,the high 8 bits indicate the sent instruction;
Such as: H601-command 06 (read register instruction), slave address 01; if the high 8 bit is 0,
the command defaults is 06;
M2--slave component address; (Slave address of MX2N series PLC refers to slave element
address table);
If the address is set to 0, it means that data is written to all slaves;
D -- the master station data register, which holds the data to be written to the slave;
N -- write data length;
When using commands 05 (write bit) and 06 (write register),act as 1 regardless of the
length is set.
When using H10 (K16) to write multi-bit registers, the data length (1~64);
Special Note:
1. FROM and TO can be used many times in the program. When multiple instructions
MX2N series HMI PLC all in one programming manual
30
Bit
component
AddressBit
component
Bit
component
Bit
component
AddressBit
component
AddressBit
component
Addr
ess
X00X4032Y0
300
Y40
332
S0-S999
1000-1
999
X11X4133Y1
301
Y41
333
T0-T255
2000-2
255
X22X4234Y2
302
Y42
334
C0-C255
3000-3
255
X33X4335Y3
303
Y43
335
M0-M1535:
FX1N
4000-5
535
X44X4436Y4
304
Y44
336
M0-M3071:
FX2N
4000-7
071
are executed at the same time, the system will communicate in turns. If the communication is
overtime, M8129 turns ON and reports 6306 fault and exits this communication, and records
this overtime station number in the D8122 register,execute the next communication
instructions;
2. The FROM/TO instruction cannot be used with the RS instruction in the program at
the same time, reporting 6609 failure;
3. The maximum data length of the FROM/TO instruction: bit (1~64), register (1~64);
4. The communication parameters of the master station and the slave station must be set
same to communicate, such as data length, parity, stop bit, and rate;
5. When using the 05 command to set the slave station component, such as: TO H501
K4000 D0 K1—Set the M0 state of slave No. 1. If D0 is equal to 0, slave M0 is OFF; when
D0 is non-zero, slave M0 is ON;
6. When using the TO command, you can send instructions to all slaves, and only need
to set the slave address to 0.
For example, TO H600 K0 D0 K3: Write D0, D1, D2 of master station to register
addresses 0, 1, 2 of all slaves.
D8129—Communication timeout setting, default 500ms; setting technique, set D8129
larger,when writing program communication is normal, run a period of time, monitor the
value of D8124, D8129 equals D8124 plus 3 (only for reference );
Note: 1) The function needs to be enabled in IO setting and activation software,
otherwise it will report 6506 fault (unsupported instruction) when using FROM/TO
instruction;
9.5Modbus-RTU Protocol slave station element address
MX2N series HMI PLC all in one programming manual
31
X55X4537Y5
305
Y45
337X66
X4638Y6
306
Y46
338
Bit
component
Addres
s
X77X4739Y7
307
Y47
339
D0-D5999
0-5999
X108X5040Y10
308
Y50
340
T0-T255
8000-8
255
X119X5141Y11
309
Y51
341
C0-C255
8300-8
555
X1210X5242Y12
310
Y52
342
Communication
parameters:
1. Communication
parameters,refer to
above D8120;
2. Inspection: N or
O or E;
3. Data bit: 8 or 7;
4. Stop bit: 1 or 2;
5, ID is set in
D8121 (1~255);
MODBUS-RTU
instruction:
1,Read bit
operation
instruction: 01, 02;
2,Write bit
operation
instructions: 05;
3. Read register
X1311X5343Y13
311
Y53
343
X1412X5444Y14
312
Y54
344
X1513X5545Y15
313
Y55
345
X1614X5646Y16
314
Y56
346
X1715X5747Y17
315
Y57
347
X2016X6048Y20
316
Y60
348
X2117X6149Y21
317
Y61
349
X2218X6250Y22
318
Y62
350
X2319X6351Y23
319
Y63
351
X2420X6452Y24
320
Y64
352
X2521X6553Y25
321
Y65
353
MX2N series HMI PLC all in one programming manual
32
instruction: 03,04;
4, Write register
instructions: 06;
5, Write multi-bit
register
instructions: 16
(H10)
Note: The
maximum registers
could be written
and read at the
same time is 64.
X2622X6654Y26
322
Y66
354
X2723X6755Y27
323
Y67
355
X3024X7056Y30
324
Y70
356
X3125X7157Y31
325
Y71
357
X3226X7258Y32
326
Y72
358
X3327X7359Y33
327
Y73
359
X3428X7460Y34
328
Y73
360
X3529X7561Y35
329
Y75
361
X3630X7662Y36
330
Y76
362
X3731X7763Y37
331
Y77
363
9.6 RS Protocol special registers & relays instructions
M8121:RS instruction is being sent
M8122:RS instruction is in sending
M8123:RS instruction receiving signal
M8124:RS instruction is in receiving
M8129:Communication timeout signal
D8122:RS instruction sends data remainder
D8123:Numbers of RS instruction received
D8127:Real-time receiving time(1=10ms)
D8128:Max receiving time (1=10ms)
D8129:RS instruction reception timeout setting(1=10ms,default 50=500ms)
Note:
Max data sent and received by RS Instruction is 140. (If over, report 6706)
MX2N series HMI PLC all in one programming manual
33
Sorts
Error
Error contents
Resolution
PLC hardware
error
M8061(D8061)
Running stop
0000
No abnormality
6101
Power failure data error
Check the power failure detection
circuit, CPU internal FLASH is
6105
Monitor action (Internal watchdog act)
Increase D8000 setting value, or
check procedures
6106
Logical error
Contact supplier
Serial 2/CAN
Error
M8063(D8063)
Running continue
0000
No abnormality
6306
Receive data timeout
Detect communication line and
D8129 setting
6307
Unopened serial 2 use RS,FROM,TO instructions
Open serial 2 communication in
IO parameter software
6308
D8120 data bit/ check bit selection error
7-bit data can’t select “No test”
6309
D8120 check selection error
Check the selection value error
6322
D8120 doesn’t open RS instructions
Pls set D8120 Reuse RS
instruction correctly
6330
D8120 Parameter setting error
6331
MODBUS-RTU Master doesn’t support function
code
Reset FROM and TO Function
code
6332
D8120 doesn’t open MODBUS-RTU Master
station
Set D8120 reuse FROM and TO
instruction correctly
6333
FROM/TO receive slave data check error
Check whether the
communication parameters of the
master and slave stations are
6334
FROM/TO receive slave station number is
inconsistent with function code
6335
FROM slave address error
FROM slave address can’t be 0
6336
FROM/TO instruction’s read/write
data length error
Read/Write length should be 1- 64
6340
Serial 1 DMA transmission error
6341
Serial 1 DMA receive error
6345
Serial 2 DMA transmission error
6346
Serial 2 DMA receive error
Parameter error
M8064(D8064)
Running stop
0000
No abnormality
6401
Program and number check error
1, The program is modified
maliciously
or downloaded is unfinished;
2,CPU internal program FLASH
6409
IO function parameter and number check error
IO function parameter download
is incomplete or FLASH is
10.Fault detection
MX2N series HMI PLC all in one programming manual
34
6410
MODBUS master function is not opened on using
TO/FROM instruction
Please enable the MODBUS
master function in the setup
6411
Using the RD3A/WR3A instructions can’t open
AD/DA enhancement function
Please enable AD/DA
enhancement in the setup
Grammatical
error
0000
No abnormality
6504
Pn/In/High speed label repeat
6505
Component range is exceeded
6506
Use unsupported instructions
6507
Use incorrect labels(like, P63)
6510
MC number size is incorrect
Loop error
M8066(D8066)
Running stop
0000
No abnormality
6603
Use MPS more than 12 times
6605
1,STL continue use times is over 9 times
2,RET appears without using STL
6606
1, I (interrupt) IRETSRET in the main program
2,No IRETSRET in the program.
6609
Others
Whether to use FROM/TO and
RS instructions at same time
6614
Less MPS
6615
Less MPP
6619
I MC MCR IRET STL RST in FOR~NEXT
6623
No MC instruction
6625
1,The initialization step is out of range (S0-S9)
2, The number of STL Sn used is more than 2
3, The range of STL Sn Sn is more than S899
6626
MC, MCR, SRET, I (interrupt), IRET in STL
6627
No RET instruction after STL
6630
CALL SRET relationship is incorrect
Mathematical
error
OM8067(D8067)
Running
continue
0000
No abnormalityv
6701
CALL、CJ have no objects
6706
The instruction component address or value
range is exceeded
6710
SFWR(P)instruction component 1 and
component 2 is same
6711
Analog input AD range setting error
6712
Analog output DA range or data seeting error
6713
Thermocouple open circuit
No connect thermocouple
6715
NTC open circuit
No connect NTC Thermistor
**When an error occurs, use the diagnostics on the PLC programming software GX Developer
and GX Works2 software menu to diagnose the PLC error code and program steps;
MX2N series HMI PLC all in one programming manual
35
Note:
When the power is turned off, the ERR light is on and the program is not allowed to be
downloaded.
**If you need to reset the ERR light, after troubleshooting:
1. Pull the RUN switch to STOP and pull it back to RUN;
2. After the main board is powered off, wait for the ERR light to turn off and then send power.
MX2N series HMI PLC all in one programming manual
36
11 HMI(Human Machine Interface)
11.1 Touch Panel Software instruction
11.1.1 Touch Panel Software installation
CoolMay HMI touch panel software,compatible with XP/WIN7/WIN8/WIN10 system,
If failed installation, try to change computer,reset system,and permit higher user rights to
correct the fault.
Among them, for WIN7 system, the user account control settings must be changed into
“never notify”; for WIN8/WIN10 system, the digital signature must be turned off.
Installation way:
Double click “CoolMayHMI V*.** .exe”,Follow the prompts and click Next.
Note:If it is not the latest version, you could ask sales or visit our website for downloading.
www.coolmay.net
11.1.2 New build touch panel program
1、Double Click Software,select “new file”,
2,Setting working parameter,
* MX2N-43HB: MT6043H(480*272);
MX2N series HMI PLC all in one programming manual
37
* MX2N-70HB,select MT6070H(800*480)
11.2 Touch panel screen download (don't support U disk download)
1.Use USB downloading cable to download the program,and save it, click “application”-
-”compile”(F5);
After compiling, it will show “ Create file success”;
MX2N series HMI PLC all in one programming manual
38
2.In the target file path (as picture show) to see the default disk,usually C drive)
Confirm C drive generate a file in same name with the program and format”***.hw6” (As
picture,”T480272.hw6”)
3.Click “Application” -”Download”(F6);
MX2N series HMI PLC all in one programming manual
39
4.downloading window will appear,waiting until that HMI connection is ok,IP setting is OK,
then click “Download” when you get the prompt ;
5. It will prompt “Update success!” after download completed.
11.3Other HMI software usage, refer to CoolMay HMI series user
manual.
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.