• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Connect to PLC without knowing IP
#4
Well now I have understood what your requirements are. Thank you. Let me ask you know if you have programming skills?

I don't know how the contrib-s7comm node is really working, so I don't know if you have to configure the S7-PLC IP address that it shall send data to in a table or if this node can also receive instructions based on node-red input.msg online. In latter case you are a lucky boy cause then you can write a Node-RED flow sending S7 request to multiple S7 at a time if you know the "unknown" S7.

Here is how I would program it: There is a port scanner for node.js here: https://github.com/eviltik/evilscan. This scanner can be instructed before called which IP address range it shall scan and which ports. RFC1006 port is 102. After a scan it returns to you the result of the found devices. Then you have a list of available PLCs. To make function calls available you have to include this node.js library into Node-RED (changing settings.js file) like described here https://nodered.org/docs/writing-functions.html in the chapter "Loading additional modules".

Then Node-RED knowns the evilscan. After that you can use the normal Node-RED function node and write your program and make the library known with the instruction

var evilscan = global.get('evilscan')

Then you can access the function as it is described in the evilscan documentation.

var options = {
target:'127.0.0.1',
port:'21-23',
status:'TROU', // Timeout, Refused, Open, Unreachable
banner:true
};

var scanner = new evilscan(options);

da da da ...

And then you can write your rest of your program
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply


Messages In This Thread
Connect to PLC without knowing IP - by paubau - August-21st-2018, 01:36 PM
RE: Connect to PLC without knowing IP - by Armin@netPI - August-21st-2018, 01:46 PM
RE: Connect to PLC without knowing IP - by paubau - August-21st-2018, 02:24 PM
RE: Connect to PLC without knowing IP - by Armin@netPI - August-21st-2018, 03:56 PM
RE: Connect to PLC without knowing IP - by paubau - August-22nd-2018, 08:16 AM
RE: Connect to PLC without knowing IP - by paubau - August-22nd-2018, 12:11 PM
RE: Connect to PLC without knowing IP - by Armin@netPI - August-22nd-2018, 12:51 PM
RE: Connect to PLC without knowing IP - by paubau - August-22nd-2018, 01:01 PM
RE: Connect to PLC without knowing IP - by Armin@netPI - August-22nd-2018, 01:19 PM
RE: Connect to PLC without knowing IP - by paubau - August-22nd-2018, 01:29 PM
RE: Connect to PLC without knowing IP - by Armin@netPI - August-22nd-2018, 01:48 PM
RE: Connect to PLC without knowing IP - by paubau - August-22nd-2018, 02:38 PM
RE: Connect to PLC without knowing IP - by Armin@netPI - August-22nd-2018, 03:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Errormessage when trying to connect to wifi. BFH_SAM2 11 8,085 September-24th-2018, 12:52 PM
Last Post: Armin@netPI
  Connect without DHCP SebastianSoller 15 9,477 August-21st-2018, 06:55 AM
Last Post: Armin@netPI
  Node-Red MQTT with SSL/TLS can't connect to broker BFH_SAM2 6 5,825 May-18th-2018, 08:48 AM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 2 Guest(s)