Contec CPS-PC341EC-1-9201 Getting Start Guide

Type
Getting Start Guide

The Contec CPS-PC341EC-1-9201 is a compact and powerful programmable logic controller (PLC) designed for a wide range of industrial automation applications. With its built-in EtherCAT master port, it can easily communicate with EtherCAT slave devices, enabling you to create a distributed control system. The PLC also features 16 digital inputs, 16 digital outputs, and 2 analog inputs, making it suitable for various applications such as machine control, data acquisition, and process automation.

The Contec CPS-PC341EC-1-9201 is a compact and powerful programmable logic controller (PLC) designed for a wide range of industrial automation applications. With its built-in EtherCAT master port, it can easily communicate with EtherCAT slave devices, enabling you to create a distributed control system. The PLC also features 16 digital inputs, 16 digital outputs, and 2 analog inputs, making it suitable for various applications such as machine control, data acquisition, and process automation.

Program an EtherCAT Control System
__ Getting Started Guide 1
1
2
1. Objective
Show how to program a sample EtherCAT control system by using a Contec EtherCAT slave
device, DIO-1616LN-CAT.
Because the built-in CODESYS Runtime software, the Contec CONPROSYS PAC series
controllers are suitable runtime controllers for EtherCAT control systems that can be
programmed by any of the IEC-61131-3 standard PLC program languages without additional
development software costs.
Before invest a Contec EtherCAT master controller, you can invest an EtherCAT slave device,
DIO-1616LN-CAT first and program a sample EtherCAT control program under a free of
charge CODESYS Integrated Development Environment (IDE).
In this guide, the EtherCAT master controller will be simulated by the development PC that
runs the CODESYS IDE software. It is trying to help you to find that by using Contec
CONPROSYS PAC controllers, built-in CODESYS Runtime system devices, it is very easy to
program an EtherCAT control system under the CODESYS Integrated Development
Environment.
Note: The simulated EtherCAT master controller (simulation PLC) is not a real time device and actives one hour.
3
2. Necessary Hardware Devices and Software products
Hardware:
A computer (Running CODESYS Integrated Development System) with one LAN (Ethernet) port and
another network to connect internet (download CODESYS IDE system and necessary library).
A Contec DIO-1616LN-CAT unit (EtherCAT Slave unit of digital signal Input and Output)
One Contec POA201-10-2 power supply (12VDC power supply)
One LAN cable
Wires
One +12VDC or +24VDC power supply
Software
CODESYS Integrated Development Environment (Download from CODESYS store free of charge)
WinPCap: an open source library for packet capture and network analysis for the Win32 platforms.
(Download from winpcap.org free of charge)
4
3. Download the CODESYS
CODESYS Development System can be downloaded from the CODESYS Store.
(1) Access to the following URL and click [download].
The CODESYS is constantly updated, therefore, be certain to download the latest system.
http://store.codesys.com/codesys.html
(2) In the popup window, click “>>Go to Loging or Create an Account”
5
3. Download the CODESYS
(3) In the “Registered Customers”, enter your “Email Address” and “Password” to log in.
If you are a new customer, complete user registration in the “New Customers”.
(To register as a private customer may be easier to download the IDE soon.)
(4) Click [Download] again, then download will be started.
In this guide, the version of the IDE is “CODESYS V3.5 SP10 Patch2”.
(5) Execute the downloaded file, then proceed to the installation of the CODESYS development environment.
(Note: the installation may take more than one hour.)
6
4. Download package program
To use Contec products in the CODESYS system, a CODESYS package program is necessary.
(1) Download the CODESYS package .zip file from CONTEC web site.
http://www.contec.com/products/downloadusa.cgi?HTML=DTL&KATA=CPS-PC341EC-1-9201&KATASIKI=cps-pc&BUNRUI=0,0,0&SYUBETU=0#3
Download file: [CONPROSYS PAC Series120.zip]
Unzip the downloaded file to [CONTEC CONPROSYS PAC Series.package]
7
4-1. Download packet library software
Using the development PC to simulate an EtherCAT master controller, a WinPcap open source library
software is needed.
Download the [WinPcap_4_1_3.exe] or the latest version of the WinPcap library software
from winpcap.org web site.
(1) Download and run the executable
(2) Follow the instructions on the screen. The installation applet will automatically detect the operating
system and install the correct drivers
(3) The WinPcap-based applications are now ready to work
(These three instructions are from the winpcap.org web page.)
After installation, restart the development PC.
8
5. Connect Devices
1) Connect LAN port of development PC with “IN” port of DIO-1616LN-CAT via Ethernet cable.
(The factory default setting of IP address “IN” port is [192.168.1.101]. Subnet mask is [255.255.255.0]. )
2) Power on the development PC.
3) Supply +12VDC power to the EtherCAT device.
4) Change network setting for PC. Because the default IP address of the “IN” port of the DIO-1616LN-CAT
is [192.168.1.101], therefore, set the IP address of the development PC to [192.168.1.102] and the subnet
mask to [255.255.255.0].
5) Confirm the communication of the development PC with the EtherCAT slave device by using “ping
command”. (ping 192.168.1.101).
9
6. Connect signals of DIO-1616LN-CAT
Connect output connector to input connector.
+12VDC
to
+24VDC
GND
To External Power Supply
10
7. Start Development System
Start the CODESYS Integrated Development Environment from the short-cut icon or from the Windows
Program list.
Note: In this guide, the version of CODESYS development system is “CODESYS V3.5 SP10 Patch 2”.
11
7-1. Install CODESYS package for CONPROSYS file
1) From the CODESYS system menu, select [Tools] – [Package Manager…].
2) From the Package Manager window, click [Install…], then select the downloaded package file:
[CONTEC CONPROSYS PAC Series.package] to start the package file installation. (Refer to page 6,
“4. Download package program”).
Note: This package is only needed to be installed once.
12
8. Create a New Project
(1) Select [File] [New project] on the CODESYS menu.
(2) In the New Project dialog, select [Projects] from the Categories and [Standard project] from the Templates.
(3) Specify the Name and the Location of the project, then click [OK].
13
8. Create a New Project
(4) In the Standard Project dialog, select the controller device and programming language.
Select [CODESYS ControlWin V3 (3S Smart Software Solutions GmbH] as the controller device.
Select [Structured Text (ST)] for this sample program.
Then click [OK].
14
9. Add EtherCAT Master Device
Right click the [CODESYS Control Win V3] device, select [Add Device], from the [Add Device] window,
select [EtherCAT Master 3S-Smart Software Solutions GmbH] from [Fieldbuses] [EtherCAT] [Master], click
[Add Device] button. Then close the [Add Device] window.
Right Click
15
10. Add EtherCAT Slave Device
1) Right-click on the [EtherCAT_Master (EtherCAT Master)] icon in the device window and select the [Add
Device].
2) From the [Add device] window, select the [Fieldbuses] - [EtherCAT] - [Slave] -
[CONTEC Co., Ltd. ECAT-DIO Units] [DIO-1616LN-CAT (16 Inputs and 16 Outputs)].
Right Click
16
11. Start PLC
(1) Start Windows System tray.
(2) Click the PLC icon the click the “Start PLC” command.
(Using similar procedure to stop the PLC).
(1)
Stopped PLC
Started PLC
(1)
(2)
(2)
(3) A runtime program will be downloaded into this simulation PLC.
(4) This simulation PLC can be active less than three hours and the executing time is not real time guaranteed.
17
12. Set Communication
(1) On the Device window, double click the control device [CODESYS Control Win V3].
(2) Select [Communication Settings] in the control device tab.
(3) Enter [192.168.1.102] into the right text-box, then press [Enter] key on your keyboard.
If the color of the circle changes to green, it indicates the communication of IDE and
LAN port of the development PC has been established.
(1)
(2)
(3)
18
13. Network Configuration of EtherCAT Device
1) Double click the [EtherCAT_Master (EtherCAT Master)] icon on the device window to open the
configuration window.
2) In [General] tab, click [Browse] button and from the popup window, select [Local Area Connection].
Double Click
19
14. Configure EtherCAT I/O Mapping
1) Double click the [DIO_1616LN_CAT (DIO-1616LN-CAT (16 Inputs and 16 Outputs))] icon on the device
window.
2) In the [DIO-1616LN-CAT]configuration window, select [EtherCAT I/O Mapping].
3) Double click on [Variable] row and define the DO0-7 byte as [DOPORT0], DO8-15 byte as [DOPORT1],
and DI0-7 byte as [DIPORT0] respectively.
Double Click
20
15. Write Control Program
1) Double click the [PLC_PRG] icon on the Devices window to open the program window.
2) In the [PLC_PRG] program window, write the following program.
i) Set a data from 0 to 255 to DOPORT0 variable;
ii) Output the data to digital output port 0; (The outputted signals are wired to Input 0 connector).
iii) Output the Inputted data to digital output port 1;
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27

Contec CPS-PC341EC-1-9201 Getting Start Guide

Type
Getting Start Guide

The Contec CPS-PC341EC-1-9201 is a compact and powerful programmable logic controller (PLC) designed for a wide range of industrial automation applications. With its built-in EtherCAT master port, it can easily communicate with EtherCAT slave devices, enabling you to create a distributed control system. The PLC also features 16 digital inputs, 16 digital outputs, and 2 analog inputs, making it suitable for various applications such as machine control, data acquisition, and process automation.

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI