Integrating non-IEC 61131-3 Programs into the PLCnext Technology Task Scheduling
When working with a PLCnext Technology controller, you can also instantiate non-IEC 61131-3 programs you have included as libraries.
- Include externally developed programs as library in the 'Libraries' category in the COMPONENTS area. Right-click the 'Libraries' folder, select 'Add User Library...' from the context menu and browse for the library file.
After including such a library (see (1), in the example figure below), its content is automatically sorted into the corresponding category of the COMPONENTS area. In case of PLCnext programs, this is the 'PLCnext Components & Programs' category (2) which then contains a folder with the library name.
- Double-click the 'PLCnext' node in the PLANT and open the 'Tasks and Events' editor.
- In the 'Tasks and Events' table, specify a new task, if required. In case of a multicore controller, note that tasks have to be defined under the respective core (ESM node).
- Create a program instance as follows: In the task table, left-click into the 'Program Type' field, which is showing the text 'Select program type here' or move the table cursor using the arrow keys or <Tab>/<Shift>+<Tab> to this table field and press <Enter>.The Role Picker appears. Select a folder in the tree on the left and then the program on the right by clicking it or pressing the <Enter> key. By selecting and thus inserting the program, a program instance is created. You can edit the default instance name, if desired. Instantiated non-IEC 61131-3 programs are also visible under the 'PLCnext' PLANT node like IEC programs.
- Open the GDS Port List editor of the 'PLCnext' node. This list shows all ports which are available in the project. Here, also the ports of the newly instantiated external program are provided and can be mapped to other ports of IEC 61131-3-compliant programs or non-IEC 61131-3 programs.The handling of the Role Picker for mapping IN and OUT ports is described in the topic " GDS Port List ".
Further Info
Also refer to the help chapter "Matlab® Integration" which describes how to use Matlab models in your solution. |