REST Client in CODESYS - Send RESTFUL Commands to a REST API from PLC

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ก.พ. 2025

ความคิดเห็น • 33

  • @andrewott33
    @andrewott33 ปีที่แล้ว +1

    Thanks for creating this tutorial, very helpful and easy to follow.

  • @rasmusahlgren9777
    @rasmusahlgren9777 4 หลายเดือนก่อน

    Thank you for the video. Any chance you remember what troubling shooting you did at 20:10

  • @brunoarruda2871
    @brunoarruda2871 ปีที่แล้ว +1

    Excellent tutorial! Thank you for sharing!
    Question: I'm replicating this demonstration in simulation mode (I don't have a PLC yet), but the communication is busy. Do I need to configure anything else?

    • @brightersidehacks
      @brightersidehacks  ปีที่แล้ว

      Hello, i am afraid you wont be able to make it work in simulation mode because the codesys soft PLC is not routed.

  • @matheusaragao2884
    @matheusaragao2884 ปีที่แล้ว

    Thank you my friend, excelent video!

  • @billytakoumbo3687
    @billytakoumbo3687 ปีที่แล้ว

    Great job man 😮
    But It can’t work in simulation mode so it would be great if you give us more information about the configurations.
    Are -“Q300_Modbus”,
    -”Device(TN-UHF…)” important to the realization of this test??

    • @brightersidehacks
      @brightersidehacks  ปีที่แล้ว

      The rest client needs a real routed ip address to communicate with the REST API. In Simulation mode, you dont have that. You will need a real PLC to make this work. The “Q300_Modbus” is just the name of the project and the ”Device(TN-UHF…)” is my PLC that i am using. I hope this helps. Let me know if you have any more questions

  • @alperenakdas4424
    @alperenakdas4424 วันที่ผ่านมา

    I downloaded the library and tried to redo what he exactly did. My Http Block looks more simple and with less inputs/outputs. I tried to do it myself with the help of the library but couldnt accomplish. Did/does anyone else have the same problem as me?

    • @brightersidehacks
      @brightersidehacks  วันที่ผ่านมา

      Didi you use the exact function block as is in the video?

    • @alperenakdas4424
      @alperenakdas4424 วันที่ผ่านมา

      @@brightersidehacks thanks for the fast reply. I deleted and downloaded the library again and it worked! I have another question tho. Can I do the same with a raspberry pi, not with a plc? Great video btw!

    • @brightersidehacks
      @brightersidehacks  วันที่ผ่านมา +1

      @@alperenakdas4424 Yes, it works, i have used it several times with RPI

  • @usernamekitkat
    @usernamekitkat 6 หลายเดือนก่อน

    Thank you Man , Much appreciated. I just mange to Read API on A FESTO PLC . Would love to have more help in development as i have to read values every minute. But how do you get a single value from the entire header. How do you isolate it ?

    • @brightersidehacks
      @brightersidehacks  6 หลายเดือนก่อน

      Well, it depends on the format of the data returned. is your data in JSON format?

    • @usernamekitkat
      @usernamekitkat 6 หลายเดือนก่อน

      @@brightersidehacks
      I recieve it like this at your example
      Below is an example for test. Which i manage to read it all. But how can i read only one line and get only the number 123.456 from the below content. Which other Command can i use to take the specific value.
      Example
      {
      "Binary1":True,
      "Binary2":False,
      "None":null,
      "Empty":""",
      "Float":123.456,
      "integer":234
      }
      thanks in advance.

    • @usernamekitkat
      @usernamekitkat 6 หลายเดือนก่อน

      @@brightersidehacks yes it is in a jason format

    • @usernamekitkat
      @usernamekitkat 6 หลายเดือนก่อน

      @@brightersidehacks can i email you at the email in your youtube site ?
      i can send you some screenshots and show you my test.

    • @brightersidehacks
      @brightersidehacks  6 หลายเดือนก่อน

      @@usernamekitkat Now what you need is to find a way to deserialise the json string to extract the data you want. There are some json libraries you can use for this

  • @thanhlephuong7687
    @thanhlephuong7687 8 หลายเดือนก่อน

    Could you demo a industrial cloud fron siemens or schneider or abb cloud?

  • @kalyan5968
    @kalyan5968 2 หลายเดือนก่อน

    can i get the link to the library

    • @brightersidehacks
      @brightersidehacks  2 หลายเดือนก่อน

      You can find it here: forge.codesys.com/prj/codesys-example/http-client-exa/home/Home/

  • @mariodaqe4927
    @mariodaqe4927 5 หลายเดือนก่อน

    Is it possible to send a message about 50000 because I saw that length function is about 16000 characters

    • @brightersidehacks
      @brightersidehacks  5 หลายเดือนก่อน +1

      No, with the current implementation of the library, thats the maximum you can send

    • @mariodaqe4927
      @mariodaqe4927 5 หลายเดือนก่อน

      @@brightersidehacks thanks You, is there any way to perform that? Or any library you know

  • @luiggitello8546
    @luiggitello8546 10 หลายเดือนก่อน

    Is it posible to install this library on Delta Dia Designer?

    • @brightersidehacks
      @brightersidehacks  10 หลายเดือนก่อน

      The library only installs in the codesys environment

  • @abbsynbsn
    @abbsynbsn 5 หลายเดือนก่อน

    how can I download http client library in codesys

    • @brightersidehacks
      @brightersidehacks  5 หลายเดือนก่อน

      Here is the link from where you can download the library: forge.codesys.com/prj/codesys-example/http-client-exa/home/Home/

  • @g6zpl
    @g6zpl ปีที่แล้ว

    Hello. How add login and password to siteweb?

    • @brightersidehacks
      @brightersidehacks  ปีที่แล้ว

      Login and password can easily be added on the server side. I will make a video about this if you are interested