TwinCAT PLC Library Hydraulics - Version 1.4 — 5.1 FAQs (from V3.0)

Knowledge Base individual axis components. This function blocks are usually called in the initialization part of the project. This address is stored in the element pStAxLogBuffer in the structure Axis_Ref_BkPlcMc [ } 67] and by the function block. nLogLevel in Axis_Ref_BkPlcMc [ } 67] is used to specify the significance level threshold for storing messages in the buffer. The values [ } 244] to be used are defined in the global variables of the library. Note that this setting is required for each axis. The library function blocks detect the preparations mentioned above and will commence issuing messages.

However, if the message output is enabled, the buffer would fill up quickly and not accept further messages. There are two ways to avoid this. FAQ #10.1: Passing on messages to the Windows Event Viewer In order to transfer messages from the LogBuffer of the library to the Windows Event Viewer, a function block of type MC_AxRtLoggerSpool_BkPlcMc [ } 187] should be called cyclically. Witch each call a message is removed from the LogBuffer. NOTE! Computers running Windows CE are also capable of amending an Event Viewer for the messages created by TwinCAT. To this end this service is emulated by the TwinCAT system service. However, usually only a flash disk will be available.

In order to avoid overloading the relatively small message capacity of the Event Viewer, only errors should be logged. FAQ #10.2: Deleting the oldest messages In order to ensure a minimum number of messages that can be handled, a function block of type MC_AxRtLoggerDespool_BkPlcMc [ } 186] should be called cyclically. With each call, this function block removes the oldest message from the LogBuffer, until a transferred number of free messages is available. The deleted messages are lost. FAQ #10.3: Generating logger entries through the application An application can output a message either axis-related or non-axis-related.

The function blocks MC_AxRtLogAxisEntry_BkPlcMc [ } 184] and MC_AxRtLogEntry_BkPlcMc [ } 185] are available for this purpose. FAQ #11: How do I abort monitoring of a function? Some library function blocks start an activity, for which cyclic calling is no longer essential. However, these function blocks are also structured according to the rules of the PLCopen Motion Control guidelines in such a way that they fully monitor the activity and present it at their outputs. This is indicated by the output Busy, which most function blocks provide. Omitting the cyclic call of a function block that is in this monitoring state would usually result in significant problems.

The next function start with the respective function block would have problems with evaluating the edges at its inputs, or it would detect that meanwhile the axis has executed another function and indicated a problem that doesn't exist (CommandAborted). In older versions of the library a function block of type MC_AxUtiCancelMonitoring_BkPlcMc() was provided, which for a few motion functions aborted the monitoring by the function block initiating the function. This function block is no longer required, in view of the fact that in the meantime the PLC Open rules have been implemented more fully.

To instruct a function block to terminate monitoring its function, in most cases it is sufficient to call it once or several times with Execute :=FALSE. This applies in particular to MC_MoveAbsolute_BkPlcMc [ } 60] (), MC_MoveRelative_BkPlcMc [ } 63] () and MC_MoveVelocity_BkPlcMc [ } 64] (). Subsequently, a new functionality can be started in same or a later cycle with the same function block or an instance of the same or another type. This procedure can be repeated as required. NOTE! Complex functions consisting of several sub-actions such as MC_Home_BkPlcMc() require the function block to be called continuously, since the function block organizes the required processes itself.

MC_Home_BkPlcMc()) [ } 57] PLC Library Hydraulics 228 Version: 1.4