M340与ATV31的CANopen通信及参数设置案例

合集下载

M340与ATV31的Modbus串行通信(Modbus通信控制启停,Modbus通信给定速度)完全通信指导

M340与ATV31的Modbus串行通信(Modbus通信控制启停,Modbus通信给定速度)完全通信指导

这是“警告”的符号。警示用户潜在的危险和必须要遵守的规则,如果不遵守使用 说明,可能导致调试失败、人身伤害甚至设备损坏。
这是提醒“注意”的符号。提醒用户需要注意的操作说明。请遵守所有带此符号的 注意事项,以避免不必要的调试错误。
警告
“警告”表示可能存在危险,如果不遵守,可能导致严重的人身伤害甚至死亡, 或设备损坏。
_
6.2 软件调试...................................................................................................................... 29 6.3 ATV31 常见通信故障 ..................................................................................................31 7. 带多台变频器.........................................................................................................................32 7.1 硬件连接...................................................................................................................... 32
7.1.1 分配器模块和 RJ45 连接器...............................................................................33 7.1.2 接线盒方式 ....................................................................................................... 33 7.2 软件扩展...................................................................................................................... 35 8. 附件.......................................................................................................................................37 8.1 M340 示例程序...........................................................................................................37 8.2 ATV31 的 Modbus 用户手册 .....................................................................................37 8.3 ATV31 编程手册 .........................................................................................................37

ATV31培训和参数设置及配置

ATV31培训和参数设置及配置

• 进线和马达电抗器 (existing offer)
– 进线电抗器:
• 减少电源质量不高或不平衡带来的影响,减小谐 波电流,特别是在低阻抗的电网中
• 电抗引起的压降在3
~ 5%之间
1 – 选件 滤波器
• 输出滤波器 (existing offer)
– LR元件组合最大限度的限制从 500 到 1500 V/s的dV/dt
1 - SPECIFICATIONS I/O (Cont ’d)
• 1个模拟输出,输出形式(电压或电流) 可选;也可配置为逻辑输出
– 电压形式 (AOV): 0, +10V, 470 – 电流形式 (AOC): 0, 20mA, 800 maxi – 分辨率: 8 位 ; 转换精度: 1% ; 线性度:
用于客户自己安装的场合 可与 Vario, GV2, 按钮, 指示灯, 电位器等组合.
ATV 31 K
0.18 a 15 kW
1 – 电压和功率等级
• 功率电压范围扩展
– 与电机功率一一对应
带散热器
– 覆盖全世界范围的电压电流等级 018 037 055 075 U11 U15 U22 U30 U40 U55
3 kW
4 kW 5.5 kW 7.5 kW 11 kW 15 kW 5 HP 7.5 HP 10 HP 15 HP 20 HP
驱动组件
K 0.18 kW 0.37 kW 0.55 kW 0.75 kW 1.1 kW
1/4 HP 1/2 HP 3/4 HP 1 HP 1.5 HP
1 Ph 200-240 V New New New New New
3 kW "C3"
4 kW 5.5 kW 7.5 kW 11 kW 15 kW 5 HP 7.5 HP 10 HP 15 HP 20 HP

M340与ATV31的Modbus串行通信(Modbus通信控制启停、Modbus通信给定速度)_完全通信指导资料

M340与ATV31的Modbus串行通信(Modbus通信控制启停、Modbus通信给定速度)_完全通信指导资料

M340与ATV31Modbus串行通信向导<一> ——Modbus通信控制启停、Modbus通信给定速度本向导分为两部分:1.《快速操作指南》---Know How, 满足了客户“快速解决调试问题”的需求。

●发送快---大小在2M左右,能方便快速地通过电子邮件发给客户使用●调试快---提供了反复调试过的完整准确的PLC通信程序,客户可直接下载●接线快---含有实物照片的通信接线图使客户非常容易理解和模仿,并且快速完成接线●设置快---图形化的变频器参数设置指导使客户可直接上手设置参数,不用查找手册2.《完全通信指导》---Know Why, 满足了客户“系统学习通信知识”的需求。

●知识全---不仅给出了详细的调试步骤和详细解释,还使客户在完成通信的同时系统学习相关的产品和通信知识●考虑全---对客户调试可能遇到的各种突发情况给出了相关提示和解决方法●理解易---提供了程序指令和结构的详细注释,使客户能容易的理解和学习提供的标准程序并能在原有程序上进行扩展第二部分完全通信指导重要信息注意:在尝试安装、操作或调试设备之前,请仔细阅读下述说明并通过查看来熟悉设备。

下述特别信息可能会在文本其他地方或设备上出现,提示用户潜在的危险和注意事项,或提供阐明或简化某一过程的信息。

遵守使用说明,可能导致调试失败、人身伤害甚至设备损坏。

此符号的注意事项,以避免不必要的调试错误。

