Ewon TechForum
Providing technical solutions to technical requests


Polling Data from two eWON devices together through a VPN connected
sayed Offline
Junior Member
#1
Dear All ,
I’ve a problem as I have successfully connect two ewon devices together through a VPN by mobile network but I have a problem that I don’t know how to  pull tag from ewon A to ewon B
Ex : if I defined Tag in ewon A and another tag in ewon B . How to make tag from A write its instant into tag at B value priodicly .
BR, 
Sayed Mohamed
Reply

AngelaT Offline
Ewon Distributor
#2
Hi Sayed,

I've done this a couple of different ways depending on the application. If I need eWON A's information shared with eWON B on some sort of set schedule, say once an hour or once every 15 minutes, I usually use the instant value files to move the information around. There's a knowledge base article about it here:
https://ewon.biz/sites/default/files/kb-..._value.pdf

Basically, I set up tags with identical names on the two eWONs and then using the Task Planner, I set up a job to FTP the instant value file (or a portion of the instant value file as appropriate) from eWON A to eWON B on my required schedule.

However, if I need eWON B to read the values from eWON A in a more "real-time" fashion, like it would read from a PLC, I usually use Modbus publishing. I configure the Modbus Server and configure the Modbus tag visibility section for the tags on eWON A that I want to share and then have eWON B poll eWON A using its Modbus IO server as if eWON A were just another Modbus device. There's a little bit about how to do that here:
https://developer.ewon.biz/content/modbus-tcp-snmp

Maybe someone else has some better documentation for you.

Hope that helps,
Angela
Reply

sayed Offline
Junior Member
#3
(19-01-2017, 05:23 AM)AngelaT Wrote: Hi Sayed,

I've done this a couple of different ways depending on the application.  If I need eWON A's information shared with eWON B on some sort of set schedule, say once an hour or once every 15 minutes, I usually use the instant value files to move the information around.  There's a knowledge base article about it here:
https://ewon.biz/sites/default/files/kb-..._value.pdf

Basically, I set up tags with identical names on the two eWONs and then using the Task Planner, I set up a job to FTP the instant value file (or a portion of the instant value file as appropriate) from eWON A to eWON B on my required schedule.

However, if I need eWON B to read the values from eWON A in a more "real-time" fashion, like it would read from a PLC, I usually use Modbus publishing.  I configure the Modbus Server and configure the Modbus tag visibility section for the tags on eWON A that I want to share and then have eWON B poll eWON A using its Modbus IO server as if eWON A were just another Modbus device.    There's a little bit about how to do that here:
https://developer.ewon.biz/content/modbus-tcp-snmp  

Maybe someone else has some better documentation for you.

Hope that helps,
Angela
Hi Angela,
Thanks a lot  i've already tested the first way but it always failed to execute the script as in the attached image .
if you know how to pass this problem please help 
best regards,
Sayed


Attached Files
.png   12.png (Size: 147,49 KB / Downloads: 56)
Reply

Kevin Offline
Junior Member
#4
Hello sayed,

Assuming the error (28) is an FTP error and not an internal eWON error (I suspect the former), the problem is a time out.  This could be because of a number of reasons. Some of which are:

1. The eWON A cannot see eWON B
2. eWON A's request is throwing an error on eWON B which prevents it from responding
3. The message is never reaching eWON B, even though it's sending correctly.

From examining your screenshot, I think the problem is likely the 1st option presented. I think eWON A is not seeing eWON B

It appears to me as though you are connected to eWON A at 192.168.1.5 and you state you are trying to communicate to eWON B through a VPN by mobile network at 192.168.1.19. This would mean both eWONs have LANs on the same subnet which would cause ambiguity when connected. IE, how can eWON A know you want the 192.168.1.19 that exists on eWON B's network when both networks have the same subnet?

For instance, what if you have:
eWON A: 192.168.1.1
PLC A: 192.168.1.2

eWON B: 192.168.1.1
PLC B: 192.168.1.2

