Jump to content

Web Server and remote access to PLC via Ethernet using GPRS

Recommended Posts


I would like to use V560 as Web Server AND to be able to remotely change the PLC's configuration via Ethernet port. The current equipment set is as fallows:

- router with possibility to connect to Internet via GPRS (SIM card with static IP and dedicated APN)

- V560 connected to that router

- PC with GPRS modem and SIM card in same APN as the SIM card from router.

At first I have connected V560 and my PC to one local network in office and configured PLC like this:

-SB2->PLC NAME(V560)->TCP/IP CARD INIT->TCP/IP SOCK INIT (as Socket 1)->TCP/IP SOCK INIT (as Socket 0)

Socket 1 - so I can download/upload PLC's program via Ethernet port

Socket 0 - for the Web Server

All works like it should when it comes to local network. But when I want to log via GPRS its not so good. Connection is made using APN with both SIM cards logged in to it. From my SIM card in PC I am able to ping the other card sitting in GPRS Router (Edimax 3G-6200n)). The external IP of my router is XXX.XXX.XXX.XXX and I dont need to do any Port redirect to connect to Web Server. In web browser I just put the SIM card IP (routers external IP) and I see the Web Server page. When I do Port Redirect I am unable to connect to Web Server. There are no Port Limitations on router. At least they are not enabled. So my question is: what if I want to connect to more than one PLC using one router. How to redirect ports properly so I can have access to Web Server indirectly.

Other thing about Web Server is that when viewing the page via GPRS it often hangs, I mean that I have no access to it but STILL I can ping the SIM card and I can view WEb Server locally (when connected to routers LAN port). What helps (and thats the funnies part) is to to soft Reset of PLC (using Reset Option in VisiLogic or from PLC's panel). For your info there are 10 lines in Web Server config, I've also changed the logo (small 74x22 GIF, 2kB size). What can be wrong ??

Second thing (as mentioned earlier) is that using same equipment I want to be able to do changes in PLC's program remotely. I've tried to connect just like when both PLC and PC were in local network in office. The only thing I've changed was the IP from local (port 80 set in TCP/IP INIT FB) to XXX.XXX.XXX.XXX. Unfortunately VisiLogic does not give the ability to set the port so the IP address would be like: So the question is: can I change the port number in INIT FB for Socket 1?? And how should I set the router and/or VisiLogic/PLC for remote download and upload PLCs program.

Best regards

Link to comment
Share on other sites


We made similar tests here with modem/router Sierra Wireless Raven EX. It was programmed via Internet and receives its IP, which then we use as gateway.

In the other side there needs ot be ordinary PC connected ot Internet.

In our tests we loaded all 4 sockets at the same time - Web server, connection to VisiLogic, Connection to Remote operator and running Modbus. The connection was very stable and data transfer - very fast! We connected from 4 different PC.

Why you need to use GPRS modem on PC side?

What is the connection between PC and modem - Ethernet or RS232?

Are you sure the controller has access to Internet (public IP)?

Link to comment
Share on other sites

Hi Emil,

well ... we use GPRS quite wide in our company - mostly to connect two points. Using our APN with cards logged in to it makes the connection save and whats more important we can check the traffic in the APN. Other point is that we (the company) need instant access to our projects. GPRS modem is connected with PC/laptop via PCMCIA slot directly. About public IP - thats the whole point, in order to connect to V560 (via router) I need to know its IP (static IP) and we don't want the IP address to be known and accessible to other users. Also the nature of the object is limiting Internet connection, and GPRS is the most efficient and cheap solution in that case :). The worst thing about GPRS is the ping rate. Ill try to tweak Web Server to make it more stable.

Emil, as I understand it correctly to access the Web Server, Socket 0 needs to used with port set to 80 and to set communication with VisiLogic - Socket 1 and port 20256. Please correct me if I'm wrong.


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...