Professional Documents
Culture Documents
This manual describes the procedures for connecting CODESYS V3-compatible devices with the V9 series units as a master.
CODESYS is a software platform for industrial automation technology, which is developed by 3S-Smart Solutions GmbH.
The V9 series supports the Ethernet connection for CODESYS version3.
1 PLC Models
1.1 CODESYS V3 (Ethernet) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Page 2
1.1.1 Communication Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Page 2
1.1.2 Available Device Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Page 4
2 Screen Creation Procedure
2.1 Importing Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Page 7
2.1.1 Registering and Exporting Variables (with CODESYS V3.5) . . . . . . . . . . . . . . . . . . . . . . . . . . . .Page 7
2.1.2 Importing Tags (to V-SFT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Page 9
2.1.3 [Tag Edit] Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Page 11
2.1.4 Editing Registered Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Page 12
2.1.5 Adding Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Page 13
2.1.6 Deleting Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Page 13
2.2 Setting Device Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Page 14
2.3 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Page 16
2.3.1 Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Page 16
2.3.2 Multi-copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Page 17
2.3.3 List of Used Device Memory Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Page 17
2.3.4 Batch Changing Device Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Page 18
2.3.5 Copying From File to File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Page 19
2.3.6 Others . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Page 19
1 PLC Models 1
1 PLC Models
Ethernet Connection
Ladder
PLC Selection on V-SFT CPU Unit/Port Port No. Keep Alive*1
Transfer *2
Default: 11740
Devices compliant
CODESYS V3(Ethernet) Ethernet port (Set the desired number using the
with CODESYS V3
application software.)
*1 For details of the KeepAlive function, refer to the V9 Series Connection Manual.
*2 For details of the ladder transfer function, refer to V9 Series Reference Manual 2.
2 Connection to devices compatible with CODESYS V3
• Connection is possible only by the built-in LAN port of the V9 series. The “CUR-03” communication unit cannot be
used.
• Only the logical port PLC1 can be selected because the tag table is used.
V-SFT Editor
Make the following settings on the editor. For details, refer to the V9 Series Connection Manual.
• IP address for the V9 series unit
- When specified on the screen program:
[System Setting] [Hardware Setting] [Local Port IP Address]
- When specified on the V9 unit:
Local mode [LAN Setting]/[LAN2 Setting]
• Port number for the V9 series unit (for communication with PLC)
[System Setting] [Hardware Setting] [PLC Properties] [Communication Setting]
• Registration of devices to connect
Register on the [PLC Table] in [System Setting] [Hardware Setting] [PLC Properties] [Target Settings].
Up to 16 units in 1 : n communication
• Others
[System Setting] [Hardware Setting] [PLC Properties] [Communication Setting]
PLC
This section describes the connection settings for the software PLC of CODESYS V3.5.
For details on the actual settings for the device to use, refer to the instruction manual of the relevant device.
Software PLC
*1 The ranges given are based on when a maximum value is specified. The maximum setting is 65335, which is the total number of elements
(Index1 Index2 Index3).
Ranges differ according to the created tag.
*2 With multi-dimensional arrays, PLC device memory is allocated from lower bits.
For access in units of words, such as for numerical data display parts, access is done in accordance with the allocation of PLC device
memory.
• BOOL type
When the variable registration on the PLC is “FLAG[4][8]”
When “FLAG[0][0]” is specified for a numerical display part (1 word) on V-SFT, the 16 bits from “FLAG [0] [0]” to “FLAG [1] [7]” are read.
• SINT type
When the variable registration on the PLC is “DATA[2][4]”
DATA (8 bytes)
1 0
3 2 1 0 3 2 1 0
When “DATA [0] [0]” is specified for a numerical display part (1 word) on V-SFT, the 2 bytes from “DATA [0] [0]” to “DATA [0] [1]” are
read.
*3 Only existing data is accessed if the size of the accessed variable is smaller than 2 bytes (1 word) for access in units of words such as for
numerical data display parts.
- DATA (9 bytes)
- 2 1 0
- 2 1 0 2 1 0 2 1 0
When “DATA [2] [2]” is specified for a numerical display part (1 word) on V-SFT, only the single byte of “DATA [2] [2]” is accessed.
*4 For access in units of words, bits 8 to 15 correspond to the next byte device memory.
*5 When the STRING type is used in arrays, the top element of the address for parts, macro commands, etc. becomes “0”.
Any number other than “0” cannot be specified for the top element.
*6 The number of bytes per address for the STRING type data can be set at [Data Length] in the data type setting window.
80 bytes
255 bytes
*7 Set to use STRING type.
e.g.: [Character Display] part
Check the [Use STRING Type] checkbox in the [Detail] menu.
1 PLC Models 5
PLC_CTL
Contents F0 F1 (=$u n) F2
n Target Port No
Acquisition of the ratio of
cycle update list update 1 n+1 Command: 0000H
rate to actual operating 2
(PLC1) n+2 Ratio (%)
time *1 (Time required for update / specified update rate) 100
n+3
n Target Port No
Update rate setting of 1
n+1 Command: 0001H 3
cycle update list *1 *2 (PLC1)
n+2 1 to 65535: Update rate (msec)
n Target Port No
Acquisition of cycle update 1
n+1 Command: 0002H 2
list update rate *1 (PLC1)
n+2 1 to 65535: Update rate (msec)
n Target Port No
n+1 Command: 0003H
n+2 0 to 63: Number of bytes for the application name *3
n+3
PLC status acquisition by 1 Application name *4
: 3+m
the specified application (PLC1)
Status
0: RUN
n+3+m 1: STOP
2: STOP (break point)
255: Status acquisition failure
n Target Port No
n+1 Command: 0004H
Status
n+2 0: RUN
PLC status setting by the 1 1: STOP
4+m
specified application (PLC1)
n+3 0 to 63: Number of bytes for application name *3
n+4
: Application name *4
n+4+(m-1)
n Target Port No
n+1 Command: 0005H
Reset type *5
n+2 0: WARM Reset
1: COLD Reset
PLC reset by the specified 1
2: ORIGIN Reset 4+m
application (PLC1)
n+3 0 to 63: Number of bytes for the application name *3
n+4
: Application name *4
n+4+(m-1)
*1 Can be executed only on the screen program for which [Yes] is selected for [Monitor Registration] in the [Hardware Setting] [PLC
Properties] window.
*2 After the macro command is executed, the cycle update list is updated at the specified rate even after the screen is switched over.
*3 When “0” is specified, all applications are targeted.
*4 When the number of bytes for the application name is set to “0”, the setting is not required.
*5 Reset type details
WARM Reset Stops the project/application and initializes data other than remnant variables and persistent variables.
COLD Reset Stops the project/application and initializes data including remnant variables.
ORIGIN Reset Stops the project/application, initializes all variables and deletes the application from the PLC.
6 Connection to devices compatible with CODESYS V3
Import variables created using CODESYS V3.5 into V-SFT and then specify PLC device memory using the imported variables.
Imported variables are referred to as “tags” in explanations regarding V-SFT. This manual describes variables in explanations
regarding CODESYS V3.5 as “variables” and those regarding V-SFT as “tags”.
Starting up V-SFT
Hardware settings
Exporting variables
created with
PLC properties Page 2
CODESYS V3.5.
Page 7
The tags can be used in V-SFT by importing the data of variables created using CODESYS V3.5.
When connecting multiple devices, variables of each device can be imported.
2. Right-click [Application] and then select [Add object] [Symbol Configuration] to add it.
Right-click
8 Connection to devices compatible with CODESYS V3
4. When the build is complete, check the variables you want to export and click [Build] → [Generate code].
5. The XML file is created into the same directory as the project.
1. Display the [Tag Edit] window from the [CODESYS V3] menu.
Set the PLC number and its port number if using a 1 : n connection.
[Create new]: Imports tags after clearing all registered tags from the screen program.
[Add]: Adds tags to the tags that are already registered in the screen program.
(If a tag with a same name already exists, that tag is not added.)
10 Connection to devices compatible with CODESYS V3
3. Click [Open] after selecting the .xml file exported from CODESYS V3.5.
The import results are displayed and tag information is reflected on the [Tag Edit] window.
• Displayed messages
Message Description
Check if the format of the XML file is correct.
The format of the XML file does not
Only Symbol configuration export file can be
match.
imported into V-SFT.
Failed to import the tag(s) below. The displayed tag information is invalid.
Failed to import n tag(s) due to
n tags' information is incorrect.
unreadable tag name(s).
2 Screen Creation Procedure 11
2.
1.
3.
4. 5.
6.
When any tags are edited on V-SFT, the same modifications must be made to the variables registered on the
ladder tool.
The recommended procedure is to import edited data from the ladder tool.
1. Display the [Tag Edit] window from the [CODESYS V3] menu.
2. A list of tags is displayed. Select the tag to edit and change the “Tag Name”, “Data Type”, and “Comment” settings as
necessary. Also, click [Replace] to replace tags including the specified text.
When any tags are edited on V-SFT, the same modifications must be made to the variables registered on the
ladder tool.
The recommended procedure is to import edited data from the ladder tool.
1. Display the [Tag Edit] window from the [CODESYS V3] menu.
2. Click [Add]. A row is added to the [Tag Edit] window.
Register the “Tag Name” and then the “Data Type” and “Comment” settings.
3. When the settings are complete, click [OK]. The registered tag can now be used for device memory settings.
This section describes the procedure for setting device memory when creating a screen program.
1. Display the [Device Input] window. Select the PLC number from [Type] and the port number if using a 1 : n connection.
Then click [Tag].
5.
1. 7.
2. 6. 8.
9.
3.
10.
4.
Structure data
type tag
Item Description
1. Data type Select the data type.
Perform prefix searches on tags by inputting text in this field.
2. Tag name search field
* Select the [Partial match] checkbox to find partial matches.
Number of elements in an
3. Specify the number of elements in an array when selecting tags defined in arrays.
array
4. Tag list Tags that match with the conditions specified for 1. and 2. are displayed.
Specify the bit number.
5. Bit number specification
* Displayed only for bit device designation.
Select this checkbox to find tag names that partially match with the content of the tag name
6. Partial match
search field.
7. OK Concludes the tag selection.
8. Cancel Quits settings and hides the [Tag Setting] window.
Displays the [Tag Edit] window.
9. Tag Edit
Number of elements
Number of elements
• INT
Bit No.
Port No.
(for 1 : n connection only) Tag name
16 Connection to devices compatible with CODESYS V3
2.3 Notes
2.3.1 Structures
Variables of structured data types registered on the ladder tool can be used as tags in V-SFT by delimiting each member of
the structure and the variable name with a period.
Since structures cannot be defined with V-SFT, if any variables of structure data types are imported, all members will be
registered as individual tags.
- On V-SFT
2.3.2 Multi-copy
The device memory of tags in arrays can be incremented using the [Multi-copy] function.
If the upper limit of the array is exceeded when incrementing, the tag registered next in the tag table is allocated.
Tag table
Data [0] 1234
Data [0] 1234
Data [1] 1234
Data [2] 1234
A 1234
B [0] 1234
Quantity Y: 5
Device INC
Numerical Data Device: Application.PLC_PRG.Data [0]
Step: 1
1. Click [Tool] [Search] [Device]. The [Device Address Use] window is displayed.
2. Select [Cross-reference] and [Device Designation], and specify the range of device memory addresses to search.
To search all of the device memory addresses used in the screen program, deselect [Device Designation].
3. Click [OK] to display a tab window that shows the usage status of device memory addresses in the specified range.
4. To continue searching other ranges, select the [Display] menu of the [Device Address Use] tab window and click [Search
Range Setting] to repeat steps 2 and 3.
* Device memory can be searched not only in the [Device Address Use] window, but also in [Tool] [Search]
[Tag and Device Use] [Device Address Use].
18 Connection to devices compatible with CODESYS V3
Tag table
* If the tag specified for [After Change Start Device] has less elements in the array than the tag before change, the tag
registered next in the tag table is allocated after the last element.
Example: Changing an “Application.PLC_PRG.D [3]” tag to an “Application.PLC_PRG.B [2]” tag
Tag table
Blank
When the connected device set for screen programs differs between the copy source and destination, device memory
addresses will be displayed as “???”. Be sure to reconfigure device memory addresses.
2.3.6 Others
The following functions are not available.
• V-Link connection
• Ethernet function (HKEtn20.dll)
• Indirect device memory designation for macros
• Modbus slave communication (Modbus device memory table)
www.monitouch.com
1(