Setting up an IO task
An IO task has to be set up in the TwinCAT System Manager tree under Real-time configuration:
Right-click on Additional tasks for adding a task (IO task):
The task name can be modified in the dialog that appears:
The IO task settings can now be adjusted in the right half of the window:
Click on the Auto start check box in order to adjust the fieldbus cycle time under Cycle ticks. The port for the FcIoApi DLL function calls is also required, all other parameters can remain unchanged.
Linking the IO task with the fieldbus device
At least one IO task variable has to be linked with the fieldbus device. This is done via the IO task inputs in the tree:
Right-clicking brings up a pop-up menu through which a new variable can be appended:
In the variable dialog, the variable name, start address (address in the process image of the IO task), and variable type can be specified:
Now select the variable assigned to the fieldbus device by clicking on the Linked w. button in the "Variable" tab in the window on the right:
The variables available for linking are now displayed in the "Variable link" dialog. Select the associated variable and confirm with OK:
The "Variable" tab now shows the link information.
Starting the fieldbus
Finally, save the project in the registry (via the registry icon in the System Manager) and start TwinCAT (via the TwinCAT icon in the TwinCAT System Manager or in the Icon bar at the bottom right).
The fieldbus should now start up. The states can be diagnosed or outputs set via the System Manager.
Documents
The functionalities of the Beckhoff PCI card FC310x (as Master and Slave) for use under TwinCAT (NCI, PTP, PLC and IO) is described below.
The following sections also apply to the PROFIBUS connection for the CX1000 (CX1500-M310 (master) or CX1500-B310 (slave)); the name FC310x then also refers to the CX1500-M310 master or CX1500-B310 slave connection.