Modbus

Ethernet Enabled
Soft Logic controller
ADAM-5510EKW/TP
Cai Qin
Application Engineer
Agenda
•
KW Softlogic PLC Introduction
- Hardware Specification
- DIP Switch setting
- Multiprog Software
- Configuration & Programming & Downloading
•
Function Enhance
- Communication Function
- Modbus Functions
- Remote I/O
- ADAM ModBus OPC
- Create Your Own Function Block
- ADAM5000 Function Library
•
Communion and Share
- 基于软逻辑控制器ADAM-5510KW的列车真空集便监控系统的实现与应用
- ADAM5510KW控制器在制盐技改中的应用
- UsingFiles
- Some Problems
KW Softlogic PLC Introduction
3.Download
5.Active I/O by controller
ProCon Realtime OS
ADAM-5510EKW/TP
1.KW Development Tools
—Multiprog Software 4.Kernel Execute Code
2.Compile
ADAM-5510KW Series
Soft Logic Controller
ADAM-5510KW
ADAM-5510EKW
4-slot SoftLogic Controller
8-slot SoftLogic Controller
w/o Ethernet
ADAM-5510EKW/TP
8-slot Ethernet SoftLogic Controller
Ethernet-enabled
4-Slot
8-Slot
Hardware Specification
CPU:
X86(80188-40)
KW kernel: ProCon Realtime OS
OS:
KW Procon OS Å ROM-DOS
Memory: Program Æ70KB(150KB for
5510KW/5510EKW)
KW Source File Æ 512KB
SRAM:
640KB
Retain (User) Æ7KB (16KB for
5510KW/5510EKW)
Modbus (User)Æ4KB(16KB for
5510KW/5510EKW)
Slot:
8/4
Remote IO:Up to 255 ADAM-4000 modbus
series modules .
Protocol: Modbus/RTU & Modbus/TCP
I/O Module: All ADAM-5000 module
WDT: - Operating System WDT( 1.6 s)
- KW application watchdog
- Modbus server communication watchdog
Real-time Clock: Yes
Communication: COM1/2/4(RS232/485)
5000 Series Modules
ADAM-5510EKW/TP COM Port
ADAM-5510EKW/TP
DIP Switch Setting
ADAM-5510KW DIP Switch Setting
ID = 0 is reserved by system configuration.
KW Softlogic PLC Introduction
• IEC61131-3 Standard.
• Support Language: LD, FBD,
SFC , ST & IL
• GUI Interface
• Monitoring Data Trend
• PID Control Component
• Multitask Structure
• Cross-Language in Single
Task
• Customization FB Library
KW Softlogic PLC Introduction
Work Area
Project
Area
Function
Library Are
Configuration and Programming
• Configuration
Step 1 :Open New Project
Step 2 :Select the Template
Step 3 :Set up Communication Port
Step 4 :Setting Data Area
Step 5 :Define the I/O Module (Type,Range,
Memory Location…)
Configuration
•
Step 2 :Select Template (Template for ProConOS DOS)
Configuration
Default Main Task
Configuration
•
Step 3-1 :Setup Communication Port
Right Click on it
Configuration
•
Step 3-2 : Setup Communication Port
Configuration
Step 3-2-1 :Setup TCPIP Address
a: Select DLL Option from Port
b: Setup IP , Default IP:10.0.0.1
Configuration
•
Step 4-1 :Setup Data Area
Configuration
•
Step 4-2 :Setup Data Area
Configuration
•
Step 4-3 :Save as Template
Configuration
• Step 5-1 : Define the I/O Module
Double Click on it
Configuration
• Step 5-2 : Define the I/O Module
Define the Input and Output Module separately
Configuration
• Step 5-3 : Define the I/O Module
1.IO Name
2.Logical Address
3.Board I/O Module
Data Length For Adam-5510KW I/O
AI/O 1 channel for 2 Bytes; DI/O 1 channel for 1 bit
Configuration
• Step 5-4 : Define the I/O Module
1.Driver Version
2.Slot
3.Module Name
4.Advance (For AI/AO module)
5.ADAM5510KW system setup
Configuration
• Step 5-5 : ADAM5510KW System setup
New Function to setup IP Address
After download the setting,
IP address will be changed.
Configuration
• Step 5-6 : Define the I/O Module
Add the Module step by step and the configuration
procedure will be done.
Configure on ADAM-5510EKW/TP
It should be under Initial Mode
Configure on ADAM-5510EKW/TP
It should be under Running Mode
Programming
•
Step 1 : Check the communication status
Project control dialog
It shows the communication
status is normal
Programming
•
Step 2 : Open Working Area
Double Click
Open Working Area
Programming
•
Step 3 : Start Editing
Click on the work area and the
cross sign show up.
You can start editing your project.
Programming
•
Step 4 : Start Editing
Double Click on the Function Block
Programming
•
Step 4-1 :Start Editing
Variable Properties
Define the data pin on each pin
Programming
•
•
Step 4-2 : Define the Variable Name and Data Type
and I/O Address
location and size prefixes for
located variables:
Programming
•
Step 4-4 :Compile
Compile
Message
Programming
• Step 4-5 : Download project to controller
1.Stop
2.Reset
3.Download
Programming
•
Step 4-6 : Download the project .
1
2. Press the download button
3. Download percentage.
Programming
•
Step 4-7 : Download the project .
4. Download
5. Press the Activate button
Programming
6. Also download at this method
Download Program
Download Source
Download Firmware
File or other Files
Programming
•
Step 4-8 : Start Run the project .
7. Cold or warm boot
Programming
•
Step 4-8 : Online Monitoring
Debug
Click on “DEBUG” to process
the online monitoring
Function Enhancement
•
•
•
•
•
•
Communication Function
Modbus Functions
Remote I/O
ADAM ModBus OPC
Create Your Own Function Block
ADAM5000 Function Library
通信功能----编程连接(1)
• 通过COM1/RS232 运行 Multiprog协议,用于下载程序、
在线监控程序运行
通信功能----编程连接(2)
• 通过COM2 RS485 运行 Multiprog协议,用于下载程序、
在线监控程序运行
通信功能----编程连接(3)
• 通过以太网 运行 Multiprog协议,用于下载程序、在线监控
程序运行
通信功能----MODBUS/RTU连接(1)
•
通过COM1 RS232(485) 运行 Modbus/RTU slave协议,可以方便
和组态软件及其它支持Modbus协议的软件接口。
通信功能----MODBUS/RTU连接(2)
• 通过COM2 RS485 运行 modbus/RTU slave协议
通信功能----MODBUS/RTU连接(3)
• 通过COM4 RS485 运行 modbus/RTU master协议 ,可
扩展支持MODBUS协议的Remote I/O module或第三方
智能仪表。
通信功能----MODBUS/RTU连接(4)
• 通过COM4
RS485 运行
modbus/RTUMa
ster协议
• 通过
COM2(COM1)
RS485 运行
modbus/RTUSla
ve协议
通信功能----MODBUS/TCP连接(1)
• 通过以太网 运行 Modbus/TCP Server协议
通信功能----MODBUS/TCP连接(2)
• 通过以太网 运行 Modbus/TCP Client协议
通信功能----通用串口连接(1)
支持ADAM
协议的模块
• COM4/RS485,支持通用协议
• 可扩展支持ADAM协议的Remote I/O module
• 使用ADAM5000.fwl中的COM_FB Function block
通信功能----通用串口连接(2)
• 通过使用ADAM-5090扩展
标准RS232串口,用户可
以自由编程连接各种通讯
设备
• 使用ADAM5000.fwl中的
COM_FB Function block
Function Enhancement
•
•
•
•
•
•
Communication Function
Modbus Functions
Remote I/O
ADAM ModBus OPC
Create Your Own Function Block
ADAM5000 Function Library
Modbus Functions
Support Modbus Functions:
¾ Modbus/RTU Master Function: (COM4)
Connect to Modbus/RTU remote I/O modules such as
Modbus modules of ADAM-4000 series.
¾ Modbus/RTU Slave Function: (COM1/COM2)
Connect to HMI/SCADA software or Modbus master devices
via serial port.
¾ Modbus/TCP Server Function:
Connect to HMI/SCADA software via Ethernet port.
¾ Modbus/TCP Client Function:
Connect to Modbus/TCP remote I/O modules such as ADAM6000 series.
Modbus Address Mapping
¾ For Local Digital Input/Output(BOOL) Module:
00001-00128 按Slot定义
¾ For Local Analog Input/Output(WORD) and Counter(DWORD) Module:
40001-40064 按Slot定义
¾ Remote IO&中间数据!!
先前我们谈規格时有提到在 ADAM-5510KW 的内存里有16K Bytes 的电池备份
区是給 Modbus 用 , 亦即有 16K Bytes 的空间供 User 暂存 , 并通过 Modbus
protocol 对此区域做数据交换 ,存放在此区域的数据不轮是整数或是布尔数,
数据存放都按 WORD (4X) , 所以一共可存放将近8000 个 WORD 的数据。其
Modbus 的地址 ,从 42001~49999 .
Modbus address mapping
* Data Type: BOOL ; BYTE or WORD :
MW3.0 is counted as one Byte of memory location
but the definition for Modbus 4X is “Word”.
It mean MW3.0 + MW3.1 will be mapping to 42001.
1 Byte
Data 1
Data 2
Data 3
%MW3.0
%MW3.2
%MW3.4
%MW3.1
%MW3.3
%MW3.5
42001
42002
42003
Modbus address mapping
* Data Type: DWORD or REAL :
When the data type is “Real”, the data length
will be “4” Bytes and it will be two Modbus
Address.
Data type for Real
Data 1
MW3.0
MW3.1
MW3.2
MW3.3
42001 ; 42002
Data 2
MW3.4
MW3.5
MW3.6
MW3.7
42003 ; 42004
Data 3
MW3.8
MW3.9 MW3.10 MW3.11 42005 ; 42006
Modbus address mapping
* Data Type: Word or Integer
KW Memory Location
%MW3.0 ~ %MW3.16000
Modbus Address
42001 ~ 49999
* Data Type: Boolean
KW Memory Location
%MX3.0.0 ~ %MX3.999.7
Modbus Address
02001 ~ 09999
You can use FB to put data in to
Modbus Address,too.
Exchange Data By Modbus
Modbus by RS485 :
Exchange Data By Modbus
Modbus by RS232 :
The Cable should be crossover
Function Enhancement
•
•
•
•
•
•
Communication Function
Modbus Functions
Remote I/O
ADAM ModBus OPC
Create Your Own Function Block
ADAM5000 Function Library
How to expand I/O ?
Modbus Series Modules
COM 4 (RS-485)
Modbus Protocol
Up to 255 modules
Note : The baud rate for remote I/O is 19200 bps .
How to expand I/O ?
How to expand I/O ?
* COM 4 type adjust :
How to expand I/O ?
* Programming :
Which Adam-4000 series support
ModBus
•
•
•
•
•
•
•
•
•
•
ADAM-4015 RTD Module
ADAM-4015 T Thermistor Module
ADAM-4017+ AI Module
ADAM-4018+ /4019+ Thermocouple Module
ADAM-4022T Dual loop controller
ADAM-4024 AO Module
ADAM-4051 DI Module
ADAM-4055 DI,DO Module
ADAM-4056S/SO DO Module
ADAM-4068/4069 Relay Output Module
ADAM-4000 ModBus Setting
ADAM-4000 ModBus Setting
Length for Remote I/O Module
Command of ModBus
z0 X: Read/Write Coil (DO)
z1 X: Read coil (DI)
z3 X: Read register (AI)
z4 X: Read/Write register (AO)
Function Enhancement
•
•
•
•
•
•
Communication Function
Modbus Functions
Remote I/O
ADAM ModBus OPC
Create Your Own Function Block
ADAM5000 Function Library
ADAM ModBus OPC - 1
ADAM ModBus OPC - 2
ADAM ModBus OPC - 3
Function Enhancement
•
•
•
•
•
•
Communication Function
Modbus Functions
Remote I/O
ADAM ModBus OPC
Create Your Own Function Block
ADAM5000 Function Library
How to create yourself FB
Don’t Forget
Compile!
How to create yourself FB-1
Function Enhancement
•
•
•
•
•
•
Communication Function
Modbus Functions
Remote I/O
ADAM ModBus OPC
Create Your Own Function Block
ADAM5000 Function Library
ADAM5000 Library
We provide many of function blocks to
increase your performance.
The function blocks come with the product
CD for ADAM-5510EKW/TP
The usage is written on the Chapter 6 of
ADAM-5510KW series manual.
ADAM5000 Library
ADAM5000 Library
ADAM5000 Library
(Result-OUT_Low)/(RAW-IN_Low)
= (OUT_HighOUT_Low)/(IN_High-IN_Low)
ADAM5000 Library
ADAM5000 Library
How to input data in to
Modbus Address?
Communion and Share
- 基于软逻辑控制器ADAM-5510KW的列车真空集便监控系
统的实现与应用(MultiTask,Remote I/O,Communication )
- ADAM5510KW控制器在制盐技改中的应用(FPID FB)
- Some Problems
- Using Files
- Some Problems
1.
When Download status: Time out, How to do?
Chenk ID->Resource Setting-> LED Status-> Communicate Cable
-> firmware…
Connect Error, Please
Check…
Connect OK and
Downloading Program
Connect OK and
Program is Running
Connect OK and no
Program is Running
- Some Problems
2. When error “memory error!Out of memory(dynamic memory) ” occur?
pcrtk16 –p130 -> pcrtk16 –pX –dY (X+Y<230)
For Example: pcrtk16 –p60; pcrtk16 –p70 –d150
-
Some Problems
3.
4.
5.
6.
How to update firmware?
How to update IP Address?
How to use Event-Task?
How to use System-Task?
FAQ:
ADAM-5510kw series FAQ-V1.5.doc
- Using Files
5510EKWTP_Drive_D_Files:
- Using Files
3. \Kw-SoftWare\Multiprog\*.dll
- Using Files Development
4. Library\ADAM5000:
ADAM-5510KW的参考文档
1. ADAM5510KW系列手册ver1.0.pdf(简体中文版):
ADAM-5510KW的中文说明书
2. ADAM-5510KW Series Startup Manual Ed-1.pdf (英文版):
ADAM-5510KW的快速入门说明
3. ADAM-5510KW Series Manual Ed-1.pdf (英文版):
ADAM-5510KW的英文说明书
4. Quickstart_MWT.pdf (简体中文版):
Multiprog软件的快速入门说明
5. Multiprog manual.pdf (英文版):
Multiprog软件的使用手册
6. ProConOS manual.pdf (英文版):
ProCon OS操作系统的使用说明
7. Multiprog: Help/FB(Online Help英文版):
Function/Function Block指令集
8. ADAM-5510KW series常见问题解与答