目录1.实验简介 (4)2.硬软件环境 (4)3. ATV31变频器设置 (5)3.1 操作说明 (5)3.2 参数设置 (6)3.2.1 控制方式 (7)3.2.2 通信参数 (8)4. 硬件连接 (10)5. PLC编程 (11)5.1硬件组态 (11)5.1.1 组态CPU (11)5.1.2 组态Modbus Master (12)5.2 ATV31 Modbus变量说明 (12)5.2.1 ATV31 Modbus内部字 (12)5.2.2 ATV31 DRIVERCOM流程 (14)5.3 通信功能块 (15)5.3.1 连续读功能块READ_VAR (16)5.3.2 连续写功能块WRITE_VAR (17)5.4 编程 (18)5.4.1 时间令牌设置 (18)5.4.2 读写从站寄存器 (19)5.4.3 DRIVERCOM流程 (20)6. 实验调试 (21)6.1 计算机与PLC的连接 (21)6.2 软件调试 (22)6.3 ATV31常见通信故障 (23)7. 带多台变频器 (25)7.1 硬件连接 (25)7.1.1 分配器模块和RJ45连接器 (25)7.1.2 接线盒方式 (25)7.2 软件扩展 (26)8. 附件 (28)8.1 M340示例程序 (28)8.2 ATV31的Modbus用户手册 (28)8.3 ATV31编程手册 (28)1.实验简介PLC通过Modbus监控变频器的运行是工业中较常见的应用,本文以施耐德M340 PLC与ATV31变频器为例,简要介绍PLC与变频器之间Modbus串行通信的过程,包括硬件接线、变频器参数设置、硬软件组态、上电调试等,实现在PLC上远程控制ATV31变频器的故障初始化,启动/停止,正转/反转,频率给定等。

M340与ATV71的CANop...

M340与ATV71的CANop...

M340与ATV71的CANop...Unity M340与ATV71CANopen通信向导<⼆> ——CANopen通信给定速度、数字量输出控制启停本向导分为两部分:1.《快速操作指南》---Know How, 满⾜了客户“快速解决调试问题”的需求。

●发送快---⼤⼩在2M左右,能⽅便快速地通过电⼦邮件发给客户使⽤●调试快---提供了反复调试过的完整准确的PLC通信程序,客户可直接下载●接线快---含有实物照⽚的通信接线图使客户⾮常容易理解和模仿,并且快速完成接线●设置快---图形化的变频器参数设置指导使客户可直接上⼿设置参数,不⽤查找⼿册2.《完全通信指导》---Know Why, 满⾜了客户“系统学习通信知识”的需求。

●知识全---不仅给出了详细的调试步骤和详细解释,还使客户在完成通信的同时系统学习相关的产品和通信知识●考虑全---对客户调试可能遇到的各种突发情况给出了相关提⽰和解决⽅法●理解易---提供了程序指令和结构的详细注释,使客户能容易的理解和学习提供的标准程序并能在原有程序上进⾏扩展●移植易---通信程序通⽤性强,可以不受限制地在同⼀系列的各种PLC之间移植程序第⼆部分完全通信指导⽬录1. 实验简介 (3)2. 硬软件环境 (3)3. ATV71变频器设置 (4)3.1 操作说明 (4)3.1.1 集成显⽰终端 (4)3.1.2 图形显⽰终端 (6)3.2 参数设置 (7)3.2.1 简单启动设置 (7)3.2.2 控制⽅式 (8)3.2.3 通信参数 (14)4. 硬件连接 (16)4.1 M340与ATV71的CANopen连接 (16)4.2 M340 DO与ATV71的端⼦连接 (17)5. PLC编程 (18)5.1 硬件组态 (18)5.1.1 组态CPU (18)5.1.2 组态CANopen主站 (19)5.1.3 配置CANopen⽹络和从站 (20)5.1.4 组态DO模块 (22)5.2 ATV71 内部变量说明 (23)5.2.1 ATV71 内部字 (23)5.2.2 ATV71 DSP402状态表 (24)5.3 编程 (25)6. 实验调试 (27)6.1 计算机与PLC的连接 (27)6.2 软件调试 (28)6.3 ATV71常见通信故障 (29)7. 带多台变频器 (30)7.1 硬件扩展 (30)7.2 软件扩展 (31)7.1.1 同⼀变频器通信多个变量 (31)7.1.2 连接多个变频器 (31)8. 附件 (32)8.1 Unity M340程序 (32)8.2 ATV71的CANopen⽤户⼿册 (32)8.3 ATV71编程⼿册 (32)8.4 Unity M340 CANopen现场总线⽤户⼿册 (32)1. 实验简介在施耐德电器的控制系统中,PLC通过CANopen监控变频器的运⾏是⼯业中较常见的应⽤,本⽂以施耐德M340 PLC与ATV71变频器为例,简要介绍PLC与变频器之间CANopen通信的过程,包括硬件接线、变频器参数设置、硬软件组态、上电调试等,实现在PLC上远程控制ATV71变频器的故障初始化,启动/停⽌,正转/反转,频率给定等。

施耐德变频器和第三方控制器的CAN通讯- 廖作军

施耐德变频器和第三方控制器的CAN通讯- 廖作军

施耐德变频器和第三方控制器的CAN通讯MC SAE廖作军前言:本文简要讲述了施耐德变频器ATV71/ATV32/ATV312的CANOPEN通信模式以及和第三方支持CAN接口通讯的控制器之间建立CANOPEN通信的基本流程。

一、变频器的通信接口施耐德变频器ATV71/ATV61/ATV32/ATV312都是自带MODBUS/CANOPEN接口的,其引脚定义如下图:二、变频器CANOPEN所支持的服务施耐德变频器的通讯接口支持CAN2.0A和CANOPEN(DS301V4.02),报文结构如下,一般由11位标志符和8字节数据组成:其中标志符COB-ID包含两个部分:BIT0~BIT6:发送/接收报文的CANOPEN节点地址BIT7~BIT10:电报功能代码,变频器所支持的功能代码如下表所示:由此可以看出,施耐德变频器支持如下服务:1、NMT网络管理服务:提供网络管理(如初始化、启动和停止节点,侦测失效节点)服务。

这种服务是采用主从通讯模式(只有一个NMT主节点)来实现的。

变频器作为从站,可以通过NMT来接收主站的管理信号(如果NMT报文中的Node-ID即从站地址为0,那就是以广播方式发送给网络上的所有变频器)。

