Home AMX User Forum AMX General Discussion

Kramer 64 Matrix Protocol

Is anyone familiar with the Kramer 64 Matrix Protocol. From the manual the Hex code for Input 1, Output 1 = 01,81,81,81. I'm not sure if I am writing the code right or if I have the dreaded NI-3000 com port problem (new to AMX Programming)


PUSH [TOUCH_PANEL,188] //CAMERA
{
SEND_STRING MATRIX, ' "$01,$81,$81,$81" '
}

Thanks,

Paul

Comments

  • annuelloannuello Posts: 294
    Gday Paul,

    The string you are sending looks correct for switching video input 1 to output 1. I can't remember how forwards-compatible the old Axcess coding is with NetLinx, but you could try the following:
    button_event [TOUCH_PANEL,188]{
     push:{
      send_string MATRIX,"$01,$81,$81,$81"
     }
    }
    

    I haven't used these Kramers for a while, but here are a few functions that may make it easier for you.
    define_function SwitchVideo(integer inInput, integer inOutput){
     send_string dvSwitcher, "$01, $80+inInput, $80+inOutput, $81"
    }
    define_function SwitchAudio(integer inInput, integer inOutput){
     send_string dvSwitcher, "$02, $80+inInput, $80+inOutput, $81"
    }
    define_function SetBreakaway(integer bBreakawayOn){
     switch(bBreakawayOn){
      case 0:
       send_string dvSwitcher, "$08, $80, $80, $81"  //Turn on AFV.  I.e. Breakaway off.
       break;
      case 1:
       send_string dvSwitcher, "$08, $80, $81, $81"  //Turn off AFV.  I.e. Breakaway on.
       break;
     }
    }
    


    And finally, from our slew of Kramers that we've had here in the past I've seen three different protocols, depending on the vintage of the matrix switcher. The above examples are called "Kramer Protocol 2000". There was an older protocol which only used 3 bytes rather than 4. I saw this on a 5x4 switcher. These older units do not support audio breakaway.
    define_function SwitchBoth(integer inInput, integer inOutput){
     //Note that the 3-byte protocol has output first then input, and a different header byte.
     send_string dvSwitcher, "$00, $80+inOutput, $80+inInput"
    }
    

    Hope this helps.

    Roger McLean
    Swinburne University.
  • freijnenfreijnen Posts: 18
    Hello Paul,

    Lose the single quotes in your send string line. Then it should work fine...
    Single quotes indicate a pure ASCII string to be sent.

    So it must be:
    SEND_STRING MATRIX, "$01,$81,$81,$81"
  • Thanks much for the replies, most helpful. I'll try it when I get home, however the more I think about it the more I think it might be a com port problem. I actually had a used Extron matrix that was working fine via RS232 and for no particular reason just stopped (worked with Manual Input). I thought it was the Switcher because it was a fairly old one, I happened to have the Kramer laying around and after programming did not get any response. Somewhere in there I believe I tried without the first set of quotes. Anyway I believe I read somewhere in the forum that the NI-3000's have had a COM port problem (something to do with a resistor), I am hoping it isn't but just in case is there a way to check the COM PORT Communication? I have tried using a different port.
    Thanks again for the quick responses and I am keeping my fingers crossed that the coding is the solution.

    Paul
  • John NagyJohn Nagy Posts: 1,742
    Hardware substitution can save you hours of inconclusive programming alterations. Try a different NetLinx, different cable, etc. before you spend days troubleshooting code...
  • freijnenfreijnen Posts: 18
    You can see all incoming and outgoing data on a com port on a NI-master using netlinx device notifications.
    This is a powerfull tool to debug serial protocol issue's
  • Just an FYI on this post. It turns out that I have the dreaded 'COM port" problem with my NI-3000 which is out of the warranty period. I tried using a COM port on a slaved Axcent and it worked perfectly so I am assuming that I need to change the capacitor in the NI-3000 as noted in a couple of posts on the forum. As soon as I work up enough nerve to try this I will but for now I will leave everything as is. Thanks for all the helpful answers/responses.

    Paul
  • Before you break out the soldering iron you should definitely fix your code. Your send_string statement is telling the master to send the literal string:

    "$01,$81,$81,$81"

    which is absolutely incorrect. It will not in any way shape or form be sending the hex values that you want to send.

    Instead it will send a string made up of the hex value of ", then the hex value of $, then the hex value of 0, then the hex value of 1, etc... (watch it in notifications and you will see $22,$24,$30,$31 etc...

    SEND_STRING MATRIX "$01,$81,$81,$81" will actually send a string made up of the hex value $01then the hex value $81 etc..
  • Sorry, not quite sure what you are saying. I had removed the single quotes that member: freijnen had indicated, my current quote for the Kramer Matrix (I have now switched back to the Extron which was working previously and now works again using the 'Slave' COM port) would be

    PUSH [TOUCH_PANEL,188] //CAMERA
    {
    SEND_STRING MATRIX, "$01,$81,$81,$81"
    }

    or (as Anuello suggested ...... I started out learning with Axcent so some Axcent code creeps in)

    button_event [TOUCH_PANEL,188]{
    push:{
    send_string MATRIX,"$01,$81,$81,$81"
    }
    }

    Is this correct? Just for future reference - Newbie learning as I go.

    Thanks
    Bigsquatch wrote: »
    Before you break out the soldering iron you should definitely fix your code. Your send_string statement is telling the master to send the literal string:

    "$01,$81,$81,$81"

    which is absolutely incorrect. It will not in any way shape or form be sending the hex values that you want to send.

    Instead it will send a string made up of the hex value of ", then the hex value of $, then the hex value of 0, then the hex value of 1, etc... (watch it in notifications and you will see $22,$24,$30,$31 etc...

    SEND_STRING MATRIX "$01,$81,$81,$81" will actually send a string made up of the hex value $01then the hex value $81 etc..
  • DHawthorneDHawthorne Posts: 4,584
    Removing the single quotes will accomplish what Bigsquatch was talking about. The rule is, anything inside single quotes will be ASCII encoded, hex notation inside the quotes notwithstanding.
  • Thanks.

    Paul
  • The code you posted is correct. I wasn't sure that you had corrected it.

    thepainter wrote: »
    Sorry, not quite sure what you are saying. I had removed the single quotes that member: freijnen had indicated, my current quote for the Kramer Matrix (I have now switched back to the Extron which was working previously and now works again using the 'Slave' COM port) would be

    PUSH [TOUCH_PANEL,188] //CAMERA
    {
    SEND_STRING MATRIX, "$01,$81,$81,$81"
    }

    or (as Anuello suggested ...... I started out learning with Axcent so some Axcent code creeps in)

    button_event [TOUCH_PANEL,188]{
    push:{
    send_string MATRIX,"$01,$81,$81,$81"
    }
    }

    Is this correct? Just for future reference - Newbie learning as I go.

    Thanks
  • mshuntmshunt Posts: 23
    I would contact AMX service about the COM port error. With it being a known hardware failure/fault they may do it under warranty.

    Your commands are indeed correct, but as has been said, watch your syntax.
Sign In or Register to comment.