The PLC functions listed in the Generate PLC schematic dialog are used when the schematic is generated, i.e. the suitable functions are assigned to the macros.
The functions in the macros are suitable under the following conditions:
- For PLC connection points the function category and the connection point designation must agree.
- If the connection point designation of the PLC connection to be used contains a leading question mark, then the channel must agree.
- A connection point designation with a leading question mark never overwrites a connection point designation without a question mark.
- For PLC boxes the function definitions must agree.
The macros can contain functions that cannot be used, e.g., surplus PLC functions or functions that are not PLC boxes or connection points. For example, the wiring macros do not contain PLC functions.
These functions get their data from the macro or – if the macro contains placeholder objects – from the value sets that are assigned to the variables. The variables are not intended for assigning values to PLC functions, these receive their values when they are used.
DTs of functions in the wiring macros and from additional functions in the PLC macros
The DTs of newly added functions are inserted according to how they are defined in placeholder objects or directly in the macro.
If a DT with a question mark is specified in the placeholder object, e.g., "?K1" (question mark, identifier and a number at the end), or there is no placeholder and a DT with a question mark exists in the macro (e.g. "-?K1") then the device is renumbered on insertion. Those with question marks, identical identifiers, and the same number in placeholder objects receive the same name.
If only a question mark is entered into the placeholder object then this is placed in front of the identifier of the DT in the macro and all DTs with question marks, identical identifiers, and the same number receive the same name.
Main functions in the PLC macro variants
- If the macro variants contain a PLC box that is not a main function, and a placed PLC box does not yet exist, then this box remains an auxiliary function and is generated as an additional function. This additional function adopts the data from the (unplaced) main function. An unplaced main function and a placed auxiliary function with the same data are thus generated.
- If the macro variants contain a PLC box that is a main function, and a placed PLC box does not yet exist as the main function, then this box is placed as the main function and adopts the data of the existing main function. I.e. the existing main function is used.
- If the macro variants contain a PLC box that is a main function, and a placed PLC box already exists as the main function, then the newly inserted box becomes an auxiliary function. It is generated as an additional function that used the data from the main function. I.e. an additional placed auxiliary function with the same data is generated.
See also