Sign in to follow this  
svego

Df To External Devices

Recommended Posts

Hi,

 

On few remote site I have modbus TCP slave device. It is connected to Internet with 3G router. Problem is to read values from it because DF in Device configuration support only IP address but NOT dyndns name like site.dyndns.org..

 

I know you will say that it is not secure...here I have only to read values like meteo data etc, I dont have relays...Permanent IP address, VPN are too expensive for that application.

 

Entering actual IP address it works OK, but it last 2-3 days...

 

Is there any solution how to fix it?

 

THX

Share this post


Link to post
Share on other sites

Dynamic DNS won't work anyway because DAQFactory creates and maintains the socket.  If the IP changes out from under it, it won't automatically reconnect, even using the URL.  

 

My suggestion, is to use the http.get() function to do a web service call to your dynamic dns service to retrieve the address, then update the address in the device:

 

device.mydevice.address = newIP

device.mydevice.initComm()

 

I don't know about your dynamic dns service, so can't give you the script for that part.

Share this post


Link to post
Share on other sites

Hi,

 

Im using dyndns ( account.dyn.com )..Its is implemented in router and PLC. On remote site it is only router and PLC.

 

eg.

remote site URL remote.dyndns.info:502

Share this post


Link to post
Share on other sites

You'll have to do a lookup for the IP for remote.dyndns.info using a web service call.  I'm not sure what service might provide that, but I'm sure one exists, probably dyn.com.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this