0

Currently I am working on a project in which I have to send commands to a device by calling its IP address. I have already created a code that send the command by using the IP address on LAN. Here is code snippets.

private void cmdConnectRobot_Click(object sender, EventArgs e)
{
    try
    {
        // Create object and connect with VRC
        caoCtrl = caoWs.AddController("Robot", "CaoProv.DENSO.RC8", "", "Server=192.168.0.100");

        caoRobot = caoCtrl.AddRobot("VS", "");

        // Valiable of status of Machine lock SW
        //caoVal = caoCtrl.AddVariable("@LOCK","");
        caoValP = caoCtrl.AddVariable("P1", "");

you can see the robot can be accessed using LAN by putting server IP address. I want to call this device by using this IP address but over the internet. Thank you!

  • OK, how is the device (robot?) connected to the internet. What is its IP address? Where are you running the sending application? How is it connected, whats its IP address – pm100 Feb 28 '22 at 05:34
  • It is robotic arm. I get its ip address by connecting the wireless router (hub) to the robot using an ethernet cable. The router generates the IP address for robot. I use this IP to connect with robot. – suleman Ali kazmi Feb 28 '22 at 05:37
  • so where is the internet involved? Is it the robot thats outside your network or your code? – pm100 Feb 28 '22 at 05:50
  • 1
    Also, be aware that it is not a good idea to have any robot or similar device be accessible via the internet. Except you really know what you do and have protection by a firewall. A VPN is in almost all cases the better choice. – Klaus Gütter Feb 28 '22 at 06:51
  • Note that most internet access today is behind a firewall of some kind, so just opening a direct connection will probably not work. This is usually circumvented by having a server that both the robot and client connect to, and passes the commands from one to the other. – JonasH Feb 28 '22 at 07:58
  • Let me elaborate, here is the robotic arm that can be controlled by LAN connection. As code snippet is already pasted above. I just want to make a connection with the robot via WAN. How can I do this? – suleman Ali kazmi Mar 01 '22 at 10:43
  • How can I access the robot via IP via WAN? As in the Wireless LAN connection, I am doing so by just putting the IP address. Robot and my laptop are at lies at the same network? So which technique will be effective to directly feed the command over the internet wan connection? – suleman Ali kazmi Mar 01 '22 at 10:47

0 Answers0