Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84265members
353371posts

HTTP API Post requests to a specify URL

Machine Automation Forum

A forum addressing machine automation solutions for the complete machine lifecycle. Including offers like Machine Advisor, Modicon PLC/PacDrive, Lexium or Preventa. Discuss and share knowledge on offers relating to cloud-based service platforms, machine localization and monitoring, industrial operations control, motion products as well as safety function!

LlewellynLouw
Cadet
0 Likes
3
3654

HTTP API Post requests to a specify URL

Is there a Function Block in Somachine to create a basic HTTP API Post request to a specify URL?

 

Something like https://www.abc.com//DataApi/NewReading?data=DSTRT|25062019112205|00001|DEND

 

The processor is question is a M251SESE connected to the internet with LTE router.

 

Thank you 

 

Llewelyn Louw

 

3 Replies 3
KamenTcho
Ensign Ensign
Ensign
2
3563

Re: HTTP API Post requests to a specify URL

Hi,

 

I have not tried to do anything like this - HTTP implementation on a PLC, that is a bit away from where I am a bit more comfortable, but have you had a look at this library,

https://www.schneider-electric.com/en/download/document/EIO0000002803/ 

and that Example guide:

https://www.schneider-electric.com/en/download/document/EIO0000002827/

Perhaps it would be enough to get a TCP connection to get it going in a more simple way...

 

Besides httpS is a show stopper. Not there yet.

You could consider the MQTT perhaps (soon over TLS, in M262):

https://www.schneider-electric.com/en/download/document/EIO0000002773/

 

Who knows - maybe someone will suggest better idea...

Good luck!

 

 

Аdvanced support on PLCs and HMIs for fun and glory
LlewellynLouw
Cadet
1
3548

Re: HTTP API Post requests to a specify URL

Thank you Kamen

 

I haven't seem some of the reference material. In the end, what I did was to use a 3rd party Linux based solution running Node Red to read the values from the PLC (Modbus) and handle the http request in Node Red.

 

MQTT was not an option in this case as the API (with the http Post implementation) was provided by the client. It seem the M262 will open a lot of doors for us in the future - fingers crossed.

 

Llewellyn Louw

 

Laurent_F
Ensign Ensign
Ensign
0 Likes
0
3437

Re: HTTP API Post requests to a specify URL

Hi

 

FYI, related topic inside EcoStruxure Machine Expert (the new name of SoMachine)

 

    • There is a project example with Modicon M262 that presents the way to use either HTTPs or MQTTs protocols within dedicated 

      A guide called "MQTT Handling Example Guide" is also delivered (Software > Libraries, Templates and Examples > Example Guides > MQTT Handling Example Guide)
 
The project examples can be found inside EcoStruxure Machine Expert software:  File > new project > From Example