TraceMgrRecordUpdate3 (FUN)
FUNCTION TraceMgrRecordUpdate3 : RTS_IEC_RESULT
Stores one entry in the ring buffer of a trace record.
This function can be used to provide the data for so called system parameters from the IEC application. (See TRACE_VAR_ADDRESS_FLAGS_SYSTEM.) If more than one single entry is to be added, consider using TraceMgrRecordUpdate2 instead.
Note
in contrast to TraceMgrRecordUpdate2, the time stamp of the entry is not provided by the caller but set inside TraceMgrRecordUpdate3.
Note
If pData is 0, the current value of the trace variable is read, i.e. the function behaves TraceMgrRecordUpdate.
- InOut:
Scope
Name
Type
Comment
Return
TraceMgrRecordUpdate3RTS_IEC_RESULT- Returns the runtime system error code (see CmpErrors.library):
ERR_PARAMETER if hPacket or hPrevRecord is not a valid handle, or if ulLen differs from the size of the trace variable
ERR_NOTINITIALIZED if the packet is not currently recording (not started, trigger reached, …)
ERR_PENDING if no value is recorded for this cycle due to TracePacketConfiguration.ulEveryNCycles
ERR_FAILED if pData is 0 and the current value of the trace variable cannot be read
Input
hPacketRTS_IEC_HANDLEThe trace packet handle
hRecordRTS_IEC_HANDLEThe trace record handle
pDataPOINTER TO BYTE
The address of the variable value to copy, if pData is null the function behaves like TraceMgrRecordUpdate
ulLenUDINTThe length (in bytes) of the variable value