• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Accessing a modbus device connected to RTE port from Node-RED
#1
Dear Armin,

I need you help, please.

I'd like to separate network segments for IT and fieldbus.
For this, using netPI RTE 3, I created a container of 'hilschernetpi/netpi-netx-ethernet-lan'.
A modbus device is now connected to the fieldbus segment (RTE port).

Then, I want to output data to the modbus device using 'Modbus-Write' node with Node-RED.

But, I think 'Modbus-Write' node recognizes that TCP is the standard IT port.
Because Modbus communication doesn't start at all.

As a test, I confirmed that Modbus communication can be done properly when the modbus device is connected to the standard IT port.

Therefore, my question is:
Is it possible to make 'Modbus-Write' node recognize RTE port?

Thank you very much for your support.
Best regards,


Attached Files Thumbnail(s)
       
  Reply
#2
You configured the Ethernet LAN container wrong. Please use it in "HOST" network mode as it is described here in the README here https://registry.hub.docker.com/r/hilsch...ernet-lan/.

Then go to netPI web UI  and login to the standard netPI control panel. In the manu "network/LAN" you will now find next to the "eth0" interface also the "cifx0" interface where you can configure it to any ip address setting you want.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#3
Dear Armin,

Thank you very much for your quick response.

Now, I set up the container of 'hilschernetpi/netpi-netx-ethernet-lan' as host.
From the edge gateway manager (Web GUI), I set the cifx0's IP address to 192.168.50.169/24.
But, 'Modbus-Write' node doesn't communicate with a modbus device connected to RTE port at all.
A status under the node indicates 'initialize'.

By the way, I have 2 containers with host settings.
Because not only 'hilschernetpi/netpi-netx-ethernet-lan' but also 'hilschernetpi/netpi-nodered' require the host setting.
Otherwise, I could not open the Node-RED editor from Chrome.

Ethernet cables are wired as follows.
PC  <===>  netPI std port,   netPI RTE port  <===>  a modbus device.

If you found something wrong from the above comments, would you please give me your feedback?
Thank you very much for your support.


Attached Files Thumbnail(s)
       
  Reply
#4
Well you can do 3 simple checks first of all if cifX0 is running.

1. You can ping cifX0 over the RTE ports if you connect a standard PC with correct IP settings like 192.100.50.170 to RTE port. And call ping 192.100.50.169

2. You can ping the modus slave over netX-ethernet-lan container using docker web UI and go into the container console and then call ping 192.100.50.250

3. You can call now complete netPI web UI also now over cifX0 RTE ports. So the same as you do over eth0 port today. So connect a PC to the RTE ports and give it a correct IP address like 192.100.50.170 and then open your browser and call https://192.100.50.169 and now also the netPI web UI will pop up

Report what you have detected afterwards.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#5
Dear Armin,

The followings are results:

>1. You can ping cifX0 over the RTE ports if you connect a standard PC with correct IP settings like 192.100.50.170 to RTE port. And call ping 192.100.50.169

Destination host unreachable (1_Console_on_mypc.png)

>2. You can ping the modus slave over netX-ethernet-lan container using docker web UI and go into the container console and then call ping 192.100.50.250

Destination host unreachable (2_Console_on_mynetX_container.png)
I don't understand why a response is coming from 163.139.152.1???

>3. You can call now complete netPI web UI also now over cifX0 RTE ports. So the same as you do over eth0 port today. So connect a PC to the RTE ports and give it a correct IP address like 192.100.50.170 and then open your browser and call https://192.100.50.169 and now also the netPI web UI will pop up

Unable to access (3_Browser_from_mypc.png)

I have no idea what the problem is, so far.
Best regards,


Attached Files Thumbnail(s)
           
  Reply
#6
There is one more thing ... which Node-RED container are you loading and using?

I am asking because if you use https://registry.hub.docker.com/r/hilsch...i-nodered/ container then this container configures cifX0 as Node-RED fieldbus and overwrites settings from netx-ethernet-lan container and configured netX chip as PROFINET device instead of standard TCP/IP device.

