Communication issue on raspberry Pi with S7 PLC

Hello everybody

I have the following problems:

I have installed Node Red on my Windows Cumouter and created the program here
I connected the controller, set the S7 Node and MQTT parameters and everything worked at once
Now further I have the identical code running on my Raspberry Pi but I get no connection with the s7-300

Ip address of the s7 is 192.168.0.1
eth0 from the pi has 192.168.0.50/24
Wlan from Pi has 192,168,43,81/24

Does anyone have any experience with this mistake?

I have looked at the Port with the command 'netstat' once. Is this Node Red running three times on 1880? Ist this the Failure? When yes how can i stop this?

When I compare the ports on my PC I don't see port 1880! :-S

The latest version of Rasbian is installed on the Raspberry Pi "Rasbian Buster 2020-02-13"

I hope You can Help me.


flows (5).json (20.1 KB)

Hi,
sorry for my late response. It seems to be a network issue. Did you try pinging the PLC from your RPI?

Check also if you for some reason have several NR running, use command 'ps aux' in Linux

Hi folks

Thanks for your help. Didn't solve the problem but I was able to work around it with a simple switch (Netgear Prosafe GS10s).

Now I have the same problem again with a RFID portal reader. As long as I connect through a switch everything works fine.
If I connect directly and do a static IP I can't ping over eth0. No PLC no portal reader.

I have tried various IP setup and cables and everything else. Everything did not work.

Do you have any idea?

If you are trying connect 1:1 then a) both ends need to be configured with static addresses within the same segment. But not the same address. And b) you may need a crossover Ethernet cable as basic devices don’t do auto-crossover.

Hi dceejay

Thank you for the quick answer. The IP are RPI=192.168.0.249/24 und Portalreader=192.168.0.250/24

I`ll try with the crossover cable. Didn't think that a switch would do the crossover automatically :shushing_face: :hear_no_evil:

Could it be that the RPI 3+ did this on its own? In an old application with the RPI3+ and a PLC it worked without a switch with a standard ethernet cable. I use the same cable now on the Pi 4.

Thank you in advanced :+1: :+1:

Hi dceejay

I have tried using a crossover adapter and I still have the same problem.

Ip address of the Portalreader is 192.168.0.250/24
eth0 from the pi has 192.168.0.36/24
Wlan from Pi has 192.168.0.42/24

The wlan network and the lan network wer the Eth0 form the pi is connected ist the same.

Ip Scann = there are no conflicts.

Is there a Setting in the Pi i forgot?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.