18 Customization
Copying the program for another drive
The instructions below outline how to copy the program
of a drive in CoDeSys for a second drive.
1. In the left pane, in the
POUs
tab, right-click
PRG_Drive1 (PRG)
and click
Copy Object
.
A Copy Object dialog opens.
2. Change the name if necessary and click
OK
.
The new drive program appears in the POUs tab.
3. Double-click the new drive in the
POUs
tab.
4. In the
modbus RTU communication function block
, change the
SLAVE
number to
match that of the new drive.
5. In the
POUs
tab, double-click
PLC_PRG
(PRG)
.
6. Right-click the gray bar with
0001
on it (see the
picture) and click
Copy
.
7. Right-click again and click
Paste
.
The copied instance of the program appears below
the first one.
8. Double-click the name of the new block and
change it to PRG_Drive2.
9. Click
Project > Rebuild all
.
10. Click
Online > Login
.
11. Click
Online > Create boot project
.
Information on LineCom1 as a global variable
The LineCom1 variable, which must be connected to all LINE_TOKEN inputs of all
ACS3XX_COM_MOD_RTU function blocks in all programs, must be declared as a global
variable. This is already done in the example program and can be seen below:
1
2
3
4
8
5
6
Содержание ACS355 series
Страница 1: ...Application guide ACS355 and AC500 eCo...
Страница 4: ......
Страница 14: ...14 Configuration The status of the function blocks is displayed...
Страница 28: ...28 Function blocks and program structure...
Страница 29: ......