external controls
  • how do I specify a destination by an external software ?
    you can show me an example?
    Thank you
    Antonio
  • 6 Comments sorted by
  • The whole list of available remote command is available for download at
    http://download.mapfactor.com/remote_commands_10_1.txt

    What you need is command "$destination". First you have to configure remote communication (I suppose TCP and localhost, i.e. 127.0.0.1, port 4242). Alternative is serial communication over COM port. Let me know if you have any trouble.
    regards
    Martin
  • where do I set the port number?
    Antonio
  • menu/Settings/Remote commands, configure, Setup TCP/IP manually, IP and port
    Martin
  • you can send me a sample code in VB?
  • doesn't work , why ?
    many thanks
    Antonio

    Dim host As IPAddress = Nothing
    Dim mySock As Socket = Nothing


    Try
    If Not IPAddress.TryParse("127.0.0.1", host) Then
    MessageBox.Show("Indirizzo non valido")
    Exit Sub
    End If


    Dim ep As IPEndPoint = New IPEndPoint(host, Integer.Parse(4242))
    mySock = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)

    mySock.Connect(ep)
    '
    If mySock.Connected Then


    mySock.Send(Encoding.ASCII.GetBytes("$destination=45.72813,8.98105;navigate"))
    End If
    Catch ex As Exception
    MessageBox.Show(ex.Message)
    End Try
  • Hello Antonio,
    I do not know Visual Basic, but in Python it is:
    from telnetlib import Telnet

    IP = "127.0.0.1"
    PORT = "4242"
    TIMEOUT = 2.0 # wait for response in seconds

    telnet = Telnet( IP, PORT )
    telnet.write("$destination=45.72813,8.98105;navigate\n" )
    data = telnet.read_until( "\n", TIMEOUT )
    print data
    telnet.close()

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion