<< Click to Display Table of Contents >> Navigation: »No topics above this level« Macros |
mapp Services V5.16
This section explains how macros work.
Macros are required to program in the ladder editor. Macros are predefined so that the user does not have to know the names of the process variables by heart. This can be "Axis initialized", for example. This means that the user does not have to check whether the axis is switched on, referenced and ready for a command, but can use a macro to check these states and perform an action.
A macro can be an action or condition.
Macros must be defined in the MpCodeBox configuration. For information about how these must be defined, see here.
Condition
A condition represents a state of the machine. Any value can be processed; the result must always be a Boolean value. This means that the condition can be either TRUE or FALSE.
Conditions are always shown as contacts in the ladder editor. Examples of conditions:
•Mold open
•Product ready
•Button pressed
•State of digital input
Action
An action triggers a defined command. Only Boolean values can be processed. This means that the action can either be TRUE or FALSE.
Actions are always shown as coils in the ladder editor. If a condition occurs, then an action is triggered. Examples of actions:
•Start conveyor
•Stop conveyor
•Open mold
•Set digital output
Arguments
Arguments are additional parameters that can use conditions and actions. Arguments are defined in the MpCodeBox configuration in section Arguments. Different argument types can be created. For example, an index argument can be defined that can be used as a counter variable in arrays.