Sorting with CODESYS OPC Data Access

Requirements

Downloads

CODESYS OPC DA.zip

This sample provides a CODESYS project ready to download to the CODESYS Control Win and control the Sorting by Height (Advanced) scene.

  1. Download the zip archive (top of this page), extract it and open the project in CODESYS.

  2. Right-click on CODESYS Control Win PLC icon (Systray) and select Start PLC.

    codesys softplc

  3. If prompt to update the project, click on Set all to newest and next on OK

    codesys project update

  4. Double click on Device (CODESYS Control Win V3) from the Devices panel (1) and click on Scan Network... (2).

    codesys select device

  5. Select the Device displayed in the Gateway-1 and click OK (3). If no device is shown check that you have properly started CODESYS Control Win V3 (step 2).

  6. Launch the OPC Configurator.

    opc configurator

  7. Change the Update Rate to 10 (ms). Now, right-click on the PLC, select Rename PLC and type in PLC_GW3. This is the name of the PLC used by the Factory I/O scene. Click on File > Save. You may now close the OPC Configurator.

    opc configurator

  8. Click on Online > Login (Alt+F8). When prompted to download the program to the PLC, click on Yes. Next, click on Debug > Start (F5).

  9. Copy the file Tutorial (CodeSys DA).factoryio to Documents\Factory IO\My Scenes on your computer.

  10. Start Factory I/O, press Ctrl + O and open that scene.

  11. Finally, switch to Run mode.