To configure Node-RED container not to reconfigure netX chip as PROFINET then you have to set the environment variable FIELD to value "none".
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#7
Dear Armin,

Thank you very much for your advice.
Even though I set FIELD = none in Env parameter area when re-deplyoed the Node-RED container 'hilschernetpi/netpi-nodered'.

So, I did the followings:
- I restored the recovery image to my netPI RTE 3, which means my netPI was initialized as the factory state.
- I enabled Docker.
- I deployed 'hilschernetpi/netpi-netx-ethernet-lan' only, with Network=host setting.
- I tried to set cifx0 IP address to both 192.168.2.169/24 and dhcp.
then,
- From my PC, I pinged 192.168.2.169, but 'Destination host unreachable' when cifx0 IP address=192.168.2.169/24.
- From my PC, I run an IP scanner software, but netPI wasn't detected when cifx0 IP address=dhcp.

Therefore, I think I may have some mistakes when 'hilschernetpi/netpi-netx-ethernet-lan' is deployed.
I attach some screen shots.
I would appreciate it if you would find something wrong.

Thank you very much for your help.
Best regards,


Attached Files Thumbnail(s)
                           
  Reply
#8
I will check it myself the next days.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#9
Hi tad,

I can confirm that 'hilschernetpi/netpi-netx-ethernet-lan' container on a fresh netPI RTE 3 running in 'host' mode does not work as expected.

What I see right now is that netPI's control panel UI "network/LAN"  does not configure cifX0 IP address when setup.

For a test I used the console function Docker UI for netpi-netx-ethernet-lan container.

In this console I entered the cifX0 IP setup manually using the command

Code:
ip addr add 192.168.50.169/255.255.255.0 broadcast 192.168.50.255 dev cifx0

With this command the cifX0 is assigned your requested IP address properly and everything works then.

So now I need to check with the netPI development team why netPI's control panel UI "network/LAN" is not configuring the cifX0.If they are telling me there is no configuration possible from control panel UI - like you and I have detected - then I need to modify the container start script in that way that the environment variables IP_ADDRESS, SUBNET_MASK, GATEWAY needs to be set in 'host' too like documented in bridged mode already.

Thx
Armin
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#10
Dear Armin,

Thank you very much for your kind support.
I was able to assign the IP address to the RTE port by setting the IP address as you explained.

I was wondering if you would update this thread when you improve the procedure of setting IP address.

By the way, I can now communicate with a modbus device, which is a distributed I/O system connected to RTE port.
So, I can read/write analog signals and expand digital I/O signals from Node-RED.
https://www.contec.com/products-services...osys/nano/

Best regards,


Attached Files Thumbnail(s)
   
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  netPI profinet device name WalterSchaefer 2 76 October-7th-2020, 11:10 AM
Last Post: WalterSchaefer
  5 x NL 50-Mpi and Node Red like colector data? Jotarod 4 216 September-14th-2020, 01:59 PM
Last Post: Armin@netPI
  Receive at startup additional data through the Fieldbus Port Schranz 1 173 September-10th-2020, 10:55 AM
Last Post: Armin@netPI
  Node-Red "http in"-Node not working DWxPro 8 488 June-19th-2020, 01:12 AM
Last Post: DWxPro
  using node.js on NIOT-E-TP151-EN-RE COswald 9 384 May-20th-2020, 12:54 PM
Last Post: Armin@netPI
  Error when using a node 'OpcUaServer' tad 6 331 May-12th-2020, 08:35 AM
Last Post: tad
  Node-RED log location SteveO 1 210 May-11th-2020, 07:53 PM
Last Post: Armin@netPI
  how to pick up PROFINET data and store them to OPC UA server on Node-RED/netPI. tad 7 465 March-16th-2020, 10:21 AM
Last Post: Armin@netPI
  Node Red stop working DSongra 1 312 February-12th-2020, 08:19 AM
Last Post: Armin@netPI
  After „Rebuild“ of Docker neither the node-RED nor the dashboard can be accessed MAK 4 405 January-31st-2020, 02:14 PM
Last Post: MAK

Forum Jump:


Users browsing this thread: 1 Guest(s)