Contec CPSN-PCB271-S1-041 Reference guide

Category
Networking
Type
Reference guide
Reference Manual
(Software)
CONTENTS
CODESYS Modbus Master CPU Unit
CPSN-PCB271-S1-041
Introduction .................................................................. 5
Safety Precautions .................................................... 11
Set the Computer Network ................................... 15
CONPROSYS nano WEB Setting.......................... 21
CODESYS Installation .............................................. 49
Basic Programming .................................................. 55
Programing with CODESYS ................................... 76
Maintenance ............................................................ 133
Troubleshooting ..................................................... 137
Appendix ................................................................... 140
Customer Support and Inquiry ......................... 152
2
Table of Contents
Introduction ....................................................................... 5
1. Procedure until ready to use .............................................................................................................................. 6
2. Related manuals ...................................................................................................................................................... 7
3. Check the firmware version ................................................................................................................................ 8
4. About the product ................................................................................................................................................. 9
5. Features ................................................................................................................................................................... 10
Safety Precautions ........................................................... 11
1. Safety Information............................................................................................................................................... 12
2. Handling Precautions ......................................................................................................................................... 13
3. Security Warning .................................................................................................................................................. 14
1. Information security risks ........................................................................................................................... 14
2. Security measures e.g. ............................................................................................................................. 14
Set the Computer Network ............................................ 15
1. Connect with a PC ............................................................................................................................................... 16
2. Set the Computer Network.............................................................................................................................. 17
1. Computer Network Setting Procedure (for Windows 10)............................................................. 17
3. Check Communication ...................................................................................................................................... 20
CONPROSYS nano WEB Setting ..................................... 21
1. CONPROSYS nano WEB Setting Outline .................................................................................................... 22
1. Setup Using a Web Browser ..................................................................................................................... 22
2. Setting the Browser ...................................................................................................................................... 22
3. Start up CONPROSYS nano WEB Setting............................................................................................. 23
4. CONPROSYS nano WEB Setting Basic Operation............................................................................. 24
2. Menu Function List ............................................................................................................................................. 25
3. Function Details.................................................................................................................................................... 26
1. System ............................................................................................................................................................... 26
2. I/O Module ...................................................................................................................................................... 28
3. Network Time ................................................................................................................................................. 33
4. Log ...................................................................................................................................................................... 34
5. System ............................................................................................................................................................... 35
6. Log Information ............................................................................................................................................. 37
7. Firmware Update ........................................................................................................................................... 39
8. Configuration File ......................................................................................................................................... 40
9. Time Adjustment ........................................................................................................................................... 41
10. Default Setting ............................................................................................................................................... 42
11. PLC Program ................................................................................................................................................... 43
12. Save & Reboot ............................................................................................................................................... 44
13. Save .................................................................................................................................................................... 45
14. Reboot ............................................................................................................................................................... 46
3
Table of Contents
15. Shutdown ......................................................................................................................................................... 47
16. Logout ............................................................................................................................................................... 48
CODESYS Installation ...................................................... 49
1. Installation of the CODESYS ............................................................................................................................ 50
2. Installation of the Package ............................................................................................................................... 52
3. PC and CONPROSYS nano cable connection ........................................................................................... 53
Basic Programming ......................................................... 55
1. Nomenclature of CODESYS Components .................................................................................................. 56
1. Device window, Device Configuration window ................................................................................. 56
2. ST Editor window .......................................................................................................................................... 56
2. Format and programming of ST language ................................................................................................ 57
3. Basic programming procedure ...................................................................................................................... 59
1. Create a New Project ................................................................................................................................... 59
2. Connect controller from CODESYS ........................................................................................................ 60
3. Add I/O modules ........................................................................................................................................... 61
4. I/O Variable Definition ................................................................................................................................ 62
5. Create a program and build ..................................................................................................................... 63
6. Download and run program ..................................................................................................................... 64
7. Save the PLC program into ROM ............................................................................................................ 65
8. Delete the PLC program saved in ROM ............................................................................................... 67
9. If an error occurs under the CODESYS development environment .......................................... 68
4. Interface definition per model........................................................................................................................ 69
1. Parameter ......................................................................................................................................................... 69
2. I/O Mapping.................................................................................................................................................... 69
3. Serial Port ......................................................................................................................................................... 75
Programing with CODESYS............................................. 76
1. Serial Communication........................................................................................................................................ 77
1. Device setting ................................................................................................................................................. 77
2. Create a Project ............................................................................................................................................. 77
3. Serial Communication Library setting ................................................................................................... 77
4. Create a transmission program ............................................................................................................... 78
5. Create a reception program ..................................................................................................................... 80
2. Modbus Master .................................................................................................................................................... 84
1. Device setting ................................................................................................................................................. 84
2. Create a Project ............................................................................................................................................. 84
3. Add Modbus Devices (When using Modbus TCP) ........................................................................... 85
4. Add Modbus Devices (When using Modbus RTU) .......................................................................... 88
5. Create a Project ............................................................................................................................................. 91
6. Create and build a program ..................................................................................................................... 93
7. Download and run program ..................................................................................................................... 94
3. Modbus Slave........................................................................................................................................................ 95
1. Device setting ................................................................................................................................................. 95
4
Table of Contents
2. Create a Project ............................................................................................................................................. 95
3. Add Modbus Devices (When using Modbus TCP) ........................................................................... 96
4. Add Modbus Devices (When using Modbus RTU) .......................................................................... 98
5. I/O Variable Definition .............................................................................................................................. 100
6. Create and build a program ................................................................................................................... 102
7. Download and run program ................................................................................................................... 102
8. Data input and output from Modbus Master .................................................................................. 103
4. File Access............................................................................................................................................................. 106
1. File Access Library setting ........................................................................................................................ 106
2. Function list ................................................................................................................................................... 106
3. Data type ........................................................................................................................................................ 107
4. Function details............................................................................................................................................ 108
5. Sample ............................................................................................................................................................. 113
5. PLC program data retention .......................................................................................................................... 123
1. PERSISTENT Variable Definition ............................................................................................................ 123
2. Sample ............................................................................................................................................................. 124
6. Control Flow of I/O Module .......................................................................................................................... 125
1. CPSN-DI-16BCL............................................................................................................................................ 125
2. CPSN-CNT-3201I ......................................................................................................................................... 129
Maintenance ................................................................... 133
1. Maintenance ........................................................................................................................................................ 134
2. Save a File ............................................................................................................................................................. 135
1. Procedure ....................................................................................................................................................... 135
3. Write a File ........................................................................................................................................................... 136
1. Procedure ....................................................................................................................................................... 136
Troubleshooting ............................................................. 137
1. If You Encounter a Problem? ......................................................................................................................... 138
2. General ............................................................................................................................................................ 138
Appendix ........................................................................ 140
1. Hardware Specifications ................................................................................................................................. 141
2. Software Specifications ................................................................................................................................... 142
1. CPU Unit ......................................................................................................................................................... 142
2. I/O Module .................................................................................................................................................... 144
3. LED........................................................................................................................................................................... 150
4. Push Switch (SW) ............................................................................................................................................... 151
Customer Support and Inquiry .................................... 152
1. Services .................................................................................................................................................................. 153
5
Introduction
This section provides necessary information of the product
such as the product configuration and manuals before
actual use.
Introduction
CPSN-PCB271-S1-041 Reference Manual (Software)
6
1. Procedure until ready to use
The following chart shows the standard procedure until the product is ready to use.
Connect with a PC
Refer to
Page 16
Set up the network of PC
Refer to
Page 17
Set up with CONPROSYS nano WEB Setting
Refer to
Page 21
Set Password
Refer to
Page 26
Save the settings
Refer to
Page 44
Set up the product
Refer to Reference
Manual (Hardware)
*This procedure can be different depending on the user's environment or system types.
Introduction
CPSN-PCB271-S1-041 Reference Manual (Software)
7
2. Related manuals
The manuals related to the product are listed below.
Read them as necessary along with this document.
Must read the following manuals.
Name
Contents
How to get
Product Guide
opening the package.
This lists the product
configuration and
describes the
precautions.
Included in the package
(Printed matter)
Reference Manual for I/O
Module (Hardware)
the I/O module with CPU
Unit.
This describes the
hardware aspects such as
functions and settings of
the I/O module.
Download from
the CONTEC
website (PDF)
Reference Manual for
CPSN-PCB271-S1-041
(Hardware)
the product. functions and
This describes the
hardware aspects such as
functions and settings.
Download from
the CONTEC
website (PDF)
Reference Manual for
CPSN-PCB271-S1-041
(Software)
the "CONPROSYS nano
WEB Setting"
This describes how to set
each function of
"CONPROSYS nano WEB
Setting".
Download from
the CONTEC
website (PDF)
Download manuals
Download the manuals from the following URL.
Download
https://www.contec.com/download/
Introduction
CPSN-PCB271-S1-041 Reference Manual (Software)
8
3. Check the firmware version
Before running the product, visit our website to check the firmware version and update to the latest
one if necessary.
Updating firmware to the latest version will resolve troubles and stabilize the operation.
Download
https://www.contec.com/download/
* Refer to the Firmware Update (page 39)for further details.
Introduction
CPSN-PCB271-S1-041 Reference Manual (Software)
9
4. About the product
This product is a CPU unit with RS-232C, LAN interface and four expansion slots, and supports
CODESYS programming and Modbus Master. Configurable I/O modules of the CONPROSYS nano
series can be arranged and combined along with the product to satisfy the user’s needs.
Introduction
CPSN-PCB271-S1-041 Reference Manual (Software)
10
5. Features
The product features the CODESYS SoftPLC
CODESYS is a device-independent-PLC-programming system that is compliant with the IEC 61131-3 standard and supports all standard
programming languages such as ST or LD.
Compatible with Modbus TCP Master and Modbus RTU
Master
*1
Modbus is a communication protocol widely adopted in the industrial sector.
Controlling and collecting data from devices with Modbus slave function can be conducted.
*1 When using the product with RS-422A/485 (multi-drop supportable), adding the CPSN-COM-1PD module is necessary.
11
Safety Precautions
Understand the following definitions and precautions to
use the product safely. Never fail to read them before using
the product.
Safety Precautions
CPSN-PCB271-S1-041 Reference Manual (Software)
12
1. Safety Information
This document provides safety information using the following symbols to prevent accidents
resulting in injury or death and the destruction of equipment and resources.
Understand the meanings of these labels to operate the equipment safely.
DANGER
DANGER indicates an imminently hazardous situation which, if not
avoided, will result in death or serious injury.
WARNING
WARNING indicates a potentially hazardous situation which, if not
avoided, could result in death or serious injury.
CAUTION
CAUTION indicates a potentially hazardous situation which, if not
avoided, may result in minor or moderate injury or in property damage.
Safety Precautions
CPSN-PCB271-S1-041 Reference Manual (Software)
13
2. Handling Precautions
CAUTION
The specifications of the product are subject to change without notice for enhancement and
quality improvement. Even when using the product continuously, be sure to read the manual
in the CONTEC’s website and understand the contents.
Do not modify the software.
CONTEC will bear no responsibility for any problems, etc., resulting from modifying the
software.
Regardless of the foregoing statement, CONTEC assumes no responsibility for any errors that
may appear in this document or for results obtained by the user as a result of using the
software.
Safety Precautions
CPSN-PCB271-S1-041 Reference Manual (Software)
14
3. Security Warning
When connecting to the network, be aware of security-related problems. See the examples of
Security measures below and set up the product properly along with the network devices.
1. Information security risks
Unauthorized access from the outside through a network could cause the system halt, data
damage, or exposure to malware. *1
Invaded and used as a stepping stone, a device might attack the others through networks. (a
victim becomes an assailant)
Information might leak without realizing due to the connection to the network.
Secondary damages such as harmful rumors, liability in damages, social credibility fall, and
opportunity loss are expected led by the troubles described above.
*1: Malware (Malicious Software) is software that brings harm to a computer system and performs
unintended operations.
2. Security measures e.g.
Do not keep using the default password. (Refer to the product manual for the password
setting).
Set a strong password.
Combined with upper and lowercase letters, and numbers so that it cannot be easily
analogized by others.
Change the password periodically.
Disable unnecessary network services and functions.
Restrict access to the network with network devices. *2
Restrict ports to be released on the network with network devices. *2
Create a closed network connection using such as dedicated network or VPN*3
*2: Inquire for setting procedure to manufacturers.
*3: VPN (Virtual Private Network) a secured network that wards off unauthorized access by
protecting the communication path with authentication and encryption.
Unfortunately, there are no perfect ways to avert unauthorized access or close a security hole
that are endlessly found day and night.
Please understand that risks are always involved with the Internet connection, and we strongly
recommend a user should constantly update information security measures.
15
Set the Computer
Network
This section describes how to connect the product with a
PC, set the network, and check the communication.
Set the Computer Network
CPSN-PCB271-S1-041 Reference Manual (Software)
16
1. Connect with a PC
To set the product, you need to first set up the network between the PC and the product in order to
establish communication.
First, connect the product with the PC.
1 Follow the instructions below to connect the computer, the controller, and the power unit.
* Refer to Reference Manual (Hardware)for how to create a power cable.
2 Connect the power unit with AC plug, then turn on the computer.
Set the Computer Network
CPSN-PCB271-S1-041 Reference Manual (Software)
17
2. Set the Computer Network
Follow the Computer Network Setting Proceduredescribed below and set the network to make the
IP addresses as shown.
The product must set a unique IP address for the bold part (200 or 101) that is not used by other
devices on your network.
* If proxy is set to your PC, do not use the proxy.
1. Computer Network Setting Procedure (for Windows 10)
1 Click the [Network & Internet] on [Windows Settings] screen.
2 Click the [Change adapter options] in [Network status].
Set the Computer Network
CPSN-PCB271-S1-041 Reference Manual (Software)
18
3 Double-click the appeared [Ethernet]
4 Click the [Property] in [Ethernet Status] dialog box.
5 Double-click the [Internet protocol version 4(TCP/IPv4)] in [Ethernet Properties] dialog box.
Set the Computer Network
CPSN-PCB271-S1-041 Reference Manual (Software)
19
6 In the [Internet protocol version 4 (TCP/IPv4) property], set IP address and Subnet mask as
shown below.
7 Click the [OK] the [OK] the [Close] to close the dialog box and complete the network
setting.
Set the Computer Network
CPSN-PCB271-S1-041 Reference Manual (Software)
20
3. Check Communication
1 Start the Internet Explorer 11 on your computer. Enter IP address (10.1.1.101) of the controller
in the address bar, then press [Enter] key.
The dialog box asking for the Password appears, enter it and click the [Login].
* Refer to Setup Using a Web Browser (page 22) for details of compatible web browser.
* For an actual operation, change Password in [Settings] [System] on CONPROSYS nano WEB
Setting page.
* After entering IP address and pressing [Enter] key, the Security certificatemight appear on the
screen. Choose Continue to this website”.
2 If CONPROSYS nano WEB Setting page appears, it indicates the success of the communication
between the computer and the controller.
  • 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
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59
  • Page 60 60
  • Page 61 61
  • Page 62 62
  • Page 63 63
  • Page 64 64
  • Page 65 65
  • Page 66 66
  • Page 67 67
  • Page 68 68
  • Page 69 69
  • Page 70 70
  • Page 71 71
  • Page 72 72
  • Page 73 73
  • Page 74 74
  • Page 75 75
  • Page 76 76
  • Page 77 77
  • Page 78 78
  • Page 79 79
  • Page 80 80
  • Page 81 81
  • Page 82 82
  • Page 83 83
  • Page 84 84
  • Page 85 85
  • Page 86 86
  • Page 87 87
  • Page 88 88
  • Page 89 89
  • Page 90 90
  • Page 91 91
  • Page 92 92
  • Page 93 93
  • Page 94 94
  • Page 95 95
  • Page 96 96
  • Page 97 97
  • Page 98 98
  • Page 99 99
  • Page 100 100
  • Page 101 101
  • Page 102 102
  • Page 103 103
  • Page 104 104
  • Page 105 105
  • Page 106 106
  • Page 107 107
  • Page 108 108
  • Page 109 109
  • Page 110 110
  • Page 111 111
  • Page 112 112
  • Page 113 113
  • Page 114 114
  • Page 115 115
  • Page 116 116
  • Page 117 117
  • Page 118 118
  • Page 119 119
  • Page 120 120
  • Page 121 121
  • Page 122 122
  • Page 123 123
  • Page 124 124
  • Page 125 125
  • Page 126 126
  • Page 127 127
  • Page 128 128
  • Page 129 129
  • Page 130 130
  • Page 131 131
  • Page 132 132
  • Page 133 133
  • Page 134 134
  • Page 135 135
  • Page 136 136
  • Page 137 137
  • Page 138 138
  • Page 139 139
  • Page 140 140
  • Page 141 141
  • Page 142 142
  • Page 143 143
  • Page 144 144
  • Page 145 145
  • Page 146 146
  • Page 147 147
  • Page 148 148
  • Page 149 149
  • Page 150 150
  • Page 151 151
  • Page 152 152
  • Page 153 153
  • Page 154 154
  • Page 155 155

Contec CPSN-PCB271-S1-041 Reference guide

Category
Networking
Type
Reference guide

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

Finding information in a document is now easier with AI