NMT报文一般有以下结构:2、BootUp引导消息变频器上电初始化完成后,其CANOPEN会自动进入“预运行”状态。

并向主机发送此引导报文,表明变频器已经上电完成准备好接收主站的NMT指令了。

此报文发送的数据是16#00.3、SYNC同步消息:此报文是由主机发出,用来批准所有的从机进行同步通信模式,但是施耐德变频器PDO数据是不支持同步传输模式的。

4、EMCY紧急对象:当变频器每次出现故障时,会向主机发送此紧急报文,里面包含了由变频器制造商预先定义好的故障代码。

紧急报文的优先权大于其他服务。

5、PDO过程数据对象:PDO包含了预先定义好的需要进行自动循环交换的数据,以异步模式传输,每个PDO最多可传送8个字节的数据。

施耐德atv31 CANopen手册

施耐德atv31 CANopen手册

User’s manual Altivar 31 CANopenSommaire2Foreword34Master PLC+ TSX CPP 100ATV 31 drop cordVW3 CAN CA RR pEB 534EB 534ATV 31 CANopen tapVW3 CAN TAP 256789Configuration10SignallingLED state Altivar 31 / CANopen stateAvailable servicesPDO (Process Data Objects)PDO telegrams are used to exchange real-time data related to the process.PLCs refresh their inputs and outputs cyclically through PDOs (periodic variables).The Altivar 31 features two sets of predefined PDOs:•The first set of PDOs (PDO 1 mandatory for all modes) includes:-one received PDO, used to control (Control word "CMDD") the drive;-one transmitted PDO, used to monitor (Status word "ETAD") the drive.PDO 1 are asynchronous and the transmitted PDO is only sent when the value of its data changes.•The second set of PDOs (PDO 6 for velocity mode) includes:-one received PDO, used to control the drive (Control word "CMDD" and Velocity reference "LFRD"); in addition, it can be configured to include two additional variables; Control word "CMDD" and Velocity reference "LFRD" can also be replaced with any two other variables with write access rights;-one transmitted PDO, used to monitor the drive (Status word "ETAD" and Velocity actual value "RFRD"); in addition, it can be configured to include two additional variables; Status word "ETAD" and Velocity actual value "RFRD" can also be replaced with any two other variables.The communication mode of PDO 6 can be set by the user, depending on their needs: asynchronous (as for PDO 1) or cyclic, based on the reception of a synchronisation object (SYNC). A third mode is also possible, acyclic synchronous, in which the transmitted PDO is sent whenever the value of its data changes, but only during the synchronous “window” allowed by the SYNC object.In asynchronous mode "Inhibit time" and "Event timer" can be modified.SDO (Service Data Objects)SDO telegrams are used for configuration and setup. PLCs realise acyclic messaging through SDOs.The Altivar 31 manages one SDO, characterised by two COB-IDs:•one for the requests (telegrams issued by the PLC and intended to the Altivar 31);•one for the answers (telegrams sent back to the PLC by the Altivar 31)The Altivar 31 supports segment transfer.Other services•Default assignment of identifiers (COB-IDs), based on address;•NMT service: Start_Remote_Node (16#01), Stop_Remote_Node (16#02), Enter_Pre_Operational (16#80), Reset_Node (16#81), Reset_Communication (16#82);•Acceptance of broadcast on COB-ID 0;•Heartbeat object (for Altivar 31 version V1.2 and above only);•Node guarding object;•Emergency object (EMCY);•SYNC service, for the second set of PDOs (PDO 6).Service not available•Time stamp object (TIME)Address on the bus (Node-ID)Node-ID = address of the drive on the CANopen bus.“Client” designates an entity that transmits a telegram destined to the variable speed drive (example: PLC).Description of the supported identifiers (COB-IDs)Identifiers will be referred to, by their COB-ID (etc) in the removing sections of this user’s manual.The Altivar 31 supports the automatic assignment of COB-IDs, calculated using its CANopen address (only for PDOs of PDO1).Direction COB-ID DescriptionClient C Drive 000 (16#000)Network ManagemenT service (NMT)Client C Drive 128 (16#080)SYNChronisation service (SYNC)Client C Drive 12816#080+ Node-ID EMergenCY service (EMCY)Client B Drive 38416#180+ Node-ID Drive monitoring (transmitted PDO of PDO 1)Client C Drive 51216#200+ Node-ID Drive control (received PDO of PDO 1)Client B Drive 64016#280+ Node-ID Drive and motor monitoring (transmitted PDO of PDO 6)Client C Drive 76816#300+ Node-ID Drive and motor control (received PDO of PDO 6)Client B Drive 140816#580+ Node-ID Answer to drive adjustment (transmitted SDO)Client C Drive 153616#600+ Node-ID Request of drive adjustment (receive SDO)Client C Drive 179216#700+ Node-IDNetwork management (NMT, Node Guard, Heartbeat)ClientBDriveNetwork management (Bootup protocol)Click on the “hil scher” button (enclosed in a red box above) to start the SyCon configuration tool. N.B. This button is not displayed if you have not installed SyCon on your PC.Adding the Altivar 31 EDS files to the CANopen devices managed by SyCon The EDS file that describes the Altivar 31 must be imported underClick on “OK” to return to the SyCon main window.The node device we selected appears at the selected position:Run the “Node…” command from the “Insert” menu (or click on thethe position where you want to add the Altivar 31, then left-These operations are summarised here:Disable the “Automatic COB-ID allocation in accordance with Profile 301” option by unchecking the associated checkbox; please note that this is only useful (and mandatory in this case!) if you intend to use one or both of the PDO 6 parameters.31 is the only slave on the CANopen bus and you do use the two PDOs of PDO 6 with their default mapping. If you configure other slaves on the same fieldbus, or if you alter the PDO configuration of the Altivar 31, the previously described input and output words allocation would be different. Should this happen, SyCon features a command that allows you to view the entire set of inputs and outputs: execute the “Address Table…” command of the “View” menu in order to do so.This chapter describes the various CANopen services of the drive, listed in accordance with their increasing COB-IDs.Any data whose length exceeds one byte is set LSB first and MSB last in a CANopen frame.Control of the NMT state machine (COB-ID = 16#000)Frame description Client C Drive(1)If Node-ID = 0, the “Command Specifier” is broadcasted to all CANopen slaves (Altivar 31 included); each one must then execute this NMT command, thus passing the corresponding transition (see below).Example: Transition to Pre-Operational state (Enter_Pre-Operational_State = 16#80) of the Altivar 31 located at CANopen address 4(16#04).COB-IDByte 0Byte 10(16#000)Command Specifier(CS)Node-ID (1)Command Specifier (CS)Meaning001 (16#01)Start_Remote_Node 002 (16#02)Stop_Remote_Node128 (16#80)Enter_Pre-Operational_State 129 (16#81)Reset_Node130 (16#82)Reset_Communication16#00016#8016#04Synchronisation object - SYNC (COB-ID = 16#080)Client C DriveThe SYNC object is cyclically emitted by the CANopen master.It does not include any data, hence limiting its frame to its sole COB-ID.The main purpose of this object is to allow to use the synchronous communication modes of the CANopen slaves. Thus, in the case of the Altivar 31, the PDO 6, if used, can be set on one of the possible synchronously cyclic or acyclic communication modes.Emergency Object - EMCY (COB-ID = 16#080 + Node-ID)Client B Drive An EMCY object is sent by the Altivar 31 to the other CANopen devices, with high priority, whenever an internal error appears (Byte 2 = 1)or disappears (Byte 2 = 0). An EMCY will never be repeated.The Emergency Error Code is the same as the variable "Fault code" (603F), refer to the user’s manual "Communication variables".COB-ID 128(16#080)COB-ID Byte 0Byte 1Byte 2Byte 3Byte 4Byte 5Byte 6Byte 7128(16#080)+Node-IDEmergency Error Code Error register 0LSBMSB=0 (no fault)=1 (fault)This set of PDO is compliant with the “drive and motion profile” of the DSP-402 specification.It is herein referred to as “PDO 1”.The default settings of the communication mode of PDO 1 must not be changed and its value (255) corresponds to the default communication mode of the drive profile: asynchronous , with the monitoring PDO being sent by the drive whenever the value of its data change.In addition, the object mapping of its frames cannot be changed, i.e. only the Control word "CMDD" and Status word "ETAD" can be exchanged between the Altivar 31 and a client. Both the first monitoring PDO and the first control PDO include only two bytes of data.Finally, the set of PDO 1 and the set of PDO 6 can be used at the same time but only to a certain extent and under special conditions (see the chapters describing these second PDOs).Monitoring PDO 1 (COB-ID = 16#180 + Node-ID)Client B DriveExample: The Altivar 31 located at CANopen address 4 (COB-ID = 16#180 + 4) is in the state "Operation Enabled" and has no fault (Status word "ETAD" = 16#xxx7). In the current example, Status word "ETAD" is equal to 16#0607.Control PDO 1 (COB-ID = 16#200 + Node-ID)Client C DriveExample: The Altivar 31 located at CANopen address 4 (COB-ID = 16#200 + 4) receives the command called “Enable operation” (Control word "CMDD" = 16#xxxF). In the current example, Control word "CMDD" is equal to 16#000F.COB-ID Byte 0Byte 1384(16#180)+Node-IDStatus word "ETAD"LSBMSB16#18416#0716#06COB-ID Byte 0Byte 151216#200+Node-IDControl word "CMDD"LSBMSB16#20416#0F16#0031323334Error control protocols (COB-ID = 16#700 + Node-ID)Bootup protocolClient B Drive Node guarding protocolDescriptionThe monitoring of the communication between the Client (the NMT master) and the Drive is either achieved using the Node Guarding protocol, described here, or with the Heartbeat protocol, described thereafter. Only one of these two protocols may be active at any given time!Client C DriveThe Client polls the drive and any other NMT slave at regular time intervals using “remote transmit requests.” Each NMT slave is assigned a specific time period for this poll, called “life time”. Its value may be changed via the two parameters “guard time” (16#100C: 16#00) and “life time factor” (16#100D: 16#00). The “life time” is given by the “guard time” multiplied by the “life time factor”.By default, the Node Guarding Protocol is inhibited on the Altivar 31 (the “guard time” and “life time factor” parameters are both set to 0).Client B Drive The response of the Drive contains its NMT state in the “NMT information” field, described here:Bit 7 = Toggle bit: the value of this bit must alternate between two consecutive responses from the Drive. The value of the toggle bit of the first response after the node guarding protocol becomes active is 0. It is only reset to 0 when a “Reset_Communication” command is passed to the Drive (see chapter Network management state chart (NMT State Machine), page 25). If a response is received with the same value of the toggle-bit as in the previous response, then the new response is handled as if it was not received.Bits 6-0 = NMT state: Current NMT state of the Altivar 31: Stopped (16#04), Operational (16#05), or Pre-Operational (16#7F).If the Drive does not transmit its response or if it transmits an incorrect state, the Client triggers a "Node Guarding" event.If, after its “life time” has elapsed, the Drive does not receive any polling:•it triggers a "Life Guarding" event,•goes to COF fault (CANopen communication fault),•and sends an emergency telegram (EMCY).COB-ID Byte 0This protocol is used to signal that the Drive has entered the node state Pre-Operational after the state Initialising.The only data byte sent in a bootup protocol frame is always equal to 16#00.1792(16#700)+Node-ID16#00COB-ID Byte 01792(16#700)+Node-IDNMT information353637General contents of the object dictionaryThe general breakdown of the Altivar 31 object dictionary is the same for all CANopen devices:Objects from the communication profile areaThis area contains the communication specific parameters for the CANopen network. All entries that appear here are common to ALL CANopen devices.Index Object 16#0000Unused16#0001 - 16#001F Static data types16#0020 - 16#003F Complex data types16#0040 - 16#005F Unused (Manufacturer specific complex data types)16#0060 - 16#007F Device profile specific static data types 16#0080 - 16#009F Device profile specific complex data types 16#00A0 - 16#0FFF Reserved for further use 16#1000 - 16#1FFF Communication profile area 16#2000 - 16#5FFF Altivar 31 specific profile area 16#6000 - 16#9FFF Standardised device profile area 16#A000 - 16#FFFFReserved for further useIndex Sub-index Access Type Default value Description 16#100016#00RO Unsigned 3216#00010192Device type:Bits 16-23 = Device type mode (1)Bits 00-15 = Device profile number (402)16#100116#00RO Unsigned 0816#00Error register: Error (1) or no error (0)16#100316#00RW Unsigned 0816#00Number of errors: No error (0) or one or more errors (>0) in object 16#1003; only the value 0 can be written 16#01RO Unsigned 3216#00000000Standard Error Field:Bits 16-31 = Additional information (all 0s)Bits 00-15 = Error code 16#100516#00RW Unsigned 3216#00000080COB-ID SYNC message:You should not modify this object value!16#100816#00RO Visible String “ATV31”Manufacturer device name16#100A 16#00RO Visible String “0301”Manufacturer software version: The value given here is only an example (V3.1)16#100B 16#00RO Unsigned 32(Node-ID)Node-ID: This object receives the value of the Node-ID configured for the Altivar 3116#100C 16#00RW Unsigned 1616#0000Guard Time: By default, the Node Guarding Protocol is inhibited; the unit of this object is 1 ms.16#100D 16#00RW Unsigned 0816#00Life Time Factor: Multiplier applied to the “Guard Time” in order to obtain a “Life Time”16#100E 16#00RW Unsigned 3216#00000700+ Node-ID Node Guarding Identifier: COB-ID used for the Node Guarding Protocol 16#100F 16#00RO Unsigned 3216#00000001Number of SDO supported16#101416#00RO Unsigned 3216#00000080+ Node-ID COB-ID Emergency message: COB-ID used for the EMCY service16#101616#00ROUnsigned 0816#01Consumer Heartbeat Time - Number of entries 16#01RW Unsigned 3216#00000000Consumer Heartbeat Time:Bits 16-23 = Node-ID of the producer Bits 00-15 = Heartbeat time (unit = 1 ms)N.B. Only one heartbeat producer can be configured here! By default, no producer is monitored.16#101716#00RW Unsigned 1616#0000Producer Heartbeat Time: The unit of this object is 1 ms. By default, the Altivar 31 sends no Heartbeat messages.16#101816#00RO Unsigned 816#01Identity object - Number of entries16#01ROUnsigned 3216#0000005FIdentity object - Vendor ID: This value is unique for each manufacturer.Index Sub-index Access Type Default value Description16#120016#00RO Unsigned 816#02Server SDO - Number of entries16#01RO Unsigned 3216#00000600+ Node-IDServer SDO - COB-ID Client Drive (receive) 16#02RO Unsigned 3216#00000580+ Node-IDServer SDO - COB-ID Client ⇦ Drive (transmit)16#140016#00RO Unsigned 816#02Receive PDO1 - Number of entries16#01RW Unsigned 3216#00000200+ Node-IDReceive PDO1 - COB-ID16#02RO Unsigned 816#FFReceive PDO1 - Transmission type:The onlyavailable mode for this PDO is “asynchronous” (PDOsent when its data value changes)16#140516#00RO Unsigned 816#02Receive PDO6 - Number of entries16#01RW Unsigned 3216#00000300+ Node-IDReceive PDO6 - COB-ID16#02RW Unsigned 816#FFReceive PDO6 - Transmission type: Three modesare available for this PDO: “asynchronous” (255),“synchronously cyclic” (1-240), and “synchronouslyacyclic” (0)16#160016#00RO Unsigned 816#01Receive PDO1 mapping - Number of mappedobjects16#01RO Unsigned 3216#60400010Receive PDO1 mapping - 1st mapped object: Controlword "CMDD" (16#6040)16#160516#00RW Unsigned 816#02Receive PDO6 mapping - Number of mappedobjects: 0 to 4 objects can be mapped for this PDO 16#01RW Unsigned 3216#60400010Receive PDO6 mapping - 1st mapped object: Controlword "CMDD" (16#6040)16#02RW Unsigned 3216#60420010Receive PDO6 mapping - 2nd mapped object: Velocityreference "LFRD" (16#6042)16#03RW Unsigned 3216#00000000Receive PDO6 mapping: No 3rd mapped object16#04RW Unsigned 3216#00000000Receive PDO6 mapping: No 4th mapped object16#180016#00RO Unsigned 816#05Transmit PDO1 - Number of entries16#01RW Unsigned 3216#00000180+ Node-IDTransmit PDO1 - COB-ID16#02RO Unsigned 816#FFTransmit PDO1 - Transmission type:The onlyavailable mode for this PDO is “asynchronous” (PDOsent when its data value changes)16#03RW Unsigned 1630Transmit PDO1 - Inhibit time:Minimum timebetween two transmissions; unit = 1 ms16#04RW Unsigned 8__Transmit PDO1 - Reserved16#05RW Unsigned 16100Transmit PDO1 - Event timer:In “asynchronous”mode, this object sets a minimum rate oftransmission for this PDO; unit = 1 ms16#180516#00RO Unsigned 816#05Transmit PDO6 - Number of entries16#01RW Unsigned 3216#00000280+ Node-IDTransmit PDO6 - COB-ID16#02RW Unsigned 816#FFTransmit PDO6 - Transmission type: Three modesare available for this PDO: “asynchronous” (255),“synchronously cyclic” (1-240), and “synchronouslyacyclic” (0)16#03RW Unsigned 1630Transmit PDO6 - Inhibit time:Minimum timebetween two transmissions; unit = 1 ms16#04RW Unsigned 8__Transmit PDO6 - Reserved16#05RW Unsigned 16100Transmit PDO6 - Event timer:In “asynchronous”mode, this object sets a minimum rate oftransmission for this PDO; unit = 1 ms3839Objects from the Altivar 31 specific profile areaThe parameters of this area are not described in the present user’s manual.Please refer to the user’s manual "Communication variables" of the Altivar 31 for a full description of these Altivar 31 specific parameters.Objects from the standardised device profile areaThe parameters of this area are not described in the present user’s manual.Please refer to the user’s manual "Communication variables" of the Altivar 31 for a full description of these parameters.Index Sub-index Access Type Default value Description16#1A0016#00RO Unsigned 816#01Transmit PDO1 mapping - Number of mapped objects16#01RO Unsigned 3216#60410010Transmit PDO1 mapping - 1st mapped object: Status word "ETAD" (16#6041)16#1A0516#00RW Unsigned 816#02Transmit PDO6 mapping - Number of mapped objects: 0 to 4 objects can be mapped for this PDO 16#01RW Unsigned 3216#60410010Transmit PDO6 mapping - 1st mapped object: Status word "ETAD" (16#6041)16#02RW Unsigned 3216#60440010Transmit PDO6 mapping - 2nd mapped object: velocity actual value "RFRD" (16#6044)16#03RW Unsigned 3216#00000000Receive PDO6 mapping: No 3rd mapped object 16#04RWUnsigned 3216#00000000Receive PDO6 mapping: No 4th mapped objectVVDED303093EN 2003-10atv31_CANopen_EN_V1。

施耐德-Modicon-M340-PLC-通讯问题

施耐德-Modicon-M340-PLC-通讯问题

施耐德Modicon M340 PLC 通讯问题1、主站与从站不通讯能够导致此问题出现的可能是:(1)主站与从站地址不一致(2)主站与从站传输速度波特率不一致(3)从站的参数设置调节不完善(4)从站的参数设置调节后没有断电从新启动方法:◆主站波特率参数设置鼠标双击下图箭头所指的“CANopen”上面两步完成主站波特率参数设置◆从站波特率参数设置与CANopen地址设定(1)变频器设定参照变频器说明书进行设定,设定完成后需要断电从新启动设定值才生效。

例:ATV 31H 异步电机变频器主要参数设定(参照ATV 31H说明书)。

◆电机参数的设定---------------------说明书中第26页◆功能访问等级---------“L3”--------说明书中第46页◆配置给定1------------“CRn”-------说明书中第46页◆混合模式-------------“SIN”-------说明书中第48页◆电机缺相故障配置-----“NO” -------说明书中第89页◆ CANopen:变频器地址---“”-----------说明书中第93页◆ CANopen:传输速度------“”----------说明书中第93页注:◇“CANopen:变频器地址”值设定必须与从站硬件组态保持一致,如图(26)所示此时CANopen:变频器地址就应该设定为“2”◇“CANopen:传输速度”值设定必须与图(25)“传输速度”保持一致(2)CANopen模块设置见上图CANopen模块箭头所示,上面两个旋钮“Ten”“Zero”为地址设定,该岛在从站的地址小于10时“Ten”也必须调到“0”位置,否则即为地址错误设定不能通讯连接。

下面的“Autobaut”旋钮为波特率设定,其各档位对应的波特率依据该模块侧面的参数说明。

调节该模块各档位时一定要在断电模式下进行,否则设置是无效的。

2、电脑与PLC不通讯能够导致此问题出现的可能是:(1)通讯方式与“设置地址”不一致对应当前的通讯模式“MODBUS”或“USB”在上图的“设置地址”正确选择对应的地址模式。

M340

M340
19
用LD语言对传送带进行编程
项目调试 (1/6)
需求 分析 创建项目 声明变量 用LD编程 生成代码 调试 专业化定制
一旦分析无错,我们就可以连接到PLC仿真器对应用程序进行调试。
2
1
选择 PLC / Connect 菜单。 底部的状态栏显示了仿真器的状 态。
仿真器开始运行。
3 ?
状态栏显示 Unity Pro中打开的项 目和仿真器中的项目不相同。 备注: 状态栏里的 ? 显示仿真器并没有运行任何有效的项 目。
需求 分析 创建项目 声明变量 用LD编程 生成代码 调试 专业化定制
用已经声明的变量逐步进行编程
双击 该对象,进入对 象属性对话框
3
1
2
输入变量名 然后 点击 OK 确认
选择对象的类型, 然后放置到合适 的位置
选择 对象类型 并确认.
4
备注: 下拉框内提示的对象类型总是与所选的对象保持一致
16
用LD语言对传送带进行编程
9
创建项目(2/3)
需求 分析 创建项目 声明变量
用LD语言对传送带进行编程
用LD编程 生成代码 调试 专业化定制
对项目进行命名和保存:
Machine
用File/Save菜单保存项目 (*.STU file).
4
右键单击 Station,选择 Properties 菜单,为项目命名, 还可根据需要添加注解
备注 PLC仿真器可以模拟整个项目中与用户相关的各种任务,但是其动态执行性能还是无法与真正的PLC相提并论。
17
用LD语言对传送带进行编程
项目分析和初次生成 (2/3)
需求 分析 创建项目 声明变量 用LD编程 生成代码 调试 专业化定制
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Unity M340与ATV31CANopen通信向导<一> ——CANopen通信控制启停、CANopen通信给定速度本向导分为两部分:1.《快速操作指南》---Know How, 满足了客户“快速解决调试问题”的需求。

●发送快---大小在2M左右,能方便快速地通过电子邮件发给客户使用●调试快---提供了反复调试过的完整准确的PLC通信程序,客户可直接下载●接线快---含有实物照片的通信接线图使客户非常容易理解和模仿,并且快速完成接线●设置快---图形化的变频器参数设置指导使客户可直接上手设置参数,不用查找手册2.《完全通信指导》---Know Why, 满足了客户“系统学习通信知识”的需求。

●知识全---不仅给出了详细的调试步骤和详细解释,还使客户在完成通信的同时系统学习相关的产品和通信知识●考虑全---对客户调试可能遇到的各种突发情况给出了相关提示和解决方法●理解易---提供了程序指令和结构的详细注释,使客户能容易的理解和学习提供的标准程序并能在原有程序上进行扩展第二部分完全通信指导重要信息注意:在尝试安装、操作或调试设备之前,请仔细阅读下述说明并通过查看来熟悉设备。

下述特别信息可能会在文本其他地方或设备上出现,提示用户潜在的危险和注意事项,或提供阐明或简化某一过程的信息。

遵守使用说明,可能导致调试失败、人身伤害甚至设备损坏。

此符号的注意事项,以避免不必要的调试错误。

目录1. 实验简介 (4)2. 硬软件环境 (4)3. ATV31变频器设置 (5)3.1 操作说明 (5)3.2 参数设置 (6)3.2.1 控制方式 (7)3.2.2 通信参数 (8)4. 硬件连接 (10)5. PLC编程 (11)5.1 硬件组态 (11)5.1.1 组态CPU (11)5.1.2 组态CANopen主站 (12)5.1.3 配置CANopen网络和从站 (13)5.2 ATV31 内部变量说明 (15)5.2.1 ATV31 内部字 (15)5.2.2 ATV31 DRIVERCOM流程 (16)5.3 编程 (17)6. 实验调试 (20)6.1 计算机与PLC的连接 (20)6.2 软件调试 (22)6.3 ATV31常见通信故障 (23)7. 带多台变频器 (24)7.1 硬件扩展 (24)7.2 软件扩展 (25)7.1.1 同一变频器通信多个变量 (25)7.1.2 连接多个变频器 (25)8. 附件 (26)8.1 Unity M340程序 (26)8.2 ATV31的CANopen用户手册 (26)8.3 ATV31编程手册 (26)8.4 Unity M340 CANopen现场总线用户手册 (26)1. 实验简介在施耐德电器的控制系统中,PLC通过CANopen监控变频器的运行是工业中较常见的应用,本文以施耐德M340 PLC与ATV31变频器为例,简要介绍PLC与变频器之间CANopen通信的过程,包括硬件接线、变频器参数设置、硬软件组态、上电调试等,实现在PLC上远程控制ATV31变频器的故障初始化,启动/停止,正转/反转,频率给定等。

本文只介绍了PLC通过CANopen通信远程控制变频器,关于CANopen通信控制和端子控制混合使用的情况,以及其他施耐德PLC,如TWIDO,Premium与ATV31的CANopen通信,将在本书的其他文章中介绍。

2. 硬软件环境主要软件:Unity Pro V3.1。

Unity Pro是施耐德电器支持Quantum,Premium,M340的通用编程,调试和运行的软件包。

3. ATV31变频器设置3.1 操作说明ATV31的前面板说明如下:ATV31操作面板按上下键一直按住上下键秒)可快速滚动浏览菜单;存储选定项,长按ENT键,当存储数值时,显示器会闪烁。

正常显示状态:无故障出现和无起动时,正常显示有如下几种:-频率:SUP-菜单中所选的参数的显示(缺省选项:加到电机上的输出频率)。

在电流限制模式下,显示器会闪烁。

-init:初始化顺序-rdY:变频器就绪-dcb:直流注入制动正在进行-nSt:自由停车-FSt:快速停车-tUn:正在进行自动整定故障显示状态:显示器闪烁指示出现的故障,故障的具体内容以及操作,请参照附件8.3《ATV31编程手册》的《故障-原因-解决方案》章节。

任何初始显示状态下,均可以按ENT键进入设置菜单。

ENTENT3.2 参数设置ATV31的主菜单如下,所有的参数均在主菜单的子目录里面进行设置。

3.2.1 控制方式配置给定1设定如下:控制模式设置如下:本例中控制和频率给定全部由通信给定,将控制模式设置为SIN组合模式,与出厂设置相同;用户需根据实际情况进行模式选择。

禁止电机缺相故障设置如下:当变频器最小输出电流大于电机额定电流时需要禁止电机缺相故障。

此处是否禁止,视用户测试的状况而定。

3.2.2 通信参数参数路径参数说明值功能描述CON-AdCo 从站地址 1. 范围1-127CON-bdCo 传输速率500 可选择10/20/50/125/250/500/1000kbps从站地址设置如下:通信速率设置如下:4. 硬件连接本文使用的M340集成CANopen 通信口,通过标准的CANopen 直连电缆TCS CCE 4F3M05(长度0.5m)或TCS CCE 4F3M1(长度1m)连接ATV31变频器,系统的硬件构架和连接如下:3标准RJ45接头屏蔽双绞线TCS CCE 4F3M**通信口,M340 的自带CANopen 通信口;,标准的CANopen 直连电缆,一端为RJ45头,另一端为SUB D 9孔连接头; 总线的终端,在CAN_H 和CAN_L 两端跨接一个120欧姆的电阻; 的RJ45端口作为CANopen 通信的定义;5. PLC 编程本例中的PLC 组态和编程全部采用Unity Pro 3.1完成。

