Output Description

../_images/81a3f9465c8d6c940a331390695abba0
../_images/a7f8da785c3a1f980a331390592a2a8c

DONE (done)

Data type: BOOL

Output DONE indicates the processing of the Function Block. If DONE = FALSE, the Function Block is not processed due to EN = FALSE and all outputs are set to 0.

For that reason, the other outputs always have to be considered together with output DONE. All other outputs are only valid, if DONE = TRUE.

DONE is set to TRUE for one cycle. For that reason, the output always has to be considered together with output ERR. If ERR is TRUE, an error occurred. In this case, the error number can be read at output ERNO.

ERR (error)

Data type: BOOL

Output ERR indicates whether an error occurred during block processing. This output always has to be considered together with output DONE. If DONE = TRUE and ERR = TRUE, an error occurred. In this case, the error number can be read at output ERNO.

ERNO (error number)

Data type: WORD

Output ERNO provides an error identifier, if an invalid value was applied to an input or if an error occurred during request processing. ERNO always has to be considered together with the outputs DONE and ERR. The value output at ERNO is only valid, if DONE is TRUE and ERR is TRUE.

The encoding of the error messages output at ERNO is explained in a separate table of Error Messages (see, error messages): Error Messages of the Function Block Libraries

ERNO1 (error number 1)

Data type: WORD, Default value: 0, Range: ³0

Output ERNO1 provides additional error information in case an error occurred during processing. ERNO1 always has to be considered together with the outputs DONE, ERR and ERNO. The value applied at ERNO1 is only valid, if DONE = TRUE, ERR = TRUE and ERNO = 6036 HEX (24630 DEC).

The encoding of the error messages output at ERNO is explained in a separate table “Error Messages” (see, error messages): Error Messages of the Function Block Libraries

Encoding of ERNO1 Parameter error messages

ERNO1 of the DPV1 Function Blocks is encoded as follows. The upper nibble (the higher significant 4 bits) describes the error class, the lower nibble represents the error cause.

Error class Error code
Bit: 7 6 5 4 3 2 1 0
ERNO1            
DEC HEX     Error class / Error code
0 0     Reserved
     
159 9F     Reserved
160 A0     10 Application / 0 Read error
161 A1     10 Application / 1 Write error
162 A2     10 Application / 2 Error module
163 A3     Reserved
   
167 A7     Reserved
168 A8     10 Application / 8 Version conflict
169 A9     10 Application / 9 Function not supported
170 AA     10 Application / 10 Manufacturer-specific
   
175 AF     10 Application / 15 Manufacturer-specific
176 B0     11 Access / 0 Invalid index
177 B1     11 Access / 1 Invalid length of data to be written
178 B2     11 Access / 2 Invalid slot
179 B3     11 Access / 3 Type conflict
180 B4     11 Access / 4 Invalid range
181 B5     11 Access / 5 Status conflict
182 B6     11 Access / 6 Access denied
183 B7     11 Access / 7 Invalid value range
184 B8     11 Access / 8 Invalid parameter
185 B9     11 Access / 9 Invalid type
186 BA     11 Access / 10 Manufacturer-specific
   
191 BF     11 Access / 15 Manufacturer-specific
192 C0     12 Resources / 0 Read conflict
193 C1     12 Resources / 1 Write conflict
194 C2     12 Resources / 2 Resource used
195 C3     12 Resources / 3 Resource not available
196 C4     Reserved
   
199 C7     Reserved
200 C8     12 Resources / 10 Manufacturer-specific
   
207 CF     12 Resources / 15 Manufacturer-specific
208 D0     Reserved
   
255 FF     Reserved

ERNO2 (error number 2)

Data type: WORD, Default value: 0, Range: ³0

Output ERNO2 provides an additional DPV1-specific error information, if an error occurred during processing. ERNO2 always has to be considered together with the outputs DONE, ERR and ERNO. The value applied at ERNO2 is only valid, if DONE = TRUE, ERR = TRUE and ERNO = 6036 HEX (24630 DEC). The encoding of ERNO2 is completely manufacturer-specific.

Calling of ACS_PB_READ_N_PRM_DPV1 in ST

dwAcsPbReadNPrmDpv1_DATA:= ADR (AcsPbPnPrmDpv1DataType)
ACS_PB_READ_N_PRM_DPV1 \ \ \ \ \ (EN \ \ \ \ \ \ \ := xAcsPbReadNPrmDpv1_EN,
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ SLOT \ \ \ \ \ \ := byAcsPbReadNPrmDpv1_SLOT,
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ SLV_ADR \ \ \ := byAcsPbReadNPrmDpv1_SLV_ADR,
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ DRIVE_TYPE := iAcsPbReadNPrmDpv1_DRIVE_TYPE,
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NVAR \ \ \ \ \ \ := byAcsPbReadNPrmDpv1_NVAR,
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ DATA \ \ \ \ \ \ := dwAcsPbReadNPrmDpv1_DATA);

xAcsPbReadNPrmDpv1_DONE \ \ := ACS_PB_READ_N_PRM_DPV1.DONE;
xAcsPbReadNPrmDpv1_ERR \ \ \ := ACS_PB_READ_N_PRM_DPV1.ERR;
wAcsPbReadNPrmDpv1_ERNO \ \ := ACS_PB_READ_N_PRM_DPV1.ERNO;
wAcsPbReadNPrmDpv1_ERNO1 \ := ACS_PB_READ_N_PRM_DPV1.ERNO1;
wAcsPbReadNPrmDpv1_ERNO2 \ := ACS_PB_READ_N_PRM_DPV1.ERNO2;