Author Topic: Multiple Auto nodes  (Read 658 times)

jiqn74

  • Newbie
  • *
  • Posts: 6
    • View Profile
Multiple Auto nodes
« on: September 22, 2018, 10:19:44 AM »
Good afternoon all,
I would like to ask you about a setup that i dont find how to do it. There is a central PC, where i was planning to use AHMI, this software needs to be able to work with one, two or up to 16 nodes (maybe more, waiting for customer info). These nodes are all equal, the same system, with the same inputs outputs, but with different name, depending on the possition.

What I would like to do, is to make AHMI to work with them if connected. Something like adding a new node, give a name (description where is going to be used) and start working with it. If required more, they will be given different names. The main purpose for AHMI should be to get the data from them, and show it in data grids with some smal animations (leds, pumps, switches..) and send them the name they will use, and the receipt about the works to be done.
To give an example, is like a garden where you can put many valves to send water. All valves have the same logic, but in any moment, the owner want to be able to change one for another, add more, or take out.

I thought to work with RaspberryPi and CodesSys, to program the nodes. Next I'll attach the required hardware and terminals. With Codesys, I can use, modbusTCP or OPC (among others).

Although i want to set a DHCP server, so whenever an allowed mac enters, it gets an automatic IP, I dont find how to do it, as in Modbus I need to set a certain IP in Master or Slave (maybe I can do it through a codesys visu frontend), but in the AHMI it seems that i can only connect to one IP.
With the OPC is even more difficult, as it depends on changes of the server, and so on.

What do you think? Maybe, I see things more difficult than they are.

Thank you in advance,
Best Regards.
jiqn

jiqn74

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Multiple Auto nodes
« Reply #1 on: September 30, 2018, 09:24:52 AM »
Hi all,

Just to make it easier. Is there a way to add dynamically modbus tcp slaves to AHMI?, the other side it's almost solved.

Thanks in advance.

Godra

  • Hero Member
  • *****
  • Posts: 1438
    • View Profile
Re: Multiple Auto nodes
« Reply #2 on: September 30, 2018, 05:38:34 PM »
Your setup sounds quite complex to me and I am not sure what your nodes really are (computers or PLCs or RaspberryPies or ...).

It looks like you might need to create a separate code that will be checking for who is currently on the network, by recognizing their MACs or Name, and then dynamically set AHMI driver(s) to communicate with those. Maybe use Google to find example codes.

My understanding is that all Modbus slaves could be behind a single IP and would be distinguished between by their UnitId.
In AHMI, you can add a bunch of ModbusTCPCom drivers and set all settings the same besides for UnitId.
MODRSsim2 simulator could be used to simulate a bunch of slaves behind a single communication channel.

« Last Edit: September 30, 2018, 06:05:45 PM by Godra »

jiqn74

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Multiple Auto nodes
« Reply #3 on: October 02, 2018, 03:44:32 AM »
Thank you Godra,

I'm working on a PC to get data from different raspberry pi. About raspberry pi, it is easy to change IP while online through a python gui i'm working in. At any time, the user may want to add more or maybe, to take out of the network these nodes. All of them are equal, but for the name and mac, but they do have the same messages (in and outs).

I was thinking now to already leave AHMI with up to 20 pre configured nodes, and just set the node IP when enabled. But to leave it that way, may use a lot of windows resorces. Let's see.

Godra

  • Hero Member
  • *****
  • Posts: 1438
    • View Profile
Re: Multiple Auto nodes
« Reply #4 on: October 02, 2018, 09:53:52 PM »
This is something you might test, I am not sure if it will work properly:

Set each node's IP in its respective driver and set the driver's DisableSubscriptions property to True.
Then use the driver's ConnectionEstablished event to enable subscriptions and use its ConnectionClosed or ComError event to disable subscriptions.