Unity Pro 是施耐德电器支持Quantum ,Premium ,M340的通用编程、调试和运行的软件包。

PLC 编程主要包括硬件组态和软件编程两个部分。

5.1 硬件组态硬件组态本例中的硬件组态采用Unity Pro 3.1。

Unity Pro 是施耐德电器支持Quantum ,Premium ,M340的通用编程,调试和运行的软件包。

组态步骤如下: 5.1.1 组态CPU双击打开硬件组态5.1.2 组态CANopen主站址和数量输出数据存储起始地址和数量配置CANopen通信参数5.1.3 配置CANopen网络和从站先双击打开CANopen网络配置页面选择成功后,回到CANopen网络和从站配置页面。

双击ATV31图标,以进入ATV31从站配置页面。

双击ATV31进入ATV31有两组预定义的PDO :第一组PDO(PDO1强制适用于所有模式)包括:设置完毕后,并点击右下脚显示Receive PDO6 parameterTransmit PDO6 parameter目标速度 启用Transmit PDO6 parameter启用Receive PDO6 parameter5.2 ATV31 内部变量说明在M340 PLC中编写程序,将变频器的内部变量映射到本地寄存器,通过对本地寄存器进行读写,来完成对变频器的监控。

5.2.1 ATV31 内部字5.2.2 ATV31 DRIVERCOM流程变频器的内部操作遵循DRIVERCOM流程,见下图:ATV31的DRIVERCOM流程5.3 编程程序主要是编写DRIVERCOM流程:ATV31的内部状态转换都遵循DRIVERCOM流程。

