ACS_COM_MOD_TCP Communication for ACS / DCS Drives via MODBUS TCP¶
Function Block ACS_COM_MOD_TCP controls the MODBUS TCP communication to an ACS / DCS drive and is used for the basic control of ACS / DCS drives with ABB Drives Profile.
Function Block Information
Available in PLC runtime system: | V1.3.2 |
Included in library: | ACSDrivesComModTCP_AC500_V22_App.lib |
Function Block Type: | Function Block with historical values. |
Block Description
Function Block ACS_COM_MOD_TCP controls the MODBUS TCP communication to an ACS / DCS drive and is used for the basic control of ACS / DCS drives with ABB Drives Profile.
Note
If the user changes drive profile while drive is online with PLC, Function Block output’s may give wrong indication.
Reading Status Information from Drive
The Function Block continuously reads data from the drive starting at MODBUS register 400004. So at least the Status Word (SW), Actual Value 1 (SPEED_REF), Actual Value 2 (ACT_VALUE2) are continuously read from the drive and written to the DRIVE_DATA variable. These values are stored in DRIVE_DATA.MSW, ActValue1 and ActValue2.
The following table shows the performed MODBUS read job and the needed mapping in the drive as well as the area where the data is stored in the AC500.
Note
Please refer the respective drives / fieldbus module manual for parameter setting, if the drive setting is not mentioned in below table.
MODBUS register address in drive | Mapping configuration in drive | Written to in AC500 | Condition at Function Block | ||
---|---|---|---|---|---|
ACS355, ACS850, ACQ810, ACSM1, ACS880 | ACS800 | ACS550, ACH550 | |||
Communication modul | FENA-01 / -11 | RETA-01 / -02 | RETA-01 / -02 | ||
40004 | Status Word (SW) | Status Word (SW) fix | Status Word 51.23 (SW) fix | DRIVE_DATA.sw | EN = TRUE |
40005 | Actual Value1 | 92.02 = Actual Value1, e.g. = 102 (Speed) | 51.24 = Actual Value1 (fix) | DRIVE_DATA.actValue1 | EN = TRUE |
40006 | Actual Value2 | 92.03 = Actual Value2 e.g. = 105 (Torque) *) | 51.25 = Actual Value2, e.g.= 105 (Torque) | DRIVE_DATA.actValue2 | EN = TRUE |
*) If 51.19 .. 51.22 (Output 1 .. 4) are set to the actual values the MODBUS response will be faster because those values are updated cyclically between RETA-01 and ACS800. |
Writing Control Word and Reference Values to Drive
The Function Block checks if there are changes of the Control Word (CW), Reference Value 1 (SPEED_REF) or Reference Value 2 (REF_VALUE2) on the DRIVE_DATA variable. If there is a change a write job is requested to send these 3 values to the ACS drive starting at MODBUS register 40001.
The following table shows the performed MODBUS read job and the needed mapping in the drive as well as the area where the data is stored in the AC500.
Note
Please refer the respective drives / fieldbus module manual for parameter setting, if the drive setting is not mentioned in below table.
MODBUS register address in drive | Communication module | Written to in AC500 | Condition at Function Block | |
---|---|---|---|---|
ACS355, ACS850, ACQ810, ACSM1, ACS880, ACS580 | ACS800, ACS550, ACH550, DCS550, DCS800 | |||
Communication module | FENA-01 / -11 | RETA-01 / -02 | ||
40001 | Control Word (CW) | Control Word (CW) | DRIVE_DATA.cw | EN = TRUE |
40002 | Reference Value1 | Reference Value1 | DRIVE_DATA.refValue1 | EN = TRUE |
40003 | Reference Value2 | Reference Value2 | DRIVE_DATA.refValue2 | EN = TRUE |
Note
If a MODBUS job tries to access a register in the drive which has no valid mapping information the job is aborted with an error. Therefore the drive parameters in FBA DATA OUT group have to be configured according to the used NVAR_WRITE input number.
Note
If 32 bit parameters are mapped to DATA OUT,
- The following field in DATA OUT has to be left open (= 0)
- The word order of the High-Word and Low-Word can be configured in the drive. If e.g. FENA-x1 is used the configuration is done in Par.51.22.
- The original 32 bit value in AC500 has to be split up in HW and LW in the WRITE_VALUES array.
Function Block DATA OUT has to be configured in drive in the following groups see also FENA-x1 manual.
Drive | Parameter group |
---|---|
ACS355 | 55.01 .. 55.10 |
ACS850, ACQ810, ACSM1, ACS880 | 53.01 .. 53.12 |
ACS880 | 53.01 .. 53.02(Fieldbus A), 56.01 .. 56.12 (Fieldbus B) |
Note
ACS drive parameters are only saved temporarily, if changed via fieldbus. To make these changes permanent in the drive the special parameter “PARAMETER SAVE” has to be set. Please see drive manuals and following table which parameter has to be set.
Save valid parameters to permanent memory in drive | ACS3XX, ACX550, ACQ810, ACS850, ACSM1, ACS800 | ACS880, ACS580 | DCS550, DCS800 |
---|---|---|---|
1 = Saves the valid parameter values to permanent memory. 0 = Save completed. | Par 16.07 = 1 | Par 96.07 = 1 | Par 16.06 = 1 |
Read/Write Jobs Coming from Other Function Blocks
The requests to process other read or write MODBUS jobs is transferred via the DRIVE_DATA variable at the IN_OUT variable DRIVE_DATA which can be connected to several other read/write Function Blocks e.g. ACS_MOD_READ_N_PRM ACS_MOD_READ_N_PRM Read N Parameters from an ACS Drive via MODBUS RTU or ACS_MOD_WRITE_N_PRM ACS_MOD_WRITE_N_PRM Write N Parameters to an ACS/DCS Drive via MODBUS RTU of this drive.
Communication with Several ACS Drives
If several drives are used, for each drive a communication Function Block such as ACS_COM_MOD_TCP or ACS_COM_MOD_TCP_ENHANCED Function Block must be programmed.
The Function Block provides the basic start/stop signals, basic diagnosis signals and the scaling of the SPEED_REF input and ACT_SPEED to the ACS fieldbus scaling range. -20000 .. +20000.
Note
The AC500 CPU types provide different numbers of usable TCP/IP sockets. For each ACS MODBUS TCP communication block (ACS_COM_MOD_TCP and ACS_COM_MOD_TCP_ENHANCED) one socket will be needed. The user has to check that the programmed number of ACS MODBUS TCP communication blocks is not higher than the number of available free sockets for the used CPU.
Diagnosis
The output ERNO, which reflects an actual error number is only valid for one cycle if DONE and ERR output are set to TRUE.
To catch this error number an external function must be programmed.
However there are internal diagnosis variables available, which are not shown at any output, but can be accessed from the Function Block instance. This can be done in three ways:
- Opening the “+” sign of Function Block instance in the declaration part being online.
- Create an assignment in the code with <instance>.<diagnosis variable>.
- Create a visualization element of the Function Block see ACS_COM_MOD_TCP_ENHANCED_VISU_PH.
The additional diagnosis variables are:
- iWriteErrCnt: number of errors in write jobs since EN = TRUE.
- wLastWriteErno: holds the error number of the last executed write job.
- iReadErrCnt: number of errors in read jobs since EN = TRUE.
- wLastReadErno: holds the error number of the last executed read job.
Preconditions
The Function Block is working with all ACS / DCS drives via MODBUS TCP communication with field bus adapter FENA-X1 / RETA-X1.
The data transfer to other Function Blocks for this drive communication to the ACS / DCS drive is realized via the IN_OUTPUT variable DRIVE_DATA, which must be connected to then ACS_COM_MOD_TCP even if no other Function Block is connected.
For ACS drive parameters must be set as follows:
Note
Please refer the respective drives / fieldbus module manual for parameter setting, if the drive setting is not mentioned in below table.
Setting according to AC500 configuration or Function Block input | ACS355 | ACS850, ACQ810, ACSM1 | ACS580, ACS880 | ACS800, ACS550, ACH550, DCS550, DCS800 |
---|---|---|---|---|
Communication module: | FENA-01 | FENA-11 | FENA-11 | RETA-01 / RETA-02 |
Fieldbus activation = EXT FBA / ENABLE | 98.02 | 50.01 | 50.01 | 98.02 |
COMM RATE = Auto (0) | 51.03 | 51.03 | 51.03 | 51.02 |
IP CONFIGURATION = Static IP (0) ! not default ! Set 51.27 (Refresh) after first change to “Static IP”. | 51.04 | 51.04 | 51.04 | 51.03 |
IP ADDRESS1 .. IP ADDRESS4 | 51.05 .. 51.08 | 51.05 .. 51.08 | 51.05 .. 51.08 | 51.04 .. 51.07 **) |
SUBNET CIDR = e.g. 255.255.255.0 = 24 | 51.09 | 51.09 | 51.09 | 51.08 .. 51.11 |
GateWay ADDRESS (normally = 0.0.0.0) | 51.10 .. 51.13 | 51.10 .. 51.13 | 51.10 .. 51.13 | 51.12 .. 51.15 |
PROTOCOL / PROFILE = MB/TCP ABB E (ABB Drives Profile Classic) (0) | 51.02 | 51.02 | 51.02 | 51.16 |
Word order for 32 bit parameter access | No 32 bit access | 51.22 | 51.22 | No 32 bit access |
Timeout mode = None(0) or Any message(1), but not Ctrl write(2) as these values are only written after changes | 51.21 | 51.21 | Timeout mode | |
MODBUS Timeout. Depending on Timeout mode. Value in 100ms. | 51.20 | 51.20 | MODBUS timeout | 51.17 |
Refresh settings in drive | 51.27 | 51.27 | 51.27 | 51.27 |
**) For RETA-01/-02 IP address could also be set via hardware Dip-Switches. If any switch is set (192.168.0.xxx) with xxx = Dip-Switches setting. |
For further settings, e.g. reaction of drive at communication error, please see related drive and fieldbus manual.