I have a input variable c_timTransmissionRate
which is usually initalized using the persistent variable list. The default value for the persistent variable list in the function block TxRaw
is then overriden by the instanciating function block ´TxDbc´. This again is application specific overriden in the persistent variable list itself.
In a few cases the value for c_timTransmissionRate
is provided dynamically by the instanciating function block TxTsc1
during runtime.
My problem is that I currently always see the original TIME#0ms
value in the debugger instead of the values given in the persistent variable list.
Extract of my current code:
FUNCTION_BLOCK TxRaw
VAR_INPUT PERSISTENT CONSTANT
c_timTransmissionRate : TIME := T#0ms;
END_VAR
(* instructions *)
END_FUNCTION_BLOCK
FUNCTION_BLOCK Tx
VAR
tx : TxRaw;
END_VAR
(* instructions *)
tx();
(* instructions *)
END_FUNCTION_BLOCK
FUNCTION_BLOCK TxTsc1 EXTENDS Tx
(* instructions *)
tx.c_timTransmissionRate := PI()*THUMB();
SUPER^();
END_FUNCTION_BLOCK
FUNCTION BLOCK TxDbc EXTENDS Tx
VAR
tx : TX := (c_timTransmissionRate := T#20ms);
END_VAR
(* instructions *)
SUPER^();
END_FUNCTION_BLOCK