TwinCAT PLC Library Hydraulics - Version 1.4 — 4.4.9.1 MC_AxRtCommandsLocked_BkPlcMc : DWORD

PLCopen Motion Control Entry : The number of the message to be read. pBuffer : This parameter is used to transfer the address of a variable of type ST_TcPlcMcLogBuffer [ } 107] . pEntry : Here, the address of a variable of type ST_TcPlcMcLogEntry [ } 108] should be transferred as target. Result : Here, a coded cause of error is provided. Behaviour of the function block The function block checks the transferred input values with each call. Two problems can be detected during this process: If Entry is not in the valid range (1..20), the function block returns dwTcHydAdsErrInvalidIdxOffset as Result .

If pBuffer or pEntry are not defined, the function block returns dwTcHydAdsErrNotReady as Result . If no problem was detected during the check, the function block copies the message selected by Entry from the LogBuffer pBuffer into the message structure addressed with pEntry . Entry is regarded as relative age indication: Use Entry:=1 to select the message that was entered last, with Entry:=2 the next older message, etc. If the requested message is not available, an empty message is provided. 4.4.8.6 MC_AxRtLoggerSpool_BkPlcMc (from V3.0) The function block deals with transferring messages from the LogBuffer of the library into the Windows Event Viewer.

Further information about creating a log buffer can be found under FAQ #10 in the Knowledge Base [ } 218] . VAR_INOUT pBuffer: POINTER TO ST_TcPlcMcLogBuffer; END_VAR pBuffer : This parameter is used to transfer the address of a variable of type ST_TcPlcMcLogBuffer [ } 107] . Behaviour of the function block With each call the function block removes a message from the LogBuffer and transfers it to the Windows Event Viewer. If the computer uses a write-restricted mass storage medium (typically FLASH DISK), it makes no sense to use the Windows Event Viewer. An MC_AxRtLoggerDespool_BkPlcMc [ } 186] function block can be used to generate a history in any case.

4.4.9 Utilities 4.4.9.1 MC_AxRtCommandsLocked_BkPlcMc : DWORD The function simplifies setting and deleting of a protective function in the status double word of an axis. PLC Library Hydraulics 187 Version: 1.4