TraceMgrPacketGetState (FUN) ¶ FUNCTION TraceMgrPacketGetState : RTS_IEC_RESULT Returns the state of a trace packet. InOut: Scope Name Type Comment Return TraceMgrPacketGetState 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 Inout pState TraceState The packet state (out)
TraceMgrPacketOpen (FUN) ¶ FUNCTION TraceMgrPacketOpen : RTS_IEC_HANDLE Opens a trace packet specified by name. Note Comparison of packet names is case-insensitive. InOut: Scope Name Type Comment Return TraceMgrPacketOpen RTS_IEC_HANDLE Returns the runtime system error code (see CmpErrors.library): ERR_NO_OBJECT if no packet with the given name is found. Inout Const pszName STRING The name of the trace packet to open (in) Inout pResult RTS_IEC_RESULT The result code (out)
TraceMgrPacketReadBegin (FUN) ¶ FUNCTION TraceMgrPacketReadBegin : RTS_IEC_RESULT Start reading trace packet. The purpose of this function is to trigger the event EVT_TRACEMGR_PACKET_SAMPLE. In response to the event, any outstanding trace samples will be written by runtime system components and IEC applications that provide trace values for system parameters. Note Normally, there is no need to call this function. It should be called before TraceMgrPacketReadFirst and TraceMgrPacketReadFirst2 to make sure all trace values are present before reading. When finished with reading, TraceMgrPacketReadEnd should be called. InOut: Scope Name Type Comment Return TraceMgrPacketReadBegin RTS_IEC_RESULT Returns the runtime system error code (see CmpErrors.library): ERR_PARAMETER if hPacket is not a valid packet handle ERR_NOTINITIALIZED if hPacket is not complete and started Input hPacket RTS_IEC_HANDLE The trace packet handle
TraceMgrPacketReadEnd (FUN) ¶ FUNCTION TraceMgrPacketReadEnd : RTS_IEC_RESULT End reading trace packet. See description of function TraceMgrPacketReadBegin . InOut: Scope Name Type Comment Return TraceMgrPacketReadEnd RTS_IEC_RESULT Returns the runtime system error code (see CmpErrors.library): ERR_PARAMETER if hPacket is not a valid packet handle ERR_NOTINITIALIZED if hPacket is not complete and started Input hPacket RTS_IEC_HANDLE The trace packet handle
TraceMgrPacketReadFirst (FUN) ¶ FUNCTION TraceMgrPacketReadFirst : RTS_IEC_HANDLE Reads the contents of the first record. Note if the result code is ERR_ENTRIES_REMAINING, data has been successfully copied to pTraceBuffer, but more data can be read by a subsequent call. (Either because the destination buffer was too small, or because new data has been recorded in the mean time.) Note You should call TraceMgrPacketReadBegin before calling this function, to make sure any outstanding trace values are written to the trace buffers. Note Data is always returned in little endian byte order even if the device has big endian byte order. InOut: Scope Name Type Comment Return TraceMgrPacketReadFirst RTS_IEC_HANDLE Returns the runtime system error code (see CmpErrors.library): ERR_PARAMETER if hPacket is not a valid packet handle ERR_NO_OBJECT if the packet does not have a single record ERR_NOTINITIALIZED if the packet is not complete ERR_TIMEOUT if reading took too long ERR_ENTRIES_REMAINING if more data can be read by a subsequent call (this is not an error) Input hPacket RTS_IEC_HANDLE The trace packet handle Inout pTraceBuffer TraceRecordEntry Pointer to the destination buffer pulReadBytes UDINT Size of the destination buffer in bytes (in), number of bytes copied (out) pResult RTS_IEC_RESULT The result code
TraceMgrPacketReadFirst2 (FUN) ¶ FUNCTION TraceMgrPacketReadFirst2 : RTS_IEC_HANDLE Reads the contents of the first record, starting at a given time stamp. Only entries with a time stamp greater than or equal to ulTimestamp are copied. If the time stamp is zero, the function behaves like TraceMgrPacketReadFirst . Note if the result code is ERR_ENTRIES_REMAINING, data has been successfully copied to pTraceBuffer, but more data can be read by a subsequent call. (Either because the destination buffer was too small, or because new data has been recorded in the mean time.) Note You should call TraceMgrPacketReadBegin before calling this function, to make sure any outstanding trace values are written to the trace buffers. Note Data is always returned in little endian byte order even if the device has big endian byte order. InOut: Scope Name Type Comment Return TraceMgrPacketReadFirst2 RTS_IEC_HANDLE Returns the runtime system error code (see CmpErrors.library): ERR_PARAMETER if hPacket is not a valid packet handle ERR_NO_OBJECT if the packet does not have a single record ERR_NOTINITIALIZED if the packet is not complete ERR_TIMEOUT if reading took too long ERR_ENTRIES_REMAINING if more data can be read by a subsequent call (this is not an error) Input hPacket RTS_IEC_HANDLE The trace packet handle ulTimestamp UDINT The time stamp (relative to the trace start time) from where to start copying Inout pTraceBuffer TraceRecordEntry Pointer to the destination buffer pulReadBytes UDINT Size of the destination buffer in bytes (in), number of bytes copied (out) pResult RTS_IEC_RESULT The result code
TraceMgrPacketReadNext (FUN) ¶ FUNCTION TraceMgrPacketReadNext : RTS_IEC_HANDLE Reads the contents of the next record. Note if the result code is ERR_ENTRIES_REMAINING, data has been successfully copied to pTraceBuffer, but more data can be read by a subsequent call. (Either because the destination buffer was too small, or because new data has been recorded in the mean time.) Note Data is always returned in little endian byte order even if the device has big endian byte order. InOut: Scope Name Type Comment Return TraceMgrPacketReadNext RTS_IEC_HANDLE Returns the runtime system error code (see CmpErrors.library): ERR_PARAMETER if hPacket is not a valid packet handle or if hPrevRecord is not a valid record handle ERR_NO_OBJECT if there is no next record ERR_NOTINITIALIZED if the packet is not complete ERR_TIMEOUT if reading took too long ERR_ENTRIES_REMAINING if more data can be read by a subsequent call (this is not an error) Input hPacket RTS_IEC_HANDLE The trace packet handle hPrevRecord RTS_IEC_HANDLE The trace record handle of the current record Inout pTraceBuffer TraceRecordEntry Pointer to the destination buffer pulReadBytes UDINT Size of the destination buffer in bytes (in), number of bytes copied (out) pResult RTS_IEC_RESULT The result code
TraceMgrPacketReadNext2 (FUN) ¶ FUNCTION TraceMgrPacketReadNext2 : RTS_IEC_HANDLE Reads the contents of the next record, starting at a given time stamp. Only entries with a time stamp greater than or equal to ulTimestamp are copied. If the time stamp is zero, the function behaves like TraceMgrPacketReadNext . Note if the result code is ERR_ENTRIES_REMAINING, data has been successfully copied to pTraceBuffer, but more data can be read by a subsequent call. (Either because the destination buffer was too small, or because new data has been recorded in the mean time.) Note Data is always returned in little endian byte order even if the device has big endian byte order. InOut: Scope Name Type Comment Return TraceMgrPacketReadNext2 RTS_IEC_HANDLE Returns the runtime system error code (see CmpErrors.library): ERR_PARAMETER if hPacket is not a valid packet handle or if hPrevRecord is not a valid record handle ERR_NO_OBJECT if there is no next record ERR_NOTINITIALIZED if the packet is not complete ERR_TIMEOUT if reading took too long ERR_ENTRIES_REMAINING if more data can be read by a subsequent call (this is not an error) Input hPacket RTS_IEC_HANDLE The trace packet handle hPrevRecord RTS_IEC_HANDLE The trace record handle of the current record ulTimestamp UDINT The time stamp (relative to the trace start time) from where to start copying Inout pTraceBuffer TraceRecordEntry Pointer to the destination buffer pulReadBytes UDINT Size of the destination buffer in bytes (in), number of bytes copied (out) pResult RTS_IEC_RESULT The result code
TraceMgrPacketResetTrigger (FUN) ¶ FUNCTION TraceMgrPacketResetTrigger : RTS_IEC_RESULT Resets the trigger of a trace packet. The start time and date of of the trigger is reset to 0 and the trigger is set to state enabled (if it is not disabled). InOut: Scope Name Type Comment Return TraceMgrPacketResetTrigger 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
ComponentId (GVL) ¶ InOut: Scope Name Type Initial Constant CMPID_CmpTraceMgr UDINT 16#70