Handleknown (EXAMPLE)

 

This example of the CAA_Callback.Library assumes that the handle, which was returned during the registration of the callback, was stored.:

(* define callback *)

cbNew.eEvent := CB.BEFORE_RESET;

cbNew.eClass := CB.ALL_CLASSES;

cbNew.eSource := CB.ALL_SOURCES;

cbNew.iPOUFunc := ADR(CallbackBeforeReset);

(* insert callback and store handle *)

h := CB.RegisterCallback(cbNew);

(* delete callback *)

IF CB.IsHandleValid(h) THEN

CB.UnregisterCallback(h);

END_IF