Home AMX User Forum AMXForums Archive Threads AMX Applications and Solutions

REDIRECT_STRING

Hi everybody,

I'm currently experimenting the REDIRECT_STRING funtion with some difficulties. Here is my questions:

- Where can i found some information about this subject? except the folowing netlinks help (that is not really helpfull):

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. The syntax is:

REDIRECT_STRING (Number, Device1, Device2)

The parameter Number identifies the particular redirection (1-8). To cancel a redirection, pass zero for Device1 and Device2. Redirections are lost if system power is turned off.

-Is it possible to uses virtual devices with this function?
-Is it possible to redirect more that one device at a time? : the following exemple is not working:

REDIRECT_STRING(1,dvSonyJoy2,dvStudioAFlex1)
WAIT 5 {REDIRECT_STRING(2,dvSonyJoy2,dvStudioAFlex2)}
WAIT 10 {REDIRECT_STRING(3,dvSonyJoy2,dvStudioAFlex3)}
WAIT 15 {REDIRECT_STRING(4,dvSonyJoy2,dvStudioAFlex4)}
WAIT 20 {REDIRECT_STRING(5,dvSonyJoy2,dvStudioBFlex1)}
WAIT 25 {REDIRECT_STRING(6,dvSonyJoy2,dvStudioBFlex2)}
WAIT 30 {REDIRECT_STRING(7,dvSonyJoy2,dvStudioBFlex3)}
WAIT 35 {REDIRECT_STRING(8,dvSonyJoy2,dvStudioBFlex4)}

It is only taking the last redirection.

Thanks in advance for your help.

Best Regards,

Comments

  • yuriyuri Junior Member Posts: 861
    i have never used REDIRECT_STRING and i can't imagine i will be using it someday soon.
    I can't think of one good reason to use it, so please, enlighten me :)
  • jg@gatorint.com[email protected] Junior Member Posts: 4
    I'm using this funtionality to plug a Sony BR-300 joystick on the controler and forward his requests to the cameras.

    FYI it is working with this:

    DEFINE_COMBINE (vdvSonyJoy2_2,dvSonyJoy2)

    REDIRECT_STRING(2,vdvSonyJoy2_2,dvStudioAFlex2)

    but it's very slow due to the virtual device, too slow for camera control.

    Also it seem that the REDIRECT_STRING can only make one link between 2 devices at a time, this is the reason why i had tried with virtual devices.
  • Marc ScheibeinMarc Scheibein Junior Member Posts: 669
    A REDIRECT_STRING() will transfer Incoming data from device 1 to device2 and vise versa automatically. It can be created at any time, and can be deleted by calling the REDIRECT_STRING with devices number 0. Upto 8 Redirects can be done the same time. Redirects are lost at power loss and reboot
    REDIRECT_STRING(1,dvCom1,dvCom2) (* creates the redirect between dvCom1 and dvCom2 data is transfered automatically *)
    
    REDIRECT_STRING(1,0,0) (* Redirect is cancelled *)
    
    In the 13 years I'm programming and supporting AMX, I needed the REDIRECT_STRING() only once in a real application. What I can remember it was some kind of chowcontroller, which controls a lighting system by RS232, and I needed also several strings in the AMX system.
  • yuriyuri Junior Member Posts: 861
    why use REDIRECT_STRING?
    Why don't you just SEND_STRING from DATA.TEXT from one device to another...
  • ericmedleyericmedley Senior Member - 4000+ posts Posts: 4,177
    I've used the redirect string command once to make a pass thru for rs-232 to a Lighting processor that was a little hard to get to. The tech knew to connect to port 7 on the Netlinx master and it would pass everything to and from the lighting processor. it works pretty well.
  • Chip MoodyChip Moody Junior Member Posts: 727
    Less code, and is probably handled at a level closer to the OS than your Netlinx program - I.E., doesn't soak up resources/CPU time as much as code being triggered with every DATA_EVENT caused by data coming in from the 2 devices.

    - Chip

    yuri wrote: »
    why use REDIRECT_STRING?
    Why don't you just SEND_STRING from DATA.TEXT from one device to another...
Sign In or Register to comment.