Introduction to hydraulics (parameters, runtime values) required for the axis are integrated in this structure. The communication of the function blocks of an axis is based on shared use of this reference. The only exceptions are the signals defined by PLCopen. The Execute input can be controlled by the Done output of another function block, for example, in order to create a desired sequence. Structure of an application In a PLC application realized with the hydraulics library, a distinction should be made between three different types of function block: System function blocks related to all axes. This includes communication with the PlcMcManager IBN tool or handling of message recording.
Regardless of the number of axes, these function blocks must be instantiated exactly once per project and called up exactly once per cycle. This should obviously be done from the Main() routine of a program. Function blocks used for the configuration of an axis. These include, for example, the encoder function block and the set value generator etc. Exactly one instance of these function blocks must be created for each axis. The call should be made exactly once per cycle. Function blocks related to an axis. These include, for example, the MC_MoveAbsolute_BkPlcMc function block and the MC_Stop_BkPlcMc function block etc.
More than one instance of these function blocks can be created for each axis. As a rule, the call must be made exactly once per cycle. If the application has only one axis, this difference is less clear, but must still be considered. System function blocks The system function blocks include the following: MC_AxAdsCommServer_BkPlcMc() This function block provides an joint ADS connection for the PlcMcManager for all axes. If this function block is not called cyclically, no connection is established. MC_AxRtLoggerSpool_BkPlcMc() or MC_AxRtLoggerDespool_BkPlcMc This function block manages the message buffer.
If exactly one of these function blocks is not called cyclically, the message buffer overflows, and subsequent messages are lost. As you can see, the system function blocks require access to all affected structures. At the same time, the axis-related function blocks also require access. This can be easily ensured by creating the structures as VAR_GLOBAL. This is shown in the examples and applies especially to: The axis references. They should be created as ARRAY[1... number of axes] OF Axis_Ref_BkPlcMc. ◦This means that it is not possible to distribute the axis references in modules of the application. ◦There is an alternative method that works with POINTER lists.
Special care is required in his case. This method is therefore not recommended for general use. The message buffer of type ST_TcPlcMcLogBuffer. The buffer is shared by all axes, and the management function block therefore cannot be assigned to an axis. Function blocks for the structure of an axis These always include: The initialization function block MC_AxUtiStandardInit_BkPlcMc(). The function blocks of the actual value acquisition. These always include a function block of type MC_AxRtEncoder_BkPlcMc() and one or more function blocks for determining pressures or forces, as required. Filtering can be used, if necessary.
A function block of type MC_AxRuntime_BkPlcMc() for setpoint generation. This function block contains a standard position controller. A function block of type MC_AxAxRtFinish_BkPlcMc() or MC_AxRtFinishLinear_BkPlcMc. Various output parameters are combined here, and a section-by-section or characteristic curve-controlled output linearization is carried out. A function block of type MC_AxRtDrive_BkPlcMc() that adapts to the I/O variables of the output hardware. PLC Library Hydraulics 12 Version: 1.4