Ethernet/IP with Raspberry Pi

nlsri
2022-02-11
2022-02-16
  • nlsri - 2022-02-11

    My application is to use the Pi for Ethernet/IP communications with another device, and I would be grateful for some advice. Is it possible to use the on-board Ethernet port for both the CodeSys control communications with a laptop as well as the Ethernet/IP communications with the other device, if the laptop, the Pi and the device are connected to an Ethernet switch? Or do I have to use a USB to Ethernet adapter on the Pi to create two ports, and connect that to the switch as well? The device also supports TCP/IP communications, and I do need to be able to use the laptop for that communication also. All of these will be assigned static addresses. If I use a USB to Ethernet adapter on the Pi, it looks like it cannot be on the same subnet as the on-board port, so one would have to be on 192.168.1.xx and the other on 192.168.2.yy. Does CodeSys also support the use of a touch screen panel connected to the Pi via the HDMI and USB ports as an operator station?

     
  • eschwellinger

    eschwellinger - 2022-02-12
    • could be on the same switch
    • if on own adapter sure need to be different networks
    • yes shoud work when Rasperry Pi Os does support the touch.
      A really good choise is the the RaspberryPi.org multitouch with fullscreen chroimium in kiosk.mode
     

    Last edit: eschwellinger 2022-02-12
  • nlsri - 2022-02-12

    Thanks for the feedback. Are you saying that I can use the built-in port on the Pi for both communications, or that I definitely need an adapter? Regarding the kiosk mode, is https://desertbot.io/blog/raspberry-pi-touchscreen-kiosk-setup what you are referring to?

     
  • eschwellinger

    eschwellinger - 2022-02-12

    yes, build in port for both
    kioskmode with webvisu

     
  • nlsri - 2022-02-14

    Thanks, will try that out. Where do I set the scanner IP address, please see attached, this looks different from what I see in videos and pdf's? The warning message indicates 192.168.0.1, but I don't know where that is being set. The scanner will be the Pi, so I would need to use its static IP address.

     
  • nlsri - 2022-02-14

    By double-clicking on the Ethernet in the Device Tree, I was able to see where the 192.168.0.1 address was being set, and I changed it to the IP address of the Pi. But the warning message does not clear.

     
  • nlsri - 2022-02-14

    Making progress here, I deleted the Ethernet section and added it again, that added the proper tasks which were missing earlier, I had used the demo program to start with. I did not get the IP address warnings, was able to download and run. Now I have the issue reported in https://forge.codesys.com/forge/talk/Engineering/thread/5efa115498/, but the problem there seemed to be something related to the device not being on, that is not the case here. Please see attached screenshot, would appreciate some guidance.

     
  • nlsri - 2022-02-14

    What does the "Adapter not configured yet ..." diagnostic message mean, along with the "Not running" status of Ethernet/IP? The IP address of the adapter is correct, it has been added by using an EDS file, it can be pinged from the laptop as well as the Pi. What other configuration is expected? These devices work fine with a Rockwell PLC, using the exact same EDS files, and the Class 1 connection gets established right away.

     
  • nlsri - 2022-02-15

    After a lot of experimentation, I am finally able to get the Ethernet/IP link established between the Pi and the device, I am still not sure what exactly was preventing it earlier, have to go back and see whether I can find the issue. Everything is green on the Devices tree, status is good. My question now is about the IO Mapping tab, it shows a grayed out "Not updated" for the Current Value field of all the variables. Do the variables have to be mapped to something in the PLC_PRG for the values to show up, or does this have something to do with the fact that it is running with the two-hour temporary license, or is it something else altogether?

     
  • nlsri - 2022-02-16

    Thanks a lot, that brought up the values. The "Always update variables" at the bottom of the display is confusing, I thought it meant that they would be displayed regardless, didn't know about the separate controls elsewhere. Perhaps this needs to change.

     

Log in to post a comment.