Home AMX User Forum NetLinx Studio

pass serial data from one port to another

is there a built in way to pass data coming into one serial port on a master to another?

Comments

  • Not sure if I understand the question correctly, but a device declared on a master will be available to another master in a m2m relationship, therefore its data events too, including the STRING.
  • postichpostich Posts: 10
    No i mean from one port to another on the same master.

    I have a Tandberg cam port connected to port 1 of the master and the camera on port 2. i want the Tandberg to think its connected to the camera so that it can control it and i also want to be able to control the camera directly
  • Aha... Well, if you want to bounce out to another port and viceversa, then you will have to use a SEND_STRING to the other device with the string data collected from the first port and viceversa.
  • HedbergHedberg Posts: 671
    redirect_string()

    may, or may not, do what you want. I experimented with it a long time ago without success, but maybe that was just me.
  • postichpostich Posts: 10
    REDIRECT_STRING ??? never herd of it
    Netlinx keyword help has this to say on the subject... but what dose it mean?
    REDIRECT_STRING
    This command is used to pass all strings from device 1 to device 2 and all strings from device 2 to device 1. This is called a redirection and you can assign up to eight of them at one time.

    Syntax:

    REDIRECT_STRING (Number, Device1, Device2)

    Parameters:

    Number - identifies the particular redirection (1-8).

    To cancel a redirection, pass zero for Device1 and Device2.

    Note: Redirections are lost if system power is turned off.
    That makes no sense.
  • Looking into it a bit, looks like it was a command introduced for Axcess 3.07. The first number is the redirection identifier. If it is your only redirection, just put a 1 there.
    REDIRECT_STRING(entry#,device1,device2)
    redirects all strings from device1 to device2, and vice-versa"

    Never tried it so I cannot tell you anything about it. Sounds like it should work, though.

    Otherwise, capture the strings from the one device in a string event, then send the captured string out with a send_string to the other device.
  • HedbergHedberg Posts: 671
    Just tried it with NI700 and it seems to work exactly as expected.

    redirect_string(1,5001:1:0,5001:2:0)

    results in all strings "from" port 2 going "to" port 1 and visa versa.

    Haven't experimented with various baud rates to see if it could be tripped up.
  • HedbergHedberg Posts: 671
    postich wrote: »
    REDIRECT_STRING ??? never herd of it
    Netlinx keyword help has this to say on the subject... but what dose it mean?

    That makes no sense.


    Here's a thread from a couple years ago that discusses redirect_string() and various other ideas about the question you are asking:

    http://www.amxforums.com/search.php?searchid=255211
  • ericmedleyericmedley Posts: 4,177
    data_event[mySerialPort1]{
      String:{
        send_string mySerialPort2,data.text
        }
      }
    
    data_event[mySerialPort2]{
      String:{
        send_string mySerialPort1,data.text
        }
      }
    

    You mean this? Doing it yourself would give you a lot more flexibility. You could choose to disable/enable he feature as you need, modify strings if need be and you'd not have any issues if he baud rates needed to be different or some reason.
  • rrdbstudiosrrdbstudios Posts: 160
    Just kinda jumping in, but you want to use the com port for both control via the amx and still use it for camera control...

    If I understand you correctly, cisco has a wire diagram of a Y cable that will allow that; the new c-20 codecs require this setup because they only have a single serial port and unless you're using ethernet control, you have to go this route or use the AMX to control your camera separate of codec.


    Not sure if this is helping you, I didnt read the entire thread. Eitherway, knowledge for the furture.
Sign In or Register to comment.