and eWON A is connected to eWON B through a VPN. What happens when you ping "192.168.1.2"? Are you pinging PLC A or PLC B?


To test if this is the problem, try changing the IP of one of the eWONs to be an a different subnet and test again. Let me know what happens! Smile
Reply

sayed Offline
Junior Member
#5
(19-01-2017, 08:44 PM)Kevin Wrote: Hello sayed,

Assuming the error (28) is an FTP error and not an internal eWON error (I suspect the former), the problem is a time out.  This could be because of a number of reasons. Some of which are:

1. The eWON A cannot see eWON B
2. eWON A's request is throwing an error on eWON B which prevents it from responding
3. The message is never reaching eWON B, even though it's sending correctly.

From examining your screenshot, I think the problem is likely the 1st option presented. I think eWON A is not seeing eWON B

It appears to me as though you are connected to eWON A at 192.168.1.5 and you state you are trying to communicate to eWON B through a VPN by mobile network at 192.168.1.19. This would mean both eWONs have LANs on the same subnet which would cause ambiguity when connected. IE, how can eWON A know you want the 192.168.1.19 that exists on eWON B's network when both networks have the same subnet?

For instance, what if you have:
eWON A: 192.168.1.1
PLC A: 192.168.1.2

eWON B: 192.168.1.1
PLC B: 192.168.1.2

and eWON A is connected to eWON B through a VPN. What happens when you ping "192.168.1.2"? Are you pinging PLC A or PLC B?


To test if this is the problem, try changing the IP of one of the eWONs to be an a different subnet and test again. Let me know what happens! Smile
Hi Kevin, 
thanks for help I'll try this and inform you . Smile
this image I was making a test between only two ewons before go to test it on the site so I connect these two on the same LAN network and try with internal tags.
does this script required to be in a different Subnet range ?!
Reply

sayed Offline
Junior Member
#6
now I'm connected two eWON on the same LAN as eWON A IP (192.168.1.5)
and eWON B (192.168.1.19).
I'm trying to execute the script but it wouldn't work, so I go for the second method as I configure eWON A as a Modbus TCP server with a unit adress 100.
i've create tag in ewon A as an internal and publish it on a modbus with register address 98 and I've created a tag in eWON B with adress (30098,100,192.168.1.5)
but the result always zero.
could you please tell me how to configure the tag to read the correct register ?!
thanks and regards,
Sayed
Reply

simon Offline
eWON Support
#7
Sayed,

Have you managed to make that work ?
By the way, if you connect two eWONs via VPN and you want to access LAN network from the other LAN network, the LAN IP subnet must be in DIFFERENT ranges.
Reply

Hemant Jhamnani Offline
Ewon Distributor
#8
Hii,

I have two ewon at different locations, and third ewon at my HO.

Can i connect both the remote Ewon with ewon at my HO through VPN and collect both ewon data in one ewon at HO? 

it can be like two remote ewon (Slave) giving data to one ewon (Master) at HO
Reply

numb Offline
Junior Member
#9
hi, I have been using it and the remote conection are really great thanks.
Reply



Possibly Related Threads…
04-04-2020, 02:25 PM
Last Post: djonedd
  Mitsubishi polling data Started by spessi
4 Replies - 1.789 Views
02-04-2020, 02:08 PM
Last Post: Jean-Yves
28-01-2020, 04:42 PM
Last Post: saadzahabi_bowman
07-11-2019, 05:03 PM
Last Post: simon
30-10-2019, 11:01 AM
Last Post: LewisH304
18-10-2019, 09:32 AM
Last Post: simon
03-10-2019, 12:30 PM
Last Post: simon
15-08-2019, 02:26 PM
Last Post: schlottke
29-07-2019, 04:45 PM
Last Post: simon
25-07-2019, 10:49 PM
Last Post: martinf99



Users browsing this thread:
1 Guest(s)



Theme © Ewon 2019 - Forum software by © MyBB - Cookie policy