tutorial codesys – hmi wientek · 6. codesys v3.5 sp12 patch 6 7. codesys control win v3 codesys...

14
TUTORIAL CODESYS – HMI WIENTEK This tutorial to make a simple program for HMI Weintek to Codesys using the modbus TCP protocol. Required programs and objects: 1. HMI Weintek MT8071iP 2. Power Supply 24V 3. Lan Cable 4. Personal Computer 5. EasyBuilderPro 6. Codesys V3.5 SP12 patch 6 7. Codesys Control Win V3 CODESYS Steps: 1. Open CODESYS V3.5 SP12 patch 6 2. Create a new standard project, with the device being Codesys Control Win V3, choose your preferred language for the PLC_PRG, but what you choose would not matter to make a simple project here.

Upload: others

Post on 31-Oct-2020

228 views

Category:

Documents


8 download

TRANSCRIPT

Page 1: TUTORIAL CODESYS – HMI WIENTEK · 6. Codesys V3.5 SP12 patch 6 7. Codesys Control Win V3 CODESYS Steps: 1. Open CODESYS V3.5 SP12 patch 6 2. Create a new standard project, with

TUTORIAL CODESYS – HMI WIENTEK

This tutorial to make a simple program for HMI Weintek to Codesys using the modbus TCP protocol.

Required programs and objects:

1. HMI Weintek MT8071iP

2. Power Supply 24V

3. Lan Cable

4. Personal Computer

5. EasyBuilderPro

6. Codesys V3.5 SP12 patch 6

7. Codesys Control Win V3

CODESYS Steps:

1. Open CODESYS V3.5 SP12 patch 6

2. Create a new standard project, with the device being Codesys Control Win V3, choose your

preferred language for the PLC_PRG, but what you choose would not matter to make a simple

project here.

Page 2: TUTORIAL CODESYS – HMI WIENTEK · 6. Codesys V3.5 SP12 patch 6 7. Codesys Control Win V3 CODESYS Steps: 1. Open CODESYS V3.5 SP12 patch 6 2. Create a new standard project, with
Page 3: TUTORIAL CODESYS – HMI WIENTEK · 6. Codesys V3.5 SP12 patch 6 7. Codesys Control Win V3 CODESYS Steps: 1. Open CODESYS V3.5 SP12 patch 6 2. Create a new standard project, with

3. Right Click on the Device (CODESYS Control Win V3), and press Add Device

Page 4: TUTORIAL CODESYS – HMI WIENTEK · 6. Codesys V3.5 SP12 patch 6 7. Codesys Control Win V3 CODESYS Steps: 1. Open CODESYS V3.5 SP12 patch 6 2. Create a new standard project, with

4. That will open the add device window. Expand Fieldbusses , Ethernet Adapter, and click on the

Ethernet. Press Add device.

Page 5: TUTORIAL CODESYS – HMI WIENTEK · 6. Codesys V3.5 SP12 patch 6 7. Codesys Control Win V3 CODESYS Steps: 1. Open CODESYS V3.5 SP12 patch 6 2. Create a new standard project, with

5. Ethernet will be added to the devices list. Click on the Ethernet. Expand Modbus and add the

ModbusTCP Slave device. Close the Add Device window.

6. Set up your HMI, power it with the power supply, and connect it to your personal computer with

a LAN cable.

7. Double Click device in the devices list.

8. Find your personal computer in the gateway-1 and choose set active path

Page 6: TUTORIAL CODESYS – HMI WIENTEK · 6. Codesys V3.5 SP12 patch 6 7. Codesys Control Win V3 CODESYS Steps: 1. Open CODESYS V3.5 SP12 patch 6 2. Create a new standard project, with

9. Double click Ethernet in the devices list. That will open a tab as shown below. Click the button

with 3 dots on the right side of the interface input. This will open the network adapters window.

10. Choose the connection of the LAN Cable between your Personal Computer with your HMI, and

press OK.

Page 7: TUTORIAL CODESYS – HMI WIENTEK · 6. Codesys V3.5 SP12 patch 6 7. Codesys Control Win V3 CODESYS Steps: 1. Open CODESYS V3.5 SP12 patch 6 2. Create a new standard project, with

11. On Modbus TCP Slave Device Tab, on always update variable: choose Enabled 2

12. Run Codesys Contro Win V3 for run PC as PLC.

13. Click Gateway (1) and then click Scan network (2).

Page 8: TUTORIAL CODESYS – HMI WIENTEK · 6. Codesys V3.5 SP12 patch 6 7. Codesys Control Win V3 CODESYS Steps: 1. Open CODESYS V3.5 SP12 patch 6 2. Create a new standard project, with

14. Click PLC in the list (3) that you want to connect, and click Set Active Path (4)

15. Press ALT+F8 or Online -> Login, then press F5 or Debug -> Start.

Page 9: TUTORIAL CODESYS – HMI WIENTEK · 6. Codesys V3.5 SP12 patch 6 7. Codesys Control Win V3 CODESYS Steps: 1. Open CODESYS V3.5 SP12 patch 6 2. Create a new standard project, with

EASYBUILDER PRO Steps :

1. Open EB Pro program on desktop shortcut named "Ultility Manager".

2. Choose / click “Easybuilder Pro”.

Select New Project then choose iP Series according to the HMI model used. In this demo

using the type "iP Series MT807iP".

*HMI Model can be seen on the back of the device or in the user manual paper in the

box product.

Page 10: TUTORIAL CODESYS – HMI WIENTEK · 6. Codesys V3.5 SP12 patch 6 7. Codesys Control Win V3 CODESYS Steps: 1. Open CODESYS V3.5 SP12 patch 6 2. Create a new standard project, with

.

3. Select the system parameter settings menu. Then select new device/server then make

the configuration as in the picture. Click OK.

Page 11: TUTORIAL CODESYS – HMI WIENTEK · 6. Codesys V3.5 SP12 patch 6 7. Codesys Control Win V3 CODESYS Steps: 1. Open CODESYS V3.5 SP12 patch 6 2. Create a new standard project, with

change the IP to your personal computer’s LAN IP.

4. Create 2 numeric object with address type 3x and 4x. and one slider with address type

4x. Select Device MODBUS TCP/IP.

<- Slider & numeric object icon.

Page 12: TUTORIAL CODESYS – HMI WIENTEK · 6. Codesys V3.5 SP12 patch 6 7. Codesys Control Win V3 CODESYS Steps: 1. Open CODESYS V3.5 SP12 patch 6 2. Create a new standard project, with
Page 13: TUTORIAL CODESYS – HMI WIENTEK · 6. Codesys V3.5 SP12 patch 6 7. Codesys Control Win V3 CODESYS Steps: 1. Open CODESYS V3.5 SP12 patch 6 2. Create a new standard project, with

5. Select menu tab project, click download (PC -> HMI).

Make sure the PC IP and HMI IP in one segment.

The default HMI Device IP is 192.168.0.211.

Change your PC IP to 192.168.0.111 or 192.168.0.222 for example.

6. Click Search and select HMI-cf8 and click download.

Page 14: TUTORIAL CODESYS – HMI WIENTEK · 6. Codesys V3.5 SP12 patch 6 7. Codesys Control Win V3 CODESYS Steps: 1. Open CODESYS V3.5 SP12 patch 6 2. Create a new standard project, with

7. The simulation should be appear on HMI Display.