Home AMX User Forum NetLinx Studio

Remote Serial Port via Netlinx

Greetings,

I am working with a system that has a lighting controller on it at a remote location. The lighting controler is connected to an AMX serial port.

When at the remote location, I disconnect the lighting controller from the AMX system and connect it to directly to my laptop.

Is there a good way to connect my laptop to a serial port on the AMX system at my office and virtually connect that port to the lighting controller port at the remote location?

I tried REDIRECT_STRING, but it doesn't seem to do anything.

Thank you.

Comments

  • jjamesjjames Posts: 2,908
    Interesting question. Although I don't have the answer, I wanna know where you're going with this. Are you just sending strings to the lighting controller or are you actually uploading code / viewing diagnostics when connected to the lighting controller through your laptop?
  • TurnipTruckTurnipTruck Posts: 1,485
    When on site with the laptop, I am creating presets, assigning levels, etc.

    I am trying to find a way to do it from off-site using the two connected AMX systems as a 25-mile serial cable.
  • flcusatflcusat Posts: 309
    Interesting thread. As a newbie I'll follow the answers with attention.
  • vincenvincen Posts: 526
    Well you can do that in a pretty easy way by just connecting your PC on one RS-232 port on AMX Systems. In your program, all strings received on that port you forward them to RS_232 port linked to your lighting system. All strings received on RS-232 port of lighting system you forward them to both program and RS-232 of your pc and it should work smoothly ;)

    Vinc
  • joelwjoelw Posts: 175
    If your lighting software supports Ethernet connectivity, Vantage and Lutron both do, then you're in good shape. If not then download something like the serial port redirector software from Lantronix. It's windows software that emulates a serial port, but connects via Ethernet. Keep in mind the best method is to NOT use the serial port redirection software, as it adds latency and slightly quirky.

    1. Create a TCP/IP server in your code. Port should match your connecting software's port. Command prompt "netstat -a" can be useful to determine this.
    2. Create a serial router based on state of Ethernet client connectivity. With no TCP/IP connection route com port serial I/O to your code. When TCP/IP connection is made route ethernet serial data straight to com port. When TCP/IP client is connected be sure to disable your Netlinx code from listening or transmitting.


    Joel
  • TurnipTruckTurnipTruck Posts: 1,485
    I tried REDIRECT_STRING with no success. Perhaps I was using it improperly. I have not had much time yet to troubleshoot.

    I have been using Moxa Ethernet-to-serial convertors with port redirection in the past for similar things. That method works well, but it occupies the serial port of the device being controlled at the remote site, not allowing it to be connected to the AMX system.
  • vincenvincen Posts: 526
    Well first idea in my mind is just create a DATA_EVENT on RS-232 port where your PC is connected, and in STRING: keyword you just do a SEND_STRING of DATA.TEXT to RS-232 port connected to equipment tou control ;) and same thing in other direction ;)

    Vinc
  • JustinCJustinC Posts: 74
    Am I understanding this correctly ?

    You have systemA at your location and it connects via ethernet to SystemB.

    You want to hook your laptop to comm port1 on SystemA and want it to come out at SystemB on the port the lighting controller is attached to.
  • TurnipTruckTurnipTruck Posts: 1,485
    JustinC wrote:

    You have systemA at your location and it connects via ethernet to SystemB.

    You want to hook your laptop to comm port1 on SystemA and want it to come out at SystemB on the port the lighting controller is attached to.

    Exactly! :)
  • I have been using Moxa Ethernet-to-serial convertors with port redirection in the past for similar things. That method works well, but it occupies the serial port of the device being controlled at the remote site, not allowing it to be connected to the AMX system.

    why not leave the ethernet-to-serial in place then adapt your program to open an ethernet port instead of a serial port to your lighting system.

    then possibly you can have multiple access to the lighting.. AMX, and your pc via Internet.
  • JustinCJustinC Posts: 74
    Exactly! :)


    Okay, I have one more question before I add any input.

    Are you just sending commands to the lighting controller or are you using software interface to communicate with the lighting controller ?
  • JustinCJustinC Posts: 74
    Okay this will work for what you want, but depending on what your answer is to the previous question there could be a simpler way. But someone hit the nail on the head in a previous post. Lets say the local system is system10 and the remote system is system20. We will use the first RS232 port on both systems.
    System 10
    DEFINE_DEVICE
    
    dvLAPTOP    =5001:1:10
    
    dvLIGHTING  = 5001:1:20
    
    DEFINE_EVENT
    
    DATA_EVENT[dvLAPTOP]
    {
         STRING:
         {
              SEND_STRING dvLIGHTING, DATA.TEXT
         }
    }
    
    
    System 20
    DEFINE_DEVICE
    
    dvLIGHTING    =5001:1:20
    
    dvLAPTOP  = 5001:1:10
    
    DEFINE_EVENT
    
    DATA_EVENT[dvLIGHTING]
    {
         STRING:
         {
              SEND_STRING dvLAPTOP, DATA.TEXT
         }
    }
    

    This should make it completely transparent to any software you hook up to it.
  • TurnipTruckTurnipTruck Posts: 1,485
    The method that Justin suggested above works fine. I am able to communicate with the device offsite smoothly. Thank you.
Sign In or Register to comment.