Access Codesys Tag Values Via REST API?

We are evaluating using the EPIC for a large number of asphalt plant automation installs.

Our primary application lives in the browser. If our plant automation logic is written using the Codesys runtime are those tags/variables accessible through the documented PAC Control REST API?

We are primarily web devs, so working at the HTTP / REST API layer is our comfort zone.

Lets ping @greichert for this one.
He’s up at ICC, so hang in there for a reply.
I’m not sure what REST options Codesys has, so am interested in the answer as well.

1 Like

There are couple of ways you can do this in your application. First is to purchase the IIoT Library from Codesys. This library has a “Web Client SL”,

  • The library “Web Client SL” contains function blocks for communicating with a web server via HTTP or HTTPS.
  • The HTTP method GET requests data from a web server.
  • The HTTP methods POST and PUT submit data from the controller to a web server.

Alternatively you could also use the MMP function. This allows you to write to scratchpad, which then you have the ability to use our RESTful API to access these tags.

4 Likes

Thanks @greichert

In lieu of writing to the scratchpad I think we will investigate going a more “native” Codesys route and publishing the tags via MQTT.

1 Like