Enums ¶ ERROR (Enum) EVENT (Enum) EVENT_CLASS (Enum) EVENT_SOURCE (Enum)
CAA Callback ¶ Enums ERROR (Enum) EVENT (Enum) EVENT_CLASS (Enum) EVENT_SOURCE (Enum) Functions Callback Info GetCallback (Function) GetHandleOfCallback (Function) GetNumberActiveCallbacks (Function) IsHandleValid (Function) Helper DecodeClass (Function) DecodeEvent (Function) EncodeSpec (Function) Indirect Functioncall CallFunctionByIndex (Function) PostEvent (Function) RegisterCallback (Function) SendEvent (Function) UnregisterCallback (Function) Globale Constants GlobalConstants (GVL) Structs CB_CALLBACK (Struct)
ERROR (ENUM) ¶ TYPE ERROR : This data structure describes errors which might occur when using functions of the CAA_Callback library. Error range 20000 – 20099 is reserved for this library in the prefix registration for libraries. Attributes: qualified_only InOut: Name Initial Comment NO_ERROR 0 No error FIRST_ERROR 20000 Start of standard error area HANDLE_INVALID 20001 Handle is invalid. Callback may be already unregistered UNKNOWN_EVENT 20002 Event not known CALLBACK_NOT_REMOVABLE 20003 Callback can’t be removed WRONG_ARGUMENT 20004 Argument is a null pointer CB_NO_MEMORY 20005 Not enough memory CB_EVENT_EXISTS 20006 The event already exists CB_CALL_CALLBACKS_FAILED 20007 The event already exists CB_NO_SYSTEM_EVENT 20008 The specified event is not an system event CB_BUFFER_NOT_AVAILABLE 20009 No buffer available CB_SYSTEM_EVENT 20010 The event, which should be sent or posted, is a system event FIRST_MF 20050 manufacturer specific LAST_ERROR 20099 End of the standard error area
EVENT (ENUM) ¶ TYPE EVENT : THIS enumeration describes all standardized events. An “X” in the table shown below indicates that each CAA PLC supports the respective event. The source OF those events is CB_RUNTIME. PLC-specific events can be used in the following number areas: 900-999, 1900-1999, 2900-2999, 3900-3999, 4900-4999, 5900-5999, 6900-6999, 7000-7999, ab 10000 The value of each event at the same results in a classification: 1000-1999 CB_ONLINE_EVENTS 2000-2999 CB_INFOS 3000-3999 CB_WARNINGS 4000-4999 CB_RTS_ERRORS 5000-5999 CB_SYSTEM_EXCEPTIONS 6000-6999 CB_INTERRUPTS 7000-7499 CB_IO 8000-9899 CB_FIELDBUS 9900-9999 CB_TIMERS 10000- CB_MANUF_SPEC Attributes: qualified_only InOut: Name Initial Comment ALL_EVENTS -1 NO_EVENT 0 START 1000 start command for PLC STOP stop command for PLC BEFORE_RESET before reset is executed AFTER_RESET after reset is executed ONLINE_CHANGE Is called after CodeInit() at Online-Change BEFORE_DOWNLOAD Is called at the beginning of a program download
EVENT_CLASS (ENUM) ¶ TYPE EVENT_CLASS : This enumeration describes the event classes. Attributes: qualified_only InOut: Name Initial Comment ALL_CLASSES -1 all classes NO_CLASS 16#0 no classes ONLINE_EVENTS 16#1 general online events INFOS 16#2 infos WARNINGS 16#4 warnings RTS_ERRORS 16#8 errors from runtime SYSTEM_EXCEPTIONS 16#10 system exceptions INTERRUPTS 16#20 interrupts IO 16#40 I/O actions FIELDBUS 16#80 Fieldbus actions TIMERS 16#100 Timer ervents MANUF_SPEC 16#200 manufacturer specific
EVENT_SOURCE (ENUM) ¶ TYPE EVENT_SOURCE : This enumeration describes the triggers of an event. Attributes: qualified_only InOut: Name Initial Comment ALL_SOURCES -1 all sources NO_SOURCE 0 no sources RUNTIME 16#1 runtime SYSTEM 16#2 system IECTASK 16#4 IEC task IECPROGRAM 16#8 IEC program DRIVER 16#10 hardware driver
Functions ¶ Callback Info GetCallback (Function) GetHandleOfCallback (Function) GetNumberActiveCallbacks (Function) IsHandleValid (Function) Helper DecodeClass (Function) DecodeEvent (Function) EncodeSpec (Function) Indirect Functioncall CallFunctionByIndex (Function) PostEvent (Function) RegisterCallback (Function) SendEvent (Function) UnregisterCallback (Function)
Callback Info ¶ GetCallback (Function) GetHandleOfCallback (Function) GetNumberActiveCallbacks (Function) IsHandleValid (Function)
GetCallback (FUN) ¶ FUNCTION GetCallback : ERROR This function gets the callback data structure of a registered callback InOut: Scope Name Type Comment Return GetCallback ERROR Description of the callback conditions and the callback function Input hHandle CAA.HANDLE handle of Callback pCallback POINTER TO CB_CALLBACK Adress of return value
GetHandleOfCallback (FUN) ¶ FUNCTION GetHandleOfCallback : CAA.HANDLE This function gets the handle of callback via the callback number (ctNumber); InOut: Scope Name Type Comment Return GetHandleOfCallback CAA.HANDLE Handle to the callback, CAA.gc_hINVALID if ctNumber is invalid Input ctNumber CAA.COUNT number of Callback (value between 1 and CB_GetNumberActiveCallbacks) peError POINTER TO ERROR Pointer to error ID