针对:富士变频器与PLC 1214 的MODBUS通信测试(一)改进如下:

  • 硬件连接基本相同,通讯速率38.4Kbps
  • 添加从主机写变频器寄存器的步骤
  • 实现了PLC与变频器运行数据的同步与监控,更符合一般工业现场情况

12

说明:

  • PLC与变频器同步变频器的运行数据,一次通信同步94个数据,其中读取89个数据,写入5个,每个数据为双字长节长度,高字节优先传送。
  • 测试得出一次完整的同步时间为123ms,可以看出在一些大惯性,慢速场合是可以考虑通过modbus总线来控制多台变频器的。
  • 在实际运用时,如果使用PID控制,建议将反馈信号直接用硬件送入变频器,使用变频器本身自带的PID控制,PID参数可以由MODBUS由上级控制系统整定。

DB块的定义如下:

 
DATA_BLOCK "DB_MODBUS_DATA"
TITLE = DB_MEGA_MODBUS
{ S7_Optimized_Access := 'FALSE' }
VERSION : 0.1
NON_RETAIN
//富士MEGA系列变频器,运行监控的背景数据块
STRUCT
M01 : Word;   // Frequency reference (p.u.) (Final command) W02050
M02 : Word;   // Torque command (Final command) W02051
M03 : Word;   // Torque current command (Final command) W02052
M04 : Word;   // Magnetic flux command value W02053
M05 : Word;   // Frequency reference (Final command) W02054
M06 : Word;   // Output frequency 1 (p.u.) W02055
M07 : Word;   // Torque real value W02056
M08 : Word;   // Torque current W02057
M09 : Word;   // Output frequency W02058
M10 : Word;   // Input power W02059
M11 : Word;   // Output current effective value W02060
M12 : Word;   // Output voltage effective value W02061
M13 : Word;   // Operation command (Final command) W02062
M14 : Word;   // Operation status W02063
M15 : Word;   // General-purpose output terminal information W02064
M16 : Word;   // Latest alarm contents W02065
M17 : Word;   // Last alarm contents W02066
M18 : Word;   // Second last alarm contents W02067
M19 : Word;   // Third last alarm contents W02068
M20 : Word;   // Cumulative operation time W02069
M21 : Word;   // DC link circuit voltage W02070
M22 : Word;   // Motor temperature W02071
M23 : Word;   // Model code W02072
M24 : Word;   // Capacity code W02073
M25 : Word;   // ROM version W02074
M26 : Word;   // Transmission error transaction code W02075
M27 : Word;   // Frequency reference on alarm (p.u.) (Final command) W02076
M28 : Word;   // Torque command on alarm (Final command) W02077
M29 : Word;   // Torque current command on alarm (Final command) W02078
M30 : Word;   // Flux command on alarm (Final command) W02079
M31 : Word;   // Frequency reference on alarm (Final command) W02080
M32 : Word;   // Output frequency 1 on alarm (p.u.) W02081
M33 : Word;   // Torque real value on alarm W02082
M34 : Word;   // Torque current on alarm W02083
M35 : Word;   // Output frequency on alarm W02084
M36 : Word;   // Input power on alarm W02085
M37 : Word;   // Output current effective value on alarm W02086
M38 : Word;   // Output voltage effective value on alarm W02087
M39 : Word;   // Operation command on alarm W02088
M40 : Word;   // Operation status on alarm W02089
M41 : Word;   // Output terminal information on alarm W02090
M42 : Word;   // Cumulative operation time on alarm W02091
M43 : Word;   // DC link circuit voltage on alarm W02092
M44 : Word;   // Inverter internal air temperature on alarm W02093
M45 : Word;   // Heat sink temperature on alarm W02094
M46 : Word;   // Life of main circuit capacitor W02095
M47 : Word;   // Life of PC board electrolytic capacitor W02096
M48 : Word;   // Life of heat sink W02097
M49 : Word;   // Input terminal voltage [12] (p.u.) W02098
M50 : Word;   // Input terminal current [C1] (p.u.) W02099
M51 : Word;   // Input terminal current [22] W02100
M52 : Word;   // Input terminal current [32] W02101
M53 : Word;   // Input terminal current [C2] W02102
M54 : Word;   // Input terminal voltage [V2] (p.u.) W02103
M61 : Word;   // Inverter internal air temperature W02110
M62 : Word;   // Heat sink temperature W02111
M63 : Word;   // Load rate W02112
M64 : Word;   // Motor output W02113
M65 : Word;   // Motor output on alarm W02114
M66 : Word;   // Speed detection W02115
M67 : Word;   // Transmission error handling code 2 W02116
M68 : Word;   // PID final command W02117
M69 : Word;   // Inverter rated current W02118
M70 : Word;   // Operation status 2 W02119
M71 : Word;   // Input terminal information W02120
M72 : Word;   // PID feedback value W02121
M73 : Word;   // PID output W02122
M74 : Word;   // Operating status 2 W02123
M76 : Word;   // Main circuit capacity life (Elapsed time) W02125
M77 : Word;   // Main circuit capacity life (Remaining time) W02126
M81 : Word;   // Maintenance (Remaining time) (M1) W02178
M85 : Word;   // Maintenance (Starting times) (M1) W02182
M86 : Word;   // Light alarm contents (Latest) W02183
M87 : Word;   // Light alarm contents (Last) W02184
M88 : Word;   // Light alarm contents (Second last) W02185
M89 : Word;   // Light alarmcontents (Third last) W02186
S01 : Int;   // 频率给定(以最高输出为基准)
Static_2 : Word;
Static_1 : Word;
Static_3 : Word;
S05 : Word;   // 频率给定(以0.01HZ为单位)
"s06-08" : Bool;
"s06-09" : Bool;
"s06-10" : Bool;
"s06-11" : Bool;
"s06-12" : Bool;
"s06-13" : Bool;   // General-purpose input XF(FWD)
"s06-14" : Bool;   // General-purpose input XF(REV)
"s06-15" : Bool;   // Alarm reset
"S06-00" : Bool;   // 正转指令
"S06-01" : Bool;   // 反转指令
"s06-02" : Bool;   // General-purpose input X1
"s06-03" : Bool;
"s06-04" : Bool;
"s06-05" : Bool;
"s06-06" : Bool;   // General-purpose input X5
"s06-07" : Bool;
s07 : Bool;
END_STRUCT;
BEGIN
S05 := 2000;
"S06-00" := TRUE;

END_DATA_BLOCK

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据