H2: Auxiliary function outputs to PLC
8.13 Block-search response
Basic Functions
442
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
Part program (section):
During the block search, the auxiliary function M9 is collected for groups 5 and 6.
Scan of the collected M auxiliary functions:
M function of the fifth group: $AC_AUXFU_M_VALUE [4] = 7
M function of the sixth group: $AC_AUXFU_M_VALUE [5] = 9
8.13.3
Time stamp of the active M auxiliary function
When outputting collected auxiliary functions following a block search, attention must be paid to the sequence
during collecting. For this reason, each group is assigned a time stamp which can be queried on a group-specific
basis by way of the system variable below:
$AC_AUXFU_M_TICK[<n>] (time stamp of the active M auxiliary function)
8.13.4
Determining the output sequence
Function
The following predefined procedure is provided to simplify the process of determining the output sequence of M
auxiliary functions for the programmer:
AUXFUMSEQ(VAR INT _NUM_IN, VAR INT _M_IN[], VAR INT _EXT_IN[], VAR INT _NUM_OUT,
VAR INT _M_OUT[], VAR INT _EXT_OUT[])
Program code
...
N10 ... M8
N20 ... M9
N30 ... M7
...
Input parameters:
VAR INT _NUM_IN
:
Number of relevant M commands
VAR INT _M_IN[]
:
Field of relevant M codes
VAR INT _EXT_IN[]
:
Field of relevant M address extensions
Output parameters:
VAR INT _NUM_OUT
:
Number of determined M codes
VAR INT _M_OUT[]
:
Field of determined M codes
VAR INT _EXT_OUT[]
:
Field of determined M address extensions