Introduction to programming a functional module
A functional module has a program directory (
or ) that may contain program elements:Program Unit (only for Modicon M580 an M340)
LD, ST, FBD, IL sections
SFC sections
For more detailed information, refer to chapter Application Program structure.
Various cases may arise when programming a functional module:
Case 1: the program element already exists in the structural view
Case 2: creating the program element using the functional view
Case 3: importing a program element using the functional view
Case 1: the program element already exists in the structural view
The program element has already been created in the structural view:
Step |
Action |
---|---|
1 |
Select the program element. |
2 |
Move the program element to the functional module. |
Case 2: creating the program element using the functional view
The following table shows how to create a program element:
Step |
Action |
---|---|
1 |
In the , right-click the or directory in the functional module directory. |
2 |
Select the command from the contextual menu. |
3 |
Select either , , or . |
4 |
Enter the various headings in exactly the same way as for creating a program element from the structural view. The name of the functional module is shown again at the structural view level. |
Case 3: importing a program element using the functional view
The following table shows how to import a program element:
Step |
Action |
---|---|
1 |
In the , right-click the or directory in the functional module directory. |
2 |
Select the command from the contextual menu. |
3 |
In the Import dialog select the file to be imported. |
4 |
Click on the button to finish the import. |
When using the functional view to import a program element that does not have its task in the importing application, the program element is attached to the MAST task.
CAUTION | |
---|---|
Rules
Take into account the following notes:
1 |
An SFC section can only be created off-line and then only in the MAST task. |
2 |
A macro-step or an event can only be created off-line. |
3 |
The other actions are authorized in off-line mode, with the PLC at Stop or in Run. |
4 |
The protection of a module applies to all the program elements attached to the functional module and to the lower level modules. |