ACS_COM_MOD_RTU_ENHANCED Communication for ACS Drives via MODBUS RTU using ABB Drives Profile Enhanced¶
Function Block Information
Available from PLC runtime system: | V1.3.2 |
Included in library: | ACSDrivesComModRTU_AC500_V20.lib |
Function Block | with historical values |
Function Block ACS_COM_MOD_RTU_ENHANCED establishes the MODBUS RTU communication to an ACS drive and is used for the basic control of ACS drives with ABB Drives Profile Enhanced.
The ABB Drives Profile Enhanced communication profile provides register mapped access to the Control, Status, Reference and Actual Values of the ABB Drives Profile Enhanced. The mapping of the registers has been enhanced to allow additionally writing of up to 12 control and reading of up to 12 additionally status parameters in a single MODBUS job.
The Function Block continuously reads data from the drive starting at MODBUS register 400051. 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 MSW, ActValue1 and ActValue2.
Apart from these three parameters there is also an option to read additional 12 more drive parameters in the same MODBUS job. Using the input NVAR_READ the Function Block can be configured to read between 1 and 12 more parameters from the drive. All read data is then written to the array at the READ_VALUES output.
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.
MODBUS register address in drive | Mapping configuration in drive | Written to in AC500 | Condition at Function Block | |
---|---|---|---|---|
ACS850, ACQ810 embedded fieldbus | ACS850, ACQ810, ACSM1, ACS880, ACS800, ACS580 | |||
400051 | Status Word (SW) | Status Word (SW) | DRIVE_DATA.sw | EN = TRUE |
400052 | Actual Value1 | Actual Value1 | DRIVE_DATA.actValue1 | EN = TRUE |
400053 | Actual Value2 | Actual Value2 | DRIVE_DATA.actValue2 | EN = TRUE |
400054 | Par. 58.47 | FBA DATA IN 1 | READ_VALUES[1] | EN = TRUE and NVAR_READ >= 1 |
400055 | Par. 58.48 | FBA DATA IN 2 | READ_VALUES[2] | EN = TRUE and NVAR_READ >= 2 |
400065 | Par. 58.58 | FBA DATA IN 12 | READ_VALUES[6] | EN = TRUE and NVAR_READ = 12 |
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 IN group have to be configured according to the used NVAR_READ input number.
Note
If 32 bit parameters are mapped to DATA IN,
- The following field in DATA IN has to be left open (= 0) To retrieve the original 32 bit value from the drive in AC500 the HW and LW from READ_VALUES fields have to be recombined in the program.
- The word order of the High-Word and Low-Word can be configured in the drive. If e.g. FSCA-01 is used the configuration is done in Par.51.11.
- To retrieve the original 32 bit value from the drive in AC500 the HW and LW from READ_VALUES fields have to be recombined in the program.
Function Block DATA IN has to be configured in drive in the following groups see also FSCA-01 manual.
Drive | Parameter group |
---|---|
ACS355 | FSCA-01 is not released 54.01 .. 54.10 |
ACS850, ACQ810, ACSM1, ACS880 | 52.01 .. 52.12 |
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 400001.
Apart from these three parameters there is also an option to write additional 12 more drive parameters in the same MODBUS job. Using the input NVAR_WRITE the Function Block can be configured to write between 1 and 12 more parameters to the drive. The necessary values have to present in the array connected to WRITE_VALUES input.
The following table shows the performed MODBUS write job and the needed mapping in the drive as well as the area from where the data in the AC500 is taken.
MODBUS register address in drive | Mapping configuration in drive | Written to in AC500 | Condition at Function Block | |
---|---|---|---|---|
ACS850, ACQ810 embedded fieldbus | ACS850, ACQ810, ACSM1, ACS880, ACS800 | |||
400001 | Control Word (CW) | Control Word (CW) | DRIVE_DATA.cw | EN = TRUE |
400002 | Reference Value1 | Actual Value1 | DRIVE_DATA.refValue1 | EN = TRUE |
400003 | Reference Value2 | Actual Value2 | DRIVE_DATA.refValue2 | EN = TRUE |
400004 | Par. 58.35 | FBA DATA OUT 1 | WRITE_VALUES[1] | EN = TRUE and NVAR_READ >= 1 |
400005 | Par. 58.36 | FBA DATA OUT 2 | WRITE_VALUES[2] | EN = TRUE and NVAR_READ >= 2 |
400015 | Par. 58.46 | FBA DATA OUT 12 | WRITE_VALUES[6] | EN = TRUE and NVAR_READ = 12 |
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 IN group have to be configured according to the used NVAR_READ 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. FSCA-01 is used the configuration is done in Par.51.11.
- The original 32 bit value in AC500 has to be split up in HW and LW in the WRITE_VALUES array.
Function Block DATA IN has to be configured in drive in the following groups see also FSCA-01 manual.
Drive | Parameter group |
---|---|
ACS355 | 54.01 .. 54.10 |
ACS850, ACQ810, ACSM1, ACS880 | 52.01 .. 52.12 |
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 |
1 = Saves the valid parameter values to permanent memory. 0 = Save completed. |
Par 16.07 = 1 | Par 96.07 = 1 |
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 or ACS_MOD_WRITE_N_PRM of this drive.
If several drives are used, for each drive a communication Function Block such as ACS_COM_MOD_RTU_ENHANCED must be programmed. Also every other generic slave device on the same MODBUS RTU line must be programmed with it´s own ACS_COM_MOD_RTU_GEN Function Block. All those communication Function Blocks of one MODBUS RTU line must be linked together via one variable of type ACS_MOD_TOKEN_TYPE, connected to the IN_OUTPUT LINE_TOKEN. Via this variable the MODBUS token is passed to the next drive / device, so only one drive / device at a time is communicating with the PLC.
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.
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 drives via Enhanced MODBUS RTU communication.
The data transfer to other Function Blocks for this drive communication to the ACS drive is realized via the IN_OUTPUT variable DRIVE_DATA, which must be connected to ACS_COM_MOD_RTU_ENHANCED even if no other Function Block is connected.
The MODBUS token is passed to other ACS_COM_MOD_RTU_ENHANCED function via the IN_OUTPUT variable LINE_TOKEN which must be connected even if no other ACS_COM_MOD_RTU_ENHANCED Function Block is used.
The following ACS drive parameters have to be set according to the configuration of the MODBUS line and the inputs of the Function Block
Setting according to AC500 configuration or Function Block input | ACS355 | ACS850, ACQ810 | ACS850, ACQ810, ACSM1, | ACS880 | ACS800 |
---|---|---|---|---|---|
Communication module: | FSCA-01 | embedded fieldbus | FSCA-01 | FSCA-01 | FSCA-01 |
Fieldbus activation = STD MODBUS or MODBUS RS232 or EXT FBA | 98.02 | 58.01 | 50.01 | 50.01 | 98.02 |
SLAVE number | 51.03 | 58.03 | 51.03 | 51.03 | 52.01 |
Baudrate = AC500 MODBUS configuration | 51.04 | 58.04 | 51.04 | 51.04 | 52.02 |
Parity, Data- and Stopbits = AC500 MODBUS configuration | 51.05 | 58.05 | 51.05 | 51.05 | 52.03 |
Control profile = ABB Drives Profile Enhanced | 53.05 | 58.06 | 51.02 | 51.02 | 98.07 |
Word order for 32 bit parameter access | No 32 bit access | 58.32 | 51.11 | 51.11 | 51.11 |
Timeout mode = None(0) or Any message(1), but not Ctrl write(2) as theses values are only written after changes. | 51.07 | 58.08 | 51.07 | Timeout mode | Fix monitoring of Main and Auxiliary data sets. See Manual Par.30.18. |
MODBUS timeout. Depending on Timeout mode. Value in 100ms. | 51.06 | 58.07 | 51.06 | MODBUS timeout | Fix |
Refresh settings in drive | 51.27 | 58.10 | 51.27 | 51.27 |
For further settings, e.g. reaction of drive at communication error, please see related drive manual.