
Error handling and diagnosis
PCD2.H31x
Page 8-2
SAIA-Burgess Electronics Ltd.
(2H3-08-E.DOC)
26/762 E2
8.2 Error handling in Run
8.2.1
Incorrect parameter
In FB 'Exec' the instruction code only is checked. Parameters 1 (module
no.) and 3 (source/destination register) are not checked, to avoid making
the execution time longer.
In FBs 'Init' and 'Home' the values of all parameters are checked to ensu-
re they are within the premitted range. If a parameter lies outside a range
it is brought to the minimum value, the error flag 'fPar_Err' is set and the
diagnostic register 'rDiag' is loaded with the relevant error code.
The 'fPar_Err' flag is not reset within FBs. This should take place in XOB
16 or the 'Init' step.
The error code is made up as follows:
rDiag
bit 31 . . . . . . . 24 23 . . . . . . . 16 15 . . . . . . . 8 7 . . . . . . . 0
\ Reserve / \ FB no. / \ Par. no. / \ Mod. no./
(Init = FB 1)
(Exec = FB 2)
(Home = FB 3)
Example:
If the sample time (parameter 6) in FB 'Init' of module 2
is incorrectly defined (>255), 'rDiag' is loaded with the
hex value 00 01 06 02.
At each incorrect parameter, the diagnostic register is overwritten and
always contains the last error. It should therefore be evaluated as soon as
the 'fPar_Err' flag signals a range error. The absolute addresses of 'rDiag'
and 'fPar_Err' can be seen in the 'project.MAP' file (see section 7.1.2, pa-
ge 7-8). This can be userful during commissioning with the debugger to
locate an error:
- Run until flag 'fPar_Err' = H
- Display register 'rDiag' hex
- Delete flag 'fPar_Err'
Summary of Contents for PCD2.H31x
Page 8: ...Contents PCD2 H31x Page 4 SAIA Burgess Electronics Ltd 2H3 00 E DOC 26 762 E2 Notes...
Page 18: ...Introduction PCD2 H31x Page 1 8 SAIA Burgess Electronics Ltd 2H3 01 E DOC 26 762 E2 Notes...
Page 28: ...Terminals PCD2 H31x Page 4 4 SAIA Burgess Electronics Ltd 2H3 04 E DOC 26 762 E2 Notes...
Page 52: ...Quick start PCD2 H31x Page 6 14 SAIA Burgess Electronics Ltd 2H3 06 E DOC 26 762 E2 Notes...
Page 154: ...SAIA Burgess Electronics Ltd Your suggestions...