Beckhoff / ADS

Beckhoff protocol to communicate with TwinCAT devices.
MIT License
513 stars 194 forks source link

Unclear README instruction: How do we download the example to the target? #57

Closed ceremcem closed 6 years ago

ceremcem commented 6 years ago

Maybe a total newbie question, but to get up and running quickly, I'm trying to load the example PLC code to the simulator of TwinCAT, but the following instruction has no meaning to me:

Download your PLC project to your target e.g. "PLC-TestProject" of our GitHub repository.

What does that mean? .sln files are C# project files AFAIK, how can I load a C# project to the PLC?

pbruenn commented 6 years ago

Indeed, you need to compile the PLC project and then upload it to your PLC. This README cannot cover all aspects of ADS and TwinCAT so I like to refer you to our Infosys: https://infosys.beckhoff.com/content/1033/tc3_plc_intro/2525041803.html?id=7770895129335440874

Two more common problems:

  1. You cannot use this OpenSource lib to connect to a TwinCAT server on localhost.
  2. Make sure you setup your ADS/AMS routes correctly
ceremcem commented 6 years ago

So I understand that the "PLC-TestProject" is for TwinCAT-3 and not for TwinCAT-2. I'm not able to find such a menu option in TwinCAT-2.

In fact, you've explained ADS/AMS route settings so clear (1, 2, 3) that I won't be able to create connection with node-ads without these instructions.

pbruenn commented 6 years ago

Yes, PLC-TestProject is a TwinCAT 3 project. If you were able to connect to your TwinCAT server with node-ads. It should be straightforward to adjust example/example.cpp to read exactly the same values.

ceremcem commented 6 years ago

I'm currently not capable of editing the example/example.cpp but this issue can be considered as "answered". Thank you.