Fail-safe ARRAY of type FUNCTION_BLOCK leads to exception (corrected from V3.18)

Corrected from:
PLC Designer V3.18
 
Response of the new version:
When calling a function block in the PLC project that has been declared safe against mains failure of the type ARRAY [...] OF <FUNCTION_BLOCK>, PLC project processing is no longer be stopped by an exception.
 
What happens?
  • PLC project processing is stopped with an exception. The following entries are made in the controller logbook:
    *SOURCEPOSTION* App=[Application] area=x, offset=x Fatal error
    *EXCEPTION* [AccessViolation] occurred:
    App=[Application], Task=[Task] Fatal Error
  • The PLC runtime is stopped and it is no longer possible to establish a connection with the PLC Designer. The controller logbook contains several entries, e.g.:
    Process 112656562: exceptional exit (OpenContext=0x2!lx!)
When does this behaviour occur?
PLC project processing can be stopped by an exception if a function block is called in the PLC project which has been declared safe against mains failure (i.e. as VAR RETAIN or VAR RETAIN PERSISTENT) of the type ARRAY [...] OF <FUNCTION_BLOCK>, e.g.
VAR RETAIN
  R_afbRS : ARRAY[0..10] OF RS;
END_VAR
 
Which products are affected?
PLC Designer from V3.0
 
Short-term measures:
Do not declare an ARRAY of the type <FUNCTION_BLOCK> as VAR RETAIN or VAR RETAIN PERSISTENT.
 
Evaluation/recommendations:
If an ARRAY of function blocks is declared safe against mains failure, calling a function block of the ARRAY may lead to an exception and PLC processing will be stopped. The exception can be reset by switching the mains for the controller.
Lenze recommends, not to declare function blocks safe against mains failure. Fail-safe data should be transferred to the function block via the VAR_IN_OUT interface. Here, shown as an example by means of a fail-safe RS flip flop:
PLCD_RSpowersafe_SSHOT.PNG 
Explanation: The fail-safe variable R_xQ1 is transferred to the RS_POWERSAFE function block via the VAR_IN_OUT interface Q1. Due to the internal logic of the function block , the state of Q1 remains unchanged even after mains switching.

URL for linking this AKB article: /en-de/go/akb/201700412/1/
森林舞会游戏