Upload the PLC source code from the target

It's possible you need to modify your PLC source code to fix problems after running it for a while, but you didn't do the version control. In this case, you need to get the source code back from the KINGSTAR PLC Runtime. KINGSTAR LogicLab can help you. It's able to upload the PLC source code from the target and rebuild a project from it, even if you have deleted the compiled file.

  1. In KINGSTAR Control Panel, turn on KINGSTAR PLC.
  2. In KINGSTAR LogicLab, on the File menu, click Import project from target.
  3. NOTE:  You can do this after you start KINGSTAR LogicLab without creating or opening any project.

  4. In the Import project from target dialog box, click KINGSTAR PLC, and click Configure Connection.
  5. In the Device Link Manager Config dialog box, click Properties.
  6. In the Gdb Config dialog box, change the connection settings. See Configure connections to the KINGSTAR PLC Runtime to set up the connection settings. In this guide we use the following settings:
  7. Port: TCP/IP

    IP address: 127.0.0.1

    Port: 5000

    Timeout: 1000

    When you finish editing, click OK.

    NOTE:  You need to manually change the connection settings every time you import the project from target.

  8. In the Device Link Manager Config dialog box, click OK.
  9. In the Import project from target dialog box, click Upload Sources.
  10. NOTE:  To ensure you have connected to KINGSTAR PLC Runtime, you can click Verify Connnection, but this is not a mandatory step.

  11. In the Browse For Folder dialog box, select a folder to store the uploaded files and click OK.
  12. The project is rebuilt from the source files.