TraceAddress (UNION) ¶ TYPE TraceAddress : UNION Address of a trace variable InOut: Name Type Comment pbyAddress POINTER TO BYTE Pointer to the trace variable Area AddressArea Area/Offset of an IEC variable systemParameter SystemParameter Parameter of a system variable (e.g. device parameter) propertyLocation PropertyLocation Only used for property monitoring monitoringService MonitoringService Only used by monitoring service symVarAccess SymVarAccess Use for symbolic variable tracing monitoring2ByteCode Monitoring2ByteCode Reserved
TraceRecordConfiguration (STRUCT) ¶ TYPE TraceRecordConfiguration : STRUCT Trace record configuration The colors (ulGraphColor, ulMinWarningColor, ulMaxWarningColor) and are encoded in UDINTs in the ARGB format: the most significand byte is the alpha value, the next byte the red value, followed by green and blue. Each color component takes a value between 0 and FF. So 0xFF000000 is white, 0xFFFFFFFF is black, 0xFFFF0000 is red, 0xFF00FF00 is green, and 0xFF0000FF is blue. InOut: Name Type Initial Comment pszVariable POINTER TO STRING Name of the variable tvaAddress TraceVariableAddress Address definition of the variable tcClass TypeClass3 Type class of the variable. See enum IBase.TypeClass for the possible values. ulSize UDINT Size in bytes of a single sample ulGraphColor UDINT 16#FF0000FF Color in which the trace curve for the variable should be displayed ulGraphType UDINT 1 Graph type: 1: line (with points) 2: cross 4: step (with points) 5: point 8: line (without points) 9: step (without points) 10: line (with crosses) 11: steps (with crosses)) ulMinWarningColor UDINT Color to use if a sample is <= fCriticalLowerLimit ulMaxWarningColor UDINT Color to use if a sample is >= fCriticalUpperLimit fCriticalLowerLimit REAL The lower limit fCriticalUpperLimit REAL The upper limit bActivateMinWarning BOOL If set, the trace will be displayed in the color ulMinWarningColor as soon as a sample is <= fCriticalLowerLimit bActivateMaxWarning BOOL If set, the trace will be displayed in the color ulMaxWarningColor as soon as a sample is >= fCriticalUpperLimit byYAxis BYTE Not used
TraceRecordEntry (STRUCT) ¶ TYPE TraceRecordEntry : STRUCT A single entry recorded for a trace variable consisting of a relative time stamp and a (variable-size) data part. The size of the data depends on the type class of the trace variable. InOut: Name Type Comment ulTimeRelative UDINT The relative time stamp (since the trace was first started, see TraceState.tStartTime) in the resolution configured for the trace packet Data BYTE A (variable size) data portion for the sample value
TraceState (STRUCT) ¶ TYPE TraceState : STRUCT The state of a trace packet InOut: Name Type Comment ulState UDINT The state. See TRACE_PACKET_STATE ulFillLevel UDINT The number of recorded samples tStartTime SYSTIME The time of the first start of the trace, all time stamps are relative to this value. tsTriggerState TriggerState The state of the trigger.
TraceTrigger (STRUCT) ¶ TYPE TraceTrigger : STRUCT Configuration of the trace trigger InOut: Name Type Comment tvVariable TraceVariable Specification of the trigger variable ttvLevel TriggerValue Holds the trigger level for analog (i.e. non-boolean) triggers ulFlags UDINT Trigger flags. See TRACE_TRIGGER_FLAGS . byEdge BYTE Trigger edge. See TRACE_TRIGGER_EDGE . byPosition BYTE Number of samples to record after the trigger has fired in percent (0..100) of the buffer size. Deprecated, use ulUpdatesAfterTrigger instead. wAlignmentDummy WORD Alignment bytes ulUpdatesAfterTrigger UDINT Number of samples to record after the trigger has fired. Note: TRACE_TRIGGER_FLAGS_UPDATESAFTERTRIGGER must be set in ulFlags, if this entry is used instead of byPosition.
TraceVarInfo (UNION) ¶ TYPE TraceVarInfo : UNION InOut: Name Type info VariableInformationStruct pInfo POINTER TO VariableInformationStruct2
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)