11 0 742 KB
FX-32MR PLC Manual FX-32 series PLC instruction manual Special Not e: T his PLC Communicat ion Port Baud rat e is 9600 BPS, 7 dat a lengt h, 1 st op bit , EVEN check (EVEN) . T his PLC download port is RS232 signal, PLC download port 2 f eet T XD send dat a, 3 f eet RXD receive dat a, 5 f eet is ground. RS485 sign,1 pin-RS485+(A),6 pin-RS485-(B)
1. Product description T his PLC adopt s import ed indust ry-grade 32-bit CPU, compat ible wit h FX1N or FX2N series of Mit subishi Corporat ion of Japan, and support s online monit oring and downloading. Can Be used in various indust rial aut omat ion cont rol occasions。 T he out put of t he product has import ed high-power MOS t ube or brand relay as t he out put medium. MOS t ube has no mechanical loss, high power, long lif e and high speed. It can be used t o direct ly drive 24V DC solenoid valve. T he relay has a wide range of applicat ions and can be used t o direct ly drive 220V AC solenoid valve or air swit ch. (T he model suffix MT is t he MOS t ube out put , and t he suffix MR is t he relay out put . Please pay at t ent ion t o t he dist inct ion when purchasing.) Wit h a set of RS232 and RS485 bus int erf ace, bot h int erf aces can be used f or program download or communicat ion wit h t he human-machine int erf ace. T he RS485 bus also support s comput er link or RS no prot ocol communicat ion or MODBUS RT U communicat ion. Support f or int errupt inst ruct ions, ext ernal int errupt s wit h D8099 can be used f or pulse widt h measurement . 16 digit al input s, 16 digit al out put s, built -in real clock. 3 way 0-10v volt age t ype analog input . 2 way 0-10V volt age t ype analog out put . Four high-speed pulse out put s wit h a maximum f requency of 100K. (requires high speed model) Built -in high-speed count er, support single-phase single-count input , single-phase double-count input , t wo-phase double-count input . T he program encrypt ion f unct ion is enhanced. Af t er set t ing t he password t o "12345678", t he program will not be read unt il t he next memory is erased. Bet t er prot ect ion of t he designer's labor result s 。
2. The diff erence with Mitsubishi original
Feat ures
FX1N
AD sampling
Support 3 channels 0-20mA or 0-10V analog input
Need t o expand
DA out put
Support 2 channels 0-10V analog out put
Need
expand
RS485 int erf ace
Support 1 channel RS485 communicat ion int erf ace
Need
expand
MOSBUS RT U support communicat ion Module ext ension
Mit subishi FX1N
not support
Can be ext ended by RS485 bus
Support Mit subishi original expansion module
4-way high speed out put
2-way high speed out put
High power t ransist or out put
High-power 1.5A t ransist or out put , not easy t o damage, can direct ly drive t he solenoid valve
T he out put current is only 0.5A, and t he solenoid valve cannot be direct ly driven, which is easy t o damage.
FROM/T O inst ruct ion
For MODBUS RT U communicat ion
Used t o communicat e wit h t he expansion module
AD or DA module expansion
Analog module read and writ e
High speed out put
WR3A/RD3A inst ruct ion
3. Size
单位:mm
4. Wiring instructions 4.1. Power wiring instructions For t he DC t ype PLC, connect t he posit ive pole of t he 24V DC power supply t o t he 24V t erminal of t he PLC, and t he negat ive pole t o t he 0V t erminal of t he PLC.
For t he AC t ype PLC, connect t he zero line and t he live line of t he 220V AC power supply t o t he N and L t erminals respect ively t o supply power t o t he PLC.
4.2. Download port wiring instructions T he FX-32 series PLC uses t he st andard RS-232 signal as t he download port . T he int erf ace t ype is DB9/F, which can be direct ly connect ed t o t he RS232 ext ension cable or USB t o RS232 cable
PIn
Sign
Feat ures
2
T XD
T he PLC sends dat a and receives t he RXD pin of ot her devices
3
RXD
T he PLC receives t he dat a and receives t he T XD pin of ot her devices
5
GND
Signal ground
1、4、 6-9
N.C
Not connect ed, not used
T he download port communicat ion f ormat is: baud rat e 9600bps, 7-bit dat a lengt h, 1 st op bit , even parit y (EVEN)
4.3. RS485 bus wiring instructions T he RS485 bus is divided int o phase A and phase B. On some devices, it may be called posit ive and negat ive. Connect t he A phase t o t he A-phase t erminal of t he ot her device, and t he B phase t o t he B-phase t erminal of t he ot her device. Some devices may not have a GND t erminal. In t his case, t he GND t erminal does not need t o be connect ed. If t he cable is long, it is recommended t o connect GND on t he PLC t o t he GND of ot her devices
Pin
Sign
Feat ures
1
A+
RS485 posit ive
6
B-
RS485 negat ive
5
GND
Signal ground
1、4、6-9
N.C
Not connect ed, not used
4.4. Input wiring instructions
For mechanical swit ch t ype input s, connect t he swit ch direct ly bet ween 0V and input X. For t he NPN t ype t hree-wire sensor, connect t he negat ive pole of t he sensor t o 0V, t he posit ive pole t o t he power supply, and t he sensor out put t o t he input X t erminal. For a t wo-wire sensor, connect t he negat ive t erminal of t he sensor t o 0V and t he sensor out put t o t he input X t erminal. Do not use a PNP sensor.
4.5. Output wiring instructions For t he PLC of t he MOS t ube out put mode, connect t he negat ive t erminal of t he ext ernal DC power supply t o t he COM t erminal of t he PLC, and connect t he load t o t he posit ive t erminal of t he ext ernal DC power supply and t he out put t erminal of t he PLC. T he power supply volt age of t he DC power supply should be less t han 30V. It is st rict ly f orbidden t o use AC power t o supply power t o t he out put . For t he relay out put mode PLC, t here is a common out put point f rom 1 t o 4 point s, so each common out put block unit can drive t he load of diff erent power syst ems (f or example: AC200V, AC100V, DC24V, et c.).
project
MOS t ube out put
Relay out put
Ext ernal power supply
DC1~30V
AC250V,DC30V以下
Loop insulat ion
Phot ocoupler insulat ion
Mechanical insulat ion
Act ion represent at ion
LED is illuminat ed when opt ocoupler is driven
LED is bright when t he relay is closed
Response t ime
0.2ms or less
About 10ms
Out put loop
4.6. AD port wiring instructions T he AD port is used t o sample t he analog dat a. T he input volt age range of t he AD port is 0~20mA or 0~10V. T he current exceeds 22mA (current t ype) or 12V (volt age t ype). When wiring, t he GND t erminal and sensor of t he PLC should be connect ed. T he negat ive connect ion connect s t he sensor out put t o t he AD t erminal.
4.7. DA port wiring instructions T he DA port is used t o out put analog signals. T he out put range is 0-10V, and t he out put impedance is recommended t o be great er t han 100K t o ensure accuracy. It is f orbidden t o short -circuit t he DA out put port t o t he power supply or ground. When
wiring, connect t he GND t erminal of t he PLC t o t he ground of t he t arget device, and connect t he DA out put t o t he sampling port of t he t arget device.
5. Perf ormance specification Project
Perf ormance
Operat ional cont rol met hod
St orage program repeat ed scanning met hod
Input and out put cont rol met hods
Bat ch mode (when execut ing END inst ruct ion), input and out put ref resh command, pulse capt ure f unct ion
Programming language
Relay symbol + st ep ladder mode (or SFC)
Ladder programming sof t ware
GX Developer or GX Works2
Program memory
Built -in 8K st ep EEPROM (no st orage bat t ery support required)
T ype of inst ruct ion
sequence command 27 St ep ladder inst ruct ion
2
Basic Applicat ion Inst ruct ions
102
Operat ion processing speed
Basic inst ruct ions
0.15-0.5μs/inst ruct ion
Applicat ion inst ruct ions
0.5-数⼗μs/inst ruct ion
Input and out put X, Y
Input point s X
Phot ocoupler isolat ion, numbered in oct al
Out put point Y
High power MOS t ube or relay, numbered in oct al
Auxiliary relay M
General use
M0-M383,384点
Maint aining (EEPROM ret ent ion)
M384-M1535,1152 point s
Special use
M8000-M8255,256 point s
Init ial st at e (EEPROM hold)
S0-S9,10 point s
Maint ain (EEPROM hold)
S10-S999,990 point s
100ms
T 0-T 191,192 point s
T he subrout ine uses 100ms
T 192-199,8 point s, Subprogram
10ms
T 200-T 245,46 point s
1ms cumulat ive t ype (EEPROM
T 246-T 249,4 point s
St at e S
T imer T
Built -in 2 pot ent iomet ers f or analog t imers VR1: D8030 VR2: D8031
hold)
Count er C
Dat a Regist er D, V, Z
Nest ed point er
Const ant
100ms cumulat ive t ype (EEPROM hold)
T 250-T 255,6 point s
16-bit increment mode, generally used
C0-C15,16 point s
16-bit increment mode (EEPROM hold)
C16-C199,184 point s
32-bit up and down count ers, generally used
C200-C219,20 point s
32-bit up and down count er (EEPROM hold)
C220-C234,15 point s
High speed count er (EEPROM hold)
C235-C255,21 point s
General use
D0-D127,128 point s
Maint aining (EEPROM ret ent ion)
D128-D7999,7872 point s
Special use
D8000-D8255,256 point s
For indexing
V0-V7,Z0-Z7,16 point s
Jump, subrout ine branch、 Subprogram branch
P0-P127,128 point s,P63 which point t he program ends
Mast er cont rol
N0-N7,8 point s
Decimal number K
16位:-32,768~+32,767 32位:-2,147,483,648~+2,147,483,647
Hexadecimal number H
16位:0~FFFF 32位:0~FFFFFFFF
6. High-speed pulse output instructions T he PLC support s a t ot al of 4 high-speed pulse out put s of Y0-Y3, and t he highest pulse speed of each channel can reach 100K Hz. (※ Normal model only support s 10K) Relat ed devices: Device address
Dat a lengt h
Init ial value
cont ent
D8145
16位
0
Perf orm DRVI, base speed when DRVA is execut ed
D8146-
32位
100,0
Execut e DRVI, t he highest speed when DRVA is
D8147 D8148
D8140D8141
D8142D8143
D8220D8221
D8222D8223
Component address
16位
32位
32位
32位
32位
00
execut ed
100
Accelerat ion and decelerat ion t ime when ZRN, DRVI, and DRVA are execut ed
0
Used as t he current value dat a regist er of t he Y0 out put posit ioning inst ruct ion. When using t he PLSV, DRVI, and DRVA commands, t he current value is increased or decreased corresponding t o t he direct ion of rot at ion. In addit ion, since PLSY, t he PLSR inst ruct ion also uses t he same current value regist er, so when t hese inst ruct ions are execut ed, t he value of t he current value is t he accumulat ed value of t he pulse out put value.
0
Used as t he current value dat a regist er of t he Y1 out put posit ioning inst ruct ion. When using t he PLSV, DRVI, and DRVA commands, t he current value is increased or decreased corresponding t o t he direct ion of rot at ion. In addit ion, since PLSY, t he PLSR inst ruct ion also uses t he same current value regist er, so when t hese inst ruct ions are execut ed, t he value of t he current value is t he accumulat ed value of t he pulse out put value.
0
Used as t he current value dat a regist er of t he Y2 out put posit ioning inst ruct ion. When using t he PLSV, DRVI, and DRVA commands, t he current value is increased or decreased corresponding t o t he direct ion of rot at ion. In addit ion, since PLSY, t he PLSR inst ruct ion also uses t he same current value regist er, so when t hese inst ruct ions are execut ed, t he value of t he current value is t he accumulat ed value of t he pulse out put value.
0
Used as t he current value dat a regist er of t he Y3 out put posit ioning inst ruct ion. When using t he PLSV, DRVI, and DRVA commands, t he current value is increased or decreased corresponding t o t he direct ion of rot at ion. In addit ion, since PLSY, t he PLSR inst ruct ion also uses t he same current value regist er, so when t hese inst ruct ions are execut ed, t he value of t he current value is t he accumulat ed value of t he pulse out put value.
At t ribut es
cont ent
M8145
Driven
Y0 pulse out put st op command (st op immediat ely)
M8146
Driven
Y1 pulse out put st op command (st op immediat ely)
M8147
Read special sign
Monit or in Y0 pulse out put (BUSY/READY)
M8148
Read special sign
Monit oring in Y1 pulse out put (BUSY/READY)
M8080
Driven
Y2 pulse out put st op command (st op immediat ely)
M8081
Read special
Monit oring in Y2 pulse out put (BUSY/READY)
sign M8082
Driven
Y3 pulse out put st op command (st op immediat ely)
M8083
Read special sign
Monit oring in Y3 pulse out put (BUSY/READY)
For high-speed pulse out put commands, when t he previous pulse out put command is being driven, t he subsequent pulse out put command will wait unt il t he previous pulse out put command is t urned off . For example: If M0 and M1 are driven at t he same t ime, t he first PLSY inst ruct ion is execut ed first . Af t er t he execut ion is complet ed, M0 is reset , t hen t he second PLSY is execut ed, and M1 is reset af t er t he execut ion is complet ed. T his t ype of writ ing is part icularly usef ul in sit uat ions where segment at ion is required t o cont rol mot ion.
Special Not e: If t he driving condit ion M0 of t he first PLSY is always set , t hen af t er t he first PLSY inst ruct ion is complet ed, t he second PLSY will st ill not operat e unt il M0 is reset . T his should be especially not ed in CALL or JP inst ruct ions. It should be avoided t hat t he disconnect ion act ion will not be execut ed af t er being driven once in t he jump. T his will cause t he high-speed command t o be locked and cannot be used unt il it is disconnect ed again in CALL. . Aff ect ed inst ruct ions: PWM, PLSY, PLSR, PLSV, DRVI, DRVA and t he 32-bit f orm of t he above inst ruct ions. Not e: T he PWM inst ruct ion only support s Y0 and Y1. T he clear signal of ZRN inst ruct ion Y0-Y3 corresponds t o Y4-Y7.
7. DA port instructions T he DA analog out put port can out put an analog volt age in t he range of 0-10V, and t he corresponding value is 0-4000. T he DA port out put maximum current is 15mA, and should avoid short circuit wit h power or ground. T he overall accuracy of t he DA is ±1% and t he resolut ion is 5mV. Simply use t he [WR3A K1 Channel Volt age] f orm command t o out put t he value. Such as: WR3A K1 K0 K2000 ; Set DA0 out put volt age t o 5V (out put volt age = 10*2000/4000) WR3A K1 K1 K4000 ; Set DA1 out put volt age t o 10V (out put volt age = 10*4000/4000)
8. AD port instructions
T he current measurement range of t he AD port is 0-20mA, t he corresponding sampling value is 0-4000, and t he maximum is not more t han 22mA. Ot herwise, t he PLC will be permanent ly damaged. T he input impedance of t he AD port is 250Ω, and t he overall accuracy of t he AD port is 1%. T his product version enhances t he AD port f unct ion, and t he user can adjust t he sampling period and filt er paramet ers. T he dat a of t he AD dat a needs t o be obt ained by RD3A, and t he adjust ment of t he AD paramet ers can be set by WR3A. WR3A inst ruct ion descript ion: T he inst ruct ion f ormat is WR3A M1 M2 D, where M1 should be fixed t o K0, M2 is t he address of t he AD module int ernal buff er (BFM), and D is t he dat a t o be set . RD3A inst ruct ion descript ion: T he inst ruct ion f ormat is RD3A M1 M2 D, where M1 should be fixed t o K0, M2 is t he address of t he AD module int ernal buff er (BFM), and D is t he dat a t o be acquired. Int ernal buff er (BFM) allocat ion (BFM wit h * can be set using t he WR3A inst ruct ion) BFM
Channel
Cont ent
0#
Average input value
1#
Current input value
*2#
Single sampling period, unit ms, 5-4096 eff ect ive, def ault value 100
*3#
T he average number of samples used t o get t he average result , 1-4096 is valid, t he def ault value is 8
*4# *5#
Channel 0
Gain value, valid f rom 1-2000, def ault value is 1000 Off set value, def ault value 0
*6#
First -order filt er coefficient , t he value is 0 means no filt ering, 0-99 is valid, t he def ault value is 0
*7#
Input t ype select ion, you can select t he AD t ype by set t ing t his value. ※ 0 means 0-20mA current input t ype (def ault value of current t ype hardware); 1 means 4-20mA current input t ype; 2 means 0-10V volt age input t ype (def ault value of volt age t ype hardware)
10#
Channel 1
Average input value
11#
Current input value
*12#
Single sampling period, unit ms, 5-4096 eff ect ive, def ault value 100
*13#
T he average number of samples used t o get t he average result , 1-4096 is valid, t he def ault value is 8
*14#
Gain value, valid f rom 1-2000, def ault value is 1000
*15#
Off set value, def ault value 0
*16#
First -order filt er coefficient , t he value is 0 means no filt ering, 0-99 is valid, t he def ault value is 0
*17#
Input t ype select ion, you can select t he AD t ype by set t ing t his value. ※ 0 means 0-20mA current input t ype (def ault value of current t ype hardware); 1 means 4-20mA current
input t ype; 2 means 0-10V volt age input t ype (def ault value of volt age t ype hardware)
T he select ed AD t ype must mat ch t he opt ional PLC analog sampling hardware t ype, ot herwise t he result will be wrong. T he current t ype analog hardware can be select ed f rom 0-20mA or 4-20mA t ype t ype, 0-10V t ype can not be select ed; volt age t ype analog hardware can only select 0-10V t ype, not 0-20mA or 4-20mA t ype. T he relat ionship bet ween t he sample values of 0-20mA and 4-20mA t ype is: AD4=AD0*5/4-1000; where AD4 represent s t he sampled value in t he 4-20mA st at e, and AD0 represent s t he sampled value in t he 0-20mA st at e.
Input value and paramet er set t ing relat ionship: Current input value = original input value * gain / 1000 + off set Average input value = average of input values – filt er coefficient * (last average input value – average of input values) / 100 Example of use: RD3A K0 K0 D0 reads t he average sample value of channel 0 t o D0 RD3A K0 K10 D1 reads t he average sampled value of channel 1 int o D1
9. Use of built-in high speed counter Ent er X000-X007, as shown in t he t able below, corresponding t o each high-speed count er number. Input X000-X007 cannot be used repeat edly by t he high speed count er. It can be used f or general input when t he input t erminal is not used as a high number count er.
For high speed models, t he pulse f requency range: C235, C236, C241, C244, C246, C247, C249 single phase up t o 60K C251, C252, C254 double phase up t o 30K C237, C238, C239, C240, C242, C243, C245, C248, C250 single phase up t o 10K C253, C255 double phase up t o 5K For normal models, t he f requency range: C235-C250 (single phase): 10K C251-C255 (biphase): 5K
10. PLC version inf ormation T he hardware version of t he PLC is saved in t he special regist er D8100, and t he sof t ware version is saved in t he D8101.
11. Use of RS485 communication f unction
For RS485 communicat ion, connect all t he A (or +) st ages of t he RS485 bus and t he B (or -) st ages are connect ed t oget her. If t he t ransmission dist ance is f ar, please add a 120 ohm t erminat ing resist or on bot h ends of t he bus t o ensure t he communicat ion qualit y. T he RS485 bus int erf ace of t his PLC support s a variet y of communicat ion f unct ions, and t he user can select t he corresponding communicat ion f unct ion according t o t he act ual sit uat ion. T he current ly support ed communicat ion f unct ions are shown in t he f ollowing t able: Feat ures
use
Programming communicat ion
Can be used t o connect programming t ools or human machine int erf aces. Realize t he simult aneous connect ion of 2 human-machine int erf aces.
No prot ocol communicat ion
Dat a exchange can be perf ormed in a non-prot ocol manner wit h various devices t hat can int erf ace wit h RS485. Mainly used f or dat a exchange bet ween comput ers, bar code readers, print ers, and various measuring inst rument s.
Comput er link
A comput er or t he like can be used as a mast er st at ion, and a PLC can be connect ed as a slave st at ion. T he prot ocol on t he comput er side corresponds t o [Comput er Link Prot ocol Format 1, Format 4]. Mainly used f or dat a collect ion and cent ralized management , et c.
MODBUS RT U slave
T he PLC can be used as a slave of t he MODBUS RT U device t o realize dat a exchange bet ween devices.
MODBUS RT U Mast er
T he PLC can be used as t he host of t he MODBUS RT U device t o exchange dat a wit h ot her MODBUS RT U slaves. Mainly used f or communicat ion wit h invert ers, mult iple PLC net working, et c.
T he communicat ion f unct ion select ion can be select ed by set t ing t he value of D8120. It is recommended t o set t he first execut ion cycle of t he first part of t he user program (t hat is, set wit h M8002 as t he driving condit ion). T he cont ent s of D8120 are as f ollows:
Bit number
Name
b0
Dat a lengt h
b1-b2
Parit y
b3
St op bit
b4-b7
Baud rat e
Cont ent 0(位OFF)
1(位ON)
7位
8位
b2,b1 (0,0):⽆校验(NONE) (0,1):奇校验(ODD) (1,1):偶校验(EVEN) 1位 b7,b6,b5,b4
2位 b7,b6,b5,b4
(bps)(bps) (0,0,1,1):300 (0,1,0,0):600 (0,1,0,1):1,200 (0,1,1,0):2,400 (0,1,1,1):4,800
(1,0,0,0):9,600 (1,0,0,1):19,200 (1,0,1,0):38,400 (1,0,1,1):57,600 (1,1,0,0):115,200
b8
Header
None
有(D8124) 初始值:ST X(02H)
b9
T ail
None
有(D8125) 初始值:ET X(03H)
b12,b11,b10 (0,0,0):RS Or comput er connect ion (1,0,0):MODBUS RT U Mast er (1,0,1):MODBUS RT U Slave
b10-12
comput er connect ion
b13
And check
No addit ional
addit ional
b14
prot ocol
No prot ocol
Privat e prot ocol
b15
Cont rol sequence
Prot ocol f ormat 1
Prot ocol f ormat 4
11.1. Programming communication Program communicat ion enables downloading and monit oring of PLC programs, as well as communicat ion wit h t ext displays or human-machine int erf aces. Communicat ion specificat ions: 9600bps baud rat e, even parit y, 7-bit dat a lengt h, 1 st op bit Set t ing met hod: Set t ing D8120 t o 0 (t he def ault value) is t he programming communicat ion f unct ion.
11.2. No protocol communication No prot ocol communicat ion enables dat a int eract ion t hrough RS commands. Set t ing met hod: Make sure t hat t he b10, b11, and b12 bit numbers of D8120 are all 0, and b14 is 0. For t he remaining byt es, please ref er t o t he above t able.
11.3. Computer connection communication T hrough t his communicat ion f unct ion, cent ralized management and dat a acquisit ion of t he PLC by t he comput er can be realized. Set t ing met hod: Make sure t hat t he b10, b11, and b12 bit numbers of D8120 are all 0, and b14 is 1. For t he remaining byt es, please ref er t o t he above t able.
11.4. MODBUS RTU slave communication T his f unct ion is an ext ension of t he f unct ions of t he Mit subishi FX series PLC, which f acilit at es dat a exchange bet ween t he modbus rt u host and t he PLC. T he modbus
f unct ion numbers support ed by t he slave are 1, 2, 3, 4, 5, 6, 15, and 16. Set t ing met hod: as shown in t he f ollowing t able Regist er
Descript ion
D8120
Modbus communicat ion paramet er set t ings. Make sure t hat b10 of D8120 is 1, b11 is 0, b12 is 1; RT U must use 8-bit dat a lengt h, so b0 must be 1. For t he baud rat e, parit y bit , and st op bit paramet ers, please ref er t o t he descript ion of D8120 above.
D8121
Slave address f or modbus addressing
D8126
T he response delay, in ms, allows t he receiving device t o have a preparat ion t ime. Generally choose 5-10
Error code: T he error code is st ored in D8063. T he meaning of t he specific error code is shown in t he f ollowing t able. Error code Descript ion 6320
CRC check error
6321
Illegal f unct ion, t he slave only support s 1, 2, 3, 4, 5, 6, 15, 16
6322
Illegal dat a address, modbus except ion code 2
6323
Illegal dat a value, modbus except ion code 3
6324
Illegal slave device f ailure, modbus except ion code 4
PLC软元件在ModBus寄存器访问(modbus功能号3,4,6,16)时,所对应的地址编号: PLC软元件
MODBUS地址(⼗六进制)
MODBUS地址(⼗进 制)
D0-D7999
0000H-1F3FH
0-7999
D8000-D8255
0000H-203FH
8000-8255
T 0-T 255
3000H-30FFH
12288- 12543
C0-C199
4000H-40C7H
16384- 16583
C200-C255
40C8H-4137H(32位占2个地 址)
16584-16695
S0-S999
8000H-803FH
32768-32831
X0-X377
8040H-804FH
32832-32847
Y0-Y377
8050H-805FH
32848-32863
T 0-T 255(输出状 8060H-806FH 态)
32864-32879
M0-M1535
8080H-80DFH
32896-32991
C0-C255(输出状 80E0H-80EFH 态)
32992-33007
M8000-M8255
33008-33023
80F0H-80FFH
When t he PLC bit device is accessed by t he ModBus bit (modbus f unct ion number 1, 2, 5, 15), t he corresponding address number: PLC bit device
MODBUS address (hex)
MODBUS address (decimal)
S0-S999
0000H-03FFH
0-1023
X0-X377
0400H-04FFH
1024-1279
Y0-Y3FF
0500H-05FFH
1280-1535
T 0T 255(Out put st at us)
0600H-06FFH
1536-1791
M0-M1535
0800H-0DFFH
2048-3583
C0C255(Out put st at us)
0E00H-0EFFH
3584-3839
M8000-M8255
0F00H-0FFFH
3840-4095
11.5. MODBUS RTU Host communication T his f unct ion is an ext ension of t he f unct ions of t he Mit subishi FX series PLC, which is convenient f or accessing modbus rt u slave devices, such as invert ers or ot her PLC slaves. T he modbus f unct ion numbers support ed by t he host are 1, 2, 3, 4, 5, 6, 15, and 16. Set t ing met hod: as shown in t he f ollowing t able Regist er
Descript ion
D8120
Modbus communicat ion paramet er set t ings. Make sure t hat b10 of D8120 is 0, b11 is 0, b12 is 1; RT U must use 8-bit dat a lengt h, so b0 must be 1. For t he baud rat e, parit y bit , and st op bit paramet ers, please ref er t o t he descript ion of D8120 above.
D8126
Send int erval, in ms. Indicat es t he t ime int erval bet ween t wo modbus communicat ions bef ore and af t er, so t hat t he receiving device has a preparat ion t ime. Generally choose 10ms t o 100ms
D8129
Receive t imeout , in ms. T he t imeout period f or t he slave t o wait f or a response af t er t he host sends it . Generally can be set t o 200 t o 500ms
Inst ruct ions: Use t he FROM and T O inst ruct ions t o implement modbus read and writ e operat ions on t he slave. T he FROM command is used t o read t he slave dat a. T he support ed f unct ion codes are 1, 2, 3, 4, and t he T O command is used t o set t he slave dat a. T he support ed f unct ion codes are 5, 6, 15, and 16.
Descript ion of t he FROM inst ruct ion: FROM m1 m2 d n, where m1 represent s t he slave address, m2 represent s t he slave regist er address, d represent s t he regist er f or holding t he received dat a, and n represent s t he lengt h. When t he upper eight bit s of m1 are 0, t he def ault f unct ion 3 is used, ot herwise t he upper eight bit s of m1 will be used as t he f unct ion number. Example: FROM H1 H2000 D0 K3 indicat es t hat t he def ault f unct ion 3 is used t o read t he t hree regist ers st art ing f rom t he H2000 address of t he slave No. 1 t o D0-D2. FROM H102 H0010 D0 K5 Indicat es t hat f unct ion 1 is used t o read t he 5 bit s f rom t he H0010 address of t he No. 2 slave t o D0. Descript ion of t he T O inst ruct ion: T O m1 m2 d n, where m1 denot es t he slave address, m2 denot es t he slave regist er address, d denot es a regist er f or t ransmit t ing and receiving dat a, and n denot es a lengt h. When t he upper eight bit s of m1 are 0, t he def ault f unct ion 6 (lengt h value is 0) or 16 (lengt h value ot her t han 0) is used, ot herwise t he upper eight bit s of m1 are used as f unct ion numbers. Example: T O H1 H2000 D0 K3 indicat es t hat t he def ault f unct ion 16 is used t o t ransmit t he values in regist ers D0-D2 t o t he t hree regist ers st art ing wit h t he H2000 address of slave 1. FROM HF02 H0010 D0 K5 Indicat es t he use of f unct ion 15 t o set t he 5 digit s st art ing f rom t he H0010 address of slave No. 2. T he set t ing value is det ermined by D0. Sign bit : M8123: Set when communicat ion is complet e, regardless of whet her t he communicat ion was successf ul. M8129: Set when communicat ion t imeout or error. Special Not e: T he FROM or T O inst ruct ion can be programmed mult iple t imes in a ladder diagram, but it cannot be called in a subf unct ion or loop. During t he communicat ion process, it must be guarant eed t hat t he inst ruct ions should remain execut ed. When mult iple inst ruct ion FROM/T O inst ruct ions are simult aneously driven, t he syst em will communicat e in sequence. error code: T he error code is st ored in D8063. T he meaning of t he specific error code is shown in t he f ollowing t able.
error code Descript ion 6330
Slave response recept ion t imeout
6331
Inconsist ent st at ion number
6332
Responding t o illegal dat a f ormat
6333
Respond t o CRC error
6334
Not set t o MODBUS host
6335
Unsupport ed f eat ure number
6336
Dat a lengt h is t oo long
6337
Incorrect regist er range f or saving dat a
6338
Response f unct ion number is inconsist ent
6339
Response dat a is incorrect
6350+
Slave response except ion code, 6350+ except ion code t o flag error
12. Supported instructions 27 basic sequence inst ruct ions Mnemonic, name
Mnemonic, name
Mnemonic, name
[LD]取
[LDI]取反转
[LDP]取脉冲上升沿
[LDF]取脉冲下降沿
[AND]与
[ANI]与反转
[ANDP]取脉冲上升沿
[ANDF]取脉冲下降沿
[OR]或
[ORI]或反转
[ORP]或脉冲上升沿
[ORF]或脉冲下降沿
[ANB]回路块与
[ORB]回路块或
[OUT ]输出
[SET ]置位
[RST ]复位
[PLS]上升沿脉冲
[PLF]下降沿脉冲
[MC]主控
[MCR]主控复位
[MPS]进栈
[MRD]读栈
[MPP]出栈
[INV]反转
[NOP]空操作
[END]结束
St ep ladder inst ruct ion: support up t o 8 parallel branches, diff erent st at us numbers can have double coil [ST L] st ep ladder, [RET ] ret urn Applicat ion inst ruct ions (all support ed inst ruct ions support 32-bit D inst ruct ions and t rigger P commands) Indicat es t hat t he inst ruct ion is not support ed. * Indicat es t hat t he inst ruct ion f unct ion has been adjust ed.
Classificat ion FNC00-FNC09 程序流程
FNC NO mnemonic 00 CJ
条件跳转
01 CALL
子程序调用
02 SRET
子程序返回
03 IRET
中断返回
04 EI
允许中断
05 DI
禁止中断
06 FEND
主程序结束
07 WDT
看门狗定时器
08 FOR
重复范围开始
FNC10-FNC19 传送与比较
FNC20-FNC29 四则逻辑运算
FNC30-FNC39 循环与移位
FNC40-FNC49 数据处理
09 NEXT
重复范围结束
10 CMP
比较
11 ZCP
区域比较
12 MOV
传送
13 SMOV
位传送
14 CML
反相传送
15 BMOV
成批传送
16 FMOV
多点传送
17 XCH
数据交换
18 BCD
BCD的交换
19 BIN
BIN的交换
20 ADD
BIN加法
21 SUB
BIN减法
22 MUL
BIN乘法
23 DIV
BIN除法
24 INC
BIN递增
25 DEC
BIN递减
26 WAND
逻辑与
27 WOR
逻辑或
28 WXOR
逻辑疑惑
29 NEG
求补
30 ROR
右回转
31 ROL
左回转
32 RCR
带进位右回转
33 RCL
带进位左回转
34 SFTR
位右移
35 SFTL
位左移
36 WSFR
字右移
37 WSFL
字左移
38 SFWR
移位写入
39 SFRD
移位读出
40 ZRST
全部复位
41 DECO
解码
42 ENCO
编码
43 SUM
ON位数
44 BON
ON位判断
45 MEAN
平均值
46 ANS
信号报警器置位
47 ANR
信号报警器复位
FNC50-FNC59 高速处理
FNC60-FNC69 方便指令
FNC70-FNC79 外部设备 I/O
FNC80-FNC89 外部设备 SER
48 SQR
BIN数据开方运算
49 FLT
BIN整数→2进制浮点数转换
50 REF
输入输出刷新
51 REFF
滤波调整
52 MTR
矩阵输入
53 HSCS
比较置位(高速计数器)
54 HSCR
比较复位(高速计数器)
55 HSZ
区间比较(高速计数器)
56 SPD
脉冲密度
57 PLSY
脉冲输出
58 PWM
脉宽调制
59 PLSR
可调变速脉冲输出
60 IST
状态初始化
61 SER
数据查找
62 ABSD
凸轮控制(绝对方式)
63 INCD
凸轮控制(增量方式)
64 TTMR
示教定时器
65 STMR
特殊定时器
66 ALT
交替输出
67 RAMP
斜坡信号
68 ROTC
旋转工作台控制
69 SORT
数据排序
70 TKY
十字键输入
71 HKY
十六键输入
72 DSW
数字开关
73 SEGD
七段码译码
74 SEGL
七段码分时显示
75 ARWS
方向开关
76 ASC
ASC码转换
77 PR
ASC码打印
78 FROM*
BFM读出
79 TO*
BFM写入
80 RS
串行数据传送
81 PRUN
8进制位传送
82 ASCI
HEX→ASCII转换
83 HEX
ASCII→HEX转换
84 CCD
校验码
85 VRRD
电位器值读出
86 VRSC
电位器刻度
FNC110FNC119 浮点运算1
FNC120FNC129 浮点运算2 四则运算
FNC130FNC139 浮点运算3 三角函数
FNC140FNC149 数据处理2
87 -
-
88 PID
PID运算(暂不支持参数自整定)
89 -
-
110 ECMP
二进制浮点比较
111 EZCP
二进制浮点区域比较
112 -
-
113 -
-
114 -
-
115 -
-
116 -
-
117 -
-
118 EBCD
二进制浮点→十进制浮点转换
119 EBIN
十进制浮点→二进制浮点转换
120 EADD
二进制浮点加法
121 ESUB
二进制浮点减法
122 EMUL
二进制浮点乘法
123 EDIV
二进制浮点除法
124 -
125 -
126 -
127 ESQR
二进制浮点开方
128 -
129 INT
二进制浮点→BIN整数转换
130 SIN
浮点SIN运算
131 COS
浮点COS运算
132 TAN
浮点TAN运算
133 -
-
134 -
-
135 -
-
136 -
-
137 -
-
138 -
-
139 -
-
140 -
-
141 -
-
142 -
-
143 -
-
144 -
-
145 -
-
FNC150FNC159 定位
FNC160FNC169 时钟运算
FNC170FNC179 外围设备
FNC220FNC249 触点比较指令
146 -
-
147 SWAP
上下字节变换
148 -
-
149 -
-
150 -
-
151 -
-
152 -
-
153 -
-
154 -
-
155 D ABS
ABS 当前值读取
156 ZRN
原点回归
157 PLSV
可变速脉冲输出
158 DRVI
相对位置控制
159 DRVA
绝对位置控制
160 TCMP
时钟数据比较
161 TZCP
时钟数据区域比较
162 TADD
时钟数据加法运算
163 TSUB
时钟数据减法运算
164 -
-
165 -
-
166 TRD
时钟数据读取
167 TWR
时钟数据写入
168 -
-
169 HOUR
计时表
170 GRY
葛莱码转换
171 GBIN
葛莱码逆转换
172 -
-
173 -
-
174 -
-
175 -
-
176 RD3A*
模拟量模块读取
177 WR3A*
模拟量模块写入
178 -
-
179 -
-
220 -
221 -
222 -
223 -
224 LD =
(S1)=(S2)时起始触点接通
225 LD >
(S1)>(S2)时起始触点接通
226 LD
(S2)时串联触点接通
234 AND
(S2)时并联触点接通
242 OR