Knowledge Base If one of the components mentioned here is used, then one of the drive function blocks provided will usually be used. These interfaces of these function blocks are not guaranteed and should therefore not be called directly by the application. It is better to set the drive type according to the constants in E_TcMcDriveType [ } 72] under nDrive_Type in ST_TcHydAxParam [ } 93] , and to use a function block of type MC_AxRtDrive_BkPlcMc [ } 125] . NOTE! If only the usual function blocks (encoder, generator, finish, drive) for the axis are to be called, a function block of type MC_AxStandardBody_BkPlcMc [ } 181] should be used for simplicity. FAQ #8:
In what order should the function blocks of an axis be called? 1. Obligatory: all function blocks, which detect the actual status of the axis. These include function blocks of types MC_AxRtEncoder_BkPlcMc [ } 135] , MC_AxRtReadPressureDiff_BkPlcMc [ } 156] or MC_AxRtReadPressureSingle_BkPlcMc [ } 158] . 2. Usual: function blocks or commands, which update the enable signals of the axis. This is usually a function block of type MC_Power_BkPlcMc [ } 26] . For axes with an incremental encoder, which is refer- enced using a cam, a function call MC_AxRtSetReferencingCamSignal_BkPlcMc is used in addition. 3. Optional:
Function blocks, which derive a decision or trigger a command based on an actual axis sta- tus, an I/O signal or an application signal. For example, an axis start can be triggered in response to the signal of a proximity limit switch, or an axis movement can be stopped before the target position is reached, depending on the pressure increase. 4. Obligatory: Control value generators such as function blocks of type MC_AxRuntime_BkPlcMc [ } 167] . 5. Optional: Various controllers can be called at this point, as required. This can be a function block of type MC_AxCtrlSlowDownOnPressure_BkPlcMc [ } 119] or similar. 6. Obligatory:
An adaptation function block of type MC_AxRtFinish_BkPlcMc [ } 175] . 7. Optional: If required, a function block for the automatic commissioning can be called at this point. 8. Obligatory: An output function block of type MC_AxRtDrive_BkPlcMc [ } 125] . Instead of the library function blocks, application function blocks can be used. However, one should check carefully whether this is necessary, in which case compatibility with the library must be ensured. In some applications this may become necessary, in order to adapt a non-standard sensor or actuator, or to solve a special control task. FAQ #9: How do I control a valve output stage (on-board or externally)?
The ST_TcPlcDeviceOutput [ } 106] structure is intended for the bPowerOn and bEnable signals and for controlling the output stage supply and activation. Both signals are set by function blocks of type MC_Power_BkPlcMc [ } 26] , if the input Enable is set. At the same time this function block sets the software controller enable in ST_TcHydAxRtData [ } 99] . nDeCtrlDWord [ } 236] . The ST_TcPlcDeviceInput [ } 104] structure is intended for the signals bPowerOk, bEnAck and bReady for the output stage supply control, feedback from the output stage activation and the status signal. The differences in the signals provided by different manufacturer can be very significant.
Currently, only the bPowerOk signal is used for specifying the Status output of the MC_Power_BkPlcMc [ } 26] function block. If no suitable signal is available, or if no monitoring is to be realised, ST_TcHydAxParam [ } 93] .bDrive_DefaultPowerOk should be set. FAQ #10: How do I create a message buffer? Direct output of messages from the function blocks would result in runtime variations that would be difficult to calculate. For this reason, the messages are stored in a buffer and output in the Windows Event Viewer one after another, if required. In order to be able to use a message buffer, a variable of type ST_TcPlcMcLogBuffer [ } 107] must be created.
This buffer is used to hold the messages from all axes. It is important that only one such variable is created in the project, irrespective of the number of axes. The address of this buffer should be transferred to the MC_AxUtiStandardInit_BkPlcMc [ } 182] function blocks of all axes, together with the addresses of the other PLC Library Hydraulics 227 Version: 1.4