TRACE_TRIGGER_FLAGS (GVL) ¶ Trigger flags InOut: Scope Name Type Initial Comment Constant TRACE_TRIGGER_FLAGS_UNDEFINED UDINT 16#0 Trigger undefined TRACE_TRIGGER_FLAGS_DEFINED UDINT 16#1 Trigger defined TRACE_TRIGGER_FLAGS_UPDATESAFTERTRIGGER UDINT 16#4 UpdatesAfterTrigger is used instead of TriggerPosition
TRACE_TRIGGER_STATE (GVL) ¶ Trigger state InOut: Scope Name Type Initial Comment Constant TRACE_TRIGGER_STATE_DISABLED UDINT 16#0 Trigger disabled TRACE_TRIGGER_STATE_ENABLED UDINT 16#1 Trigger enabled TRACE_TRIGGER_STATE_WAIT_FOR_TRIGGER UDINT 16#2 Waiting for the trigger to fire TRACE_TRIGGER_STATE_TRIGGER_REACHED UDINT 16#3 The trigger has fired
TRACE_VAR_ADDRESS_FLAGS (GVL) ¶ Trace variable address flags. Usage: The flags mus be used in combination. Here are some typical combinations: TRACE_VAR_ADDRESS_FLAGS_IEC | TRACE_VAR_ADDRESS_FLAGS_AREA_OFFSET TRACE_VAR_ADDRESS_FLAGS_IEC | TRACE_VAR_ADDRESS_FLAGS_PROPERTY TRACE_VAR_ADDRESS_FLAGS_IEC | TRACE_VAR_ADDRESS_FLAGS_POINTER TRACE_VAR_ADDRESS_FLAGS_IEC | TRACE_VAR_ADDRESS_FLAGS_MONITORING TRACE_VAR_ADDRESS_FLAGS_IOCONFIG TRACE_VAR_ADDRESS_FLAGS_SYSTEM TRACE_VAR_ADDRESS_FLAGS_IEC | TRACE_VAR_ADDRESS_FLAGS_SYMBOLIC InOut: Scope Name Type Initial Comment Constant TRACE_VAR_ADDRESS_FLAGS_IEC UDINT 16#1 IEC variable (automatic update) TRACE_VAR_ADDRESS_FLAGS_IOCONFIG UDINT 16#2 IO-Config variable (automatic update) TRACE_VAR_ADDRESS_FLAGS_SYSTEM UDINT 16#4 System variable (update done by runtime system component or IEC program) TRACE_VAR_ADDRESS_FLAGS_POINTER UDINT 16#10 Address specified by a pointer TRACE_VAR_ADDRESS_FLAGS_AREA_OFFSET UDINT 16#20 Address specified by area/offset (IEC) TRACE_VAR_ADDRESS_FLAGS_PROPERTY UDINT 16#40 Address is a property variable (IEC) TRACE_VAR_ADDRESS_FLAGS_MONITORING UDINT 16#80 Address is an embedded monitoring expression (IEC) TRACE_VAR_ADDRESS_FLAGS_SYMBOLIC UDINT 16#100 The variable will be accessed using the symbol configuration based on its name TRACE_VAR_ADDRESS_FLAGS_MONITORING2 UDINT 16#200 Address is an item with a monitoring request for CmpMonitor2 (IEC)
TraceMgrGetConfigFromFile (FUN) ¶ FUNCTION TraceMgrGetConfigFromFile : RTS_IEC_RESULT Loads a given trace file and returns the configuration it contains. After this function call a call to function TraceMgrGetConfigFromFileRelease is necessary to free the dynamically allocated memory. InOut: Scope Name Type Comment Return TraceMgrGetConfigFromFile RTS_IEC_RESULT Returns the runtime system error code (see CmpErrors.library): ERR_PARAMETER if pszFileName is not a valid file path ERR_NOMEMORY if the memory is not sufficient for opening the file ERR_NOT_SUPPORTED if reading from files is not supported by the runtime system or if an addressing mode is not supported (e.g. symbolic access) ERR_NO_OBJECT if opening the file failed ERR_FAILED if opening the file failed ERR_END_OF_OBJECT if either the packet configuration or the record configuration is incomplete ERR_NO_CHANGE if a NULL pointer was passed to parameter ERR_OUT_OF_LIMITS if the parameters pRecordConfiguration and iMaxRecordCount do not have enough memory to hold all the records from the file Input pszFileName POINTER TO STRING The file path (in) pPacketConfiguration POINTER TO TracePacketConfiguration Points to a TracePacketConfiguration variable, where the packet configuration will be returned (out) pRecordConfiguration POINTER TO TraceRecordConfiguration Points to a TraceRecordConfiguration variable (or an array of TraceRecordConfiguration variables), where the trace record configuration will be returned. (out) If a NULL pointer is passed this function only determines the number of records in the file. iMaxRecordCount DINT Contains the maximum number of records, that can be stored in the array pRecordConfiguration (in) Inout piEffectiveRecordCount DINT Returns the effective number of records read (out). In case of return code ERR_NO_CHANGE this variable contains the number of records in the file.
TraceMgrGetConfigFromFileRelease (FUN) ¶ FUNCTION TraceMgrGetConfigFromFileRelease : RTS_IEC_RESULT This function has to be called after TraceMgrGetConfigFromFile . It frees the dynamically allocated memory for the strings of the packet resp. record configuration. InOut: Scope Name Type Comment Return TraceMgrGetConfigFromFileRelease RTS_IEC_RESULT Returns the runtime system error code (see CmpErrors.library) Input pPacketConfiguration POINTER TO TracePacketConfiguration Points to a TracePacketConfiguration variable, where the packet configuration was stored (in) pRecordConfiguration POINTER TO TraceRecordConfiguration Points to a TraceRecordConfiguration variable (or an array of TraceRecordConfiguration variables), where the trace record configuration was stored. (in) iRecordCount DINT Contains real number of records, that are stored in the array pRecordConfiguration (in)
TraceMgrPacketCheckTrigger (FUN) ¶ FUNCTION TraceMgrPacketCheckTrigger : RTS_IEC_RESULT Checks if the trigger fires this cycle and sets the trigger state accordingly. If the trigger is already reached, ERR_OK is returned. Note: this function is called cyclically by CmpTraceMgr and should normally not be called from an application. Use TraceMgrPacketGetState instead to query the current trigger state. InOut: Scope Name Type Comment Return TraceMgrPacketCheckTrigger RTS_IEC_RESULT Returns the runtime system error code (see CmpErrors.library): ERR_PARAMETER if hPacket is not a valid trace packet ERR_NOTINITIALIZED if no trigger is defined or if the trigger is disabled ERR_FAILED if the check fails Input hPacket RTS_IEC_HANDLE The trace packet handle
TraceMgrPacketClose (FUN) ¶ FUNCTION TraceMgrPacketClose : RTS_IEC_RESULT Closes a handle opened by TraceMgrPacketOpen. InOut: Scope Name Type Comment Return TraceMgrPacketClose RTS_IEC_RESULT Returns the runtime system error code (see CmpErrors.library): ERR_PARAMETER if hPacket is not a valid handle Input hPacket RTS_IEC_HANDLE The trace packet handle
TraceMgrPacketComplete (FUN) ¶ FUNCTION TraceMgrPacketComplete : RTS_IEC_RESULT Completes a trace packet and finishes the configuration. This function must be called after all records have been added to the packet. InOut: Scope Name Type Comment Return TraceMgrPacketComplete RTS_IEC_RESULT Returns the runtime system error code (see CmpErrors.library): ERR_PARAMETER if hPacket is not a valid handle Input hPacket RTS_IEC_HANDLE The trace packet handle
TraceMgrPacketCreate (FUN) ¶ FUNCTION TraceMgrPacketCreate : RTS_IEC_HANDLE Creates a new trace packet. The returned handle must be deleted with TraceMgrPacketDelete when the packet is no longer needed. InOut: Scope Name Type Comment Return TraceMgrPacketCreate RTS_IEC_HANDLE Returns the runtime system error code (see CmpErrors.library): ERR_PARAMETER if pConfiguration.pszName is 0 ERR_DUPLICATE if a packet with the given name already exists ERR_NOMEMORY if the available memory is not sufficient to create the packet Inout pConfiguration TracePacketConfiguration The trace packet configuration (in) pResult RTS_IEC_RESULT The result code (out)
TraceMgrPacketDelete (FUN) ¶ FUNCTION TraceMgrPacketDelete : RTS_IEC_RESULT Deletes an existing handle. The handle must have been created with TraceMgrPacketCreate. InOut: Scope Name Type Comment Return TraceMgrPacketDelete RTS_IEC_RESULT Returns the runtime system error code (see CmpErrors.library): ERR_PARAMETER if hPacket is not a valid packet handle Input hPacket RTS_IEC_HANDLE The trace packet handle