在线控制命令和给定速度,在运行状态输出频率有效。

由于变频器的内部字已经映射到本地寄存器%MW,所以直接对%MW100、%MW103、%MW201、%MW202进行编程即可。

详细程序见附件8.1 Unity M340程序。

变量声明:在中进行变量声明,如下:需要定义的变量如下:梯形图程序:6. 实验调试用户在上电调试之前,请务必确保PLC,变频器以及所带的电机的接地安全,以避免因接地问题而可能造成的人身伤害和设备损坏。

警告6.1 计算机与PLC的连接本例中计算机和PLC的连接采用常用的USB方式。

连接电缆即常规的USB电缆.(即家用数码相机,MP3的连接电缆均可),连接图如下:步骤动作&示例1 将Unity Pro的连接模式切换到标准模式:Standard Mode为标准模式;Simulation Mode为仿真模式。

2 设置PLC连接方式为USB将Media设置为USB,Address设置为SYS。

3 地址设置完毕后点击Test Connection进行连接测试,测试成功后会显示如下提示:6.2 软件调试计算机和M340连接后,完全下载程序并运行CPU ,在Unity Pro 的在线数据监控表Animation Table 中添加如下变量,并给值:初始状态时,变频器CANopen 可能处于Fault 状态(Fault=1),此时需要用Rst_fault 进行复位。

