PacDrive LMC controllers offer two ways to manage the data transfer between the application and the fieldbus:
Polling mode
Interrupt mode
In Polling mode, the bus cycle task runs as a regular cyclic application task and tries to get new fieldbus data in each cycle. The fieldbus task runs on the dedicated NetX chip of the Profinet IO controller. If there is no new valid fieldbus data, the next attempt to read new data is made after a fixed waiting time. This is repeated until new fieldbus data is available. The execution of the application code of this task is suspended until new valid fieldbus data is available. The bus cycle task is triggered independently of the fieldbus cycle. While this is hardware-independent, it incurs longer cycle times.
In Interrupt mode, the NetX chip of the Profinet IO controller sends an interrupt signal as soon as new fieldbus data is available. This immediately triggers the application task. Interrupt mode is considerably faster than Polling mode since no waiting time is involved. The order of magnitude of the speed benefit depends on your application.
Step |
Action |
---|---|
1 |
Double-click the Profinet IO controller to open its device editor, and click on the PNIO I/O Mapping tab. |
3 |
From the Bus cycle task listbox, select the required task. For example, you can select TASK_SR_Main or a different task that you have created. |
4 |
Double-click the task you have selected in the previous step. |
5 |
In the Configuration tab, select External from the Type listbox. |
6 |
From the External Event listbox, select the appropriate event, depending on the fieldbus interface you have configured for your Profinet IO controller on the NetX Settings tab of the device editor:
NOTE: As opposed to other tasks triggered by external events, the priorities of PROFINETCONTROLLER_IRT_n events are used by the system.
|