On_plus 表示为一上升沿脉冲,此例中每一个命令均为上升沿有效,即置为1后,再置回0,否则下一个命令无效。

当命令为反转时,显示的频率为负数。

ATV31内部详细操作流程,请参照5.2.2 ATV31 DRIVERCOM 流程。

本例的详细程序请参见附件中的Unity M340程序。

126.3 ATV31常见通信故障出现通信故障或者变频器故障时,变频器会自动停止输出。

在此例中,常见故障是COF(CANopen bus fault)通信故障,通信故障之后变频器会自动停止输出,并在液晶显示器上显示*Freq_set为CPU的内部的频率给定值见6.2 软件调试其他更多ATV31变频器的故障-原因-解决方案,请参照附件8.3《ATV31编程手册》的故障-原因-解决方案章节。

7. 带多台变频器本例只是对单个变频器进行控制,对于多个变频器连接的情况,需要对硬件和软件进行扩展。

7.1 硬件扩展施耐德提供专门的设备对CANopen设备进行扩展,常用的扩展拓扑图如下:132451)S1/S2/S3均为RJ45母连接器,接ATV31变频器;S3可连接PowerSuite或远程终端;2)S4/S5为CANopen端子排,连接CANopen主线电缆;3)连接(ON)或断开(OFF)连接于CANopen总线的120欧姆终端电阻,当此连接器位于CANopen总线的中间时,开关拨到OFF位置,当此连接器位于CANopen总线的终端时,拨到ON位置,连接终端电阻;CANopen总线上必须使用线路终端电阻。

4)用于接接地导线的接地片;5)干线电缆。

相关文档
最新文档