Home AMX User Forum NetLinx Studio

Stange Marantz RS232 Commands

New AMX dealer and first time poster to the forum.

I am installing a Marantz DV7600 and CC4300 - both controlled via RS232. The Marantz CC4300 CD player manual provided clear, straight forward serial commands to use and so far, for the most part, using terminal these commands seem to work well. The Marantz DV7600 DVD player however is another story. I can't make heads or tails of the RS232 control syntax. An example...

Play is listed in the comand reference as "@PLY:0\xd," and Stop is "@STP:0\xd,". I am totally lost as how to interpret these commands let alone convert them to their ASCII equiv for Netlinx.

Has anyone used or delt with a Marantz product with these commands before? Is there a "secret code book" or some way to work with this syntax?

I believe that the Marantz SR9600 also uses this command stucture.

Cheers

Comments

  • Joe HebertJoe Hebert Posts: 2,159
    I haven't dealt with this protocol nor seen the manual so I may be guiding you down the wrong path. With that said I believe the \xd is a carriage return. So I would try the following:

    Play
    SEND_STRING dvDVD, ""'@PLY:0',$0D"

    Stop
    SEND_STRING dvDVD, ""'@STP:0',$0D"

    HTH

    Welcome to the forum! :)
  • Let me give that a whirl and see what I get. Thanks
  • I am testing this using Hyperterminal but no joy. Could it be that I am typing the string incorrectly into Hyperterminal. What I type in the Hyperterm session is @PLY:0 followed by a carrige return.

    Cheers
  • Joe HebertJoe Hebert Posts: 2,159
    Looks like the string is being typed in correctly assuming the baud rate and cable is correct.

    Can you post the protocol or link to the protocol for us to look at?
  • Attached is the Excel file with the protocol. This is what Marantz sent me. I think I have a successful connection to the slave at least I am seeing activity on the port through a data logger. I Have noticed one strange thing and I dont know what if or if it means I have a connection problem, when I look at the logger I notice that after every character I type there is a line return, the logger looks like this ..

    TX:P
    TX:L
    TX:Y
    TX::
    TX:0
    TX:

    So it looks like I might be doing a carriage return after each character.
  • Joe HebertJoe Hebert Posts: 2,159
    My eyes are failing me. I didn't see the comma after the carriage return (\xd). Kind of an odd protocol but it looks the commands should be:

    Play
    SEND_STRING dvDVD, ""'@PLY:0',$0D,','"

    Stop
    SEND_STRING dvDVD, ""'@STP:0',$0D,','"

    I don't use Hyperterm so I'm no help there, sorry. And I don't know what logger you are using but it looks similar to what the logger I'm familiar with outputs.
  • In the spreadsheet, many of the commands have the "," after the "/xd", but there is at least one command (for Angle) that has ".". Then, some of the others don't have anything after the "/xd".

    That stuff is really odd.
  • Joe HebertJoe Hebert Posts: 2,159
    If the baud rate is correct (which they don't even document in the protocol) and the cable is correct, I'm out of ideas on what the unit is expecting. I'm assuming you already tried sending the string exactly as printed in their document as ASCII characters. For example:

    Play
    SEND_STRING dvDVD, '@PLY:0\xd,'

    Hopefully someone who has worked with this unit before will chime in. Sorry I couldn't have been of more help.
  • The tech at Marantz said this docuent would shed some light on the command syntax but it ended up confusing me even more. I see AMX has this module for Duet on the AMX site but with as little as I know at this point with AMX I dont think I can fire that module up on my clients NI-3000.

    I'm trying variations of the string now to see if anything happens.

    Crud!
  • Joe HebertJoe Hebert Posts: 2,159
    I loaded the AMX module and the strings that are being sent = the commands I posted in my first response. (I just noticed I had an extra double quote in the beginning of the strings - these strings are correct)

    Play
    SEND_STRING dvDVD, "'@PLY:0',$0D"

    Stop
    SEND_STRING dvDVD, "'@STP:0',$0D"

    Here is what I see in the Notifications window when using the AMX DUET module for play and stop:

    Line 1 :: String To [5001:1:10]-[@PLY:0$0D] - 23:28:25
    Line 4 :: String To [5001:1:10]-[@STP:0$0D] - 23:29:15

    Response from GET BAUD
    Line 5 :: String From [5001:1:10]-[PORT 1,9600,N,8,1 485 DISABLED] - 23:31:01

    Assuming the module works then I would have to say you have a cabling issue, a defective unit, or the carriage return isn't being sent with your terminal program.

    You have the option to use Control a Device to send the string to your DVD with Netlinx studio and an NI Master. Just make sure String Expressions is checked, String is selected, and you enter the correct Device, Port, and System. In the message to send window type in "'@PLY:0',$0D" and then click on Send To Device to send the play command.

    Let us know what you find out.
  • Joe HebertJoe Hebert Posts: 2,159
    One last thing: Portmon is a great piece of freeware to monitor traffic to and from a PC Comm port. If you do decide to try it (to confirm your terminal program is sending the carriage return), select the Show Hex option so you can view the values of all characters entering or leaving and not just the printable characters. Portmon is one of my favorite tools and ranks high in my top 10 best freeware list.

    http://www.sysinternals.com/Utilities/Portmon.html
  • DHawthorneDHawthorne Posts: 4,584
    Personally, I would use the Duet modules. Just make sure you have the latest firmware. It will make controlling the thing much easier in the long run.

    However, if you aren't comfortable with that, it looks like the "secret code" is nothing more than a strange way of representing hex. /xd = $OD in NetLinx parlance, so the /x is just a way of saying the next didgit is hex.
  • DHawthorneDHawthorne Posts: 4,584
    Joe Hebert wrote:
    One last thing: Portmon is a great piece of freeware to monitor traffic to and from a PC Comm port. If you do decide to try it (to confirm your terminal program is sending the carriage return), select the Show Hex option so you can view the values of all characters entering or leaving and not just the printable characters. Portmon is one of my favorite tools and ranks high in my top 10 best freeware list.

    http://www.sysinternals.com/Utilities/Portmon.html
    There's another nice Freebie at http://www.bb-elec.com/product.asp?sku=COMTEST .
  • ImpaqtImpaqt Posts: 155
    Joe Hebert wrote:
    I loaded the AMX module and the strings that are being sent = the commands I posted in my first response. (I just noticed I had an extra double quote in the beginning of the strings - these strings are correct)

    Play
    SEND_STRING dvDVD, "'@PLY:0',$0D"

    Stop
    SEND_STRING dvDVD, "'@STP:0',$0D"

    Here is what I see in the Notifications window when using the AMX DUET module for play and stop:

    Line 1 :: String To [5001:1:10]-[@PLY:0$0D] - 23:28:25
    Line 4 :: String To [5001:1:10]-[@STP:0$0D] - 23:29:15

    Response from GET BAUD
    Line 5 :: String From [5001:1:10]-[PORT 1,9600,N,8,1 485 DISABLED] - 23:31:01

    Assuming the module works then I would have to say you have a cabling issue, a defective unit, or the carriage return isn't being sent with your terminal program.

    You have the option to use Control a Device to send the string to your DVD with Netlinx studio and an NI Master. Just make sure String Expressions is checked, String is selected, and you enter the correct Device, Port, and System. In the message to send window type in "'@PLY:0',$0D" and then click on Send To Device to send the play command.

    Let us know what you find out.

    These are exactly right..... I'm a Marantz dealer and work with these DVD's all the time...

    As for Testing RS-232/IP Strings, I use Vantage Tester 1.11. Its an Awesome little utility. Lets you type in your string and send it all at once instead of the Hyperterminal send as you go stuff.... Its small and Does RS-232 and IP... Sweet emulator
  • DHawthorneDHawthorne Posts: 4,584
    Impaqt wrote:
    As for Testing RS-232/IP Strings, I use Vantage Tester 1.11. Its an Awesome little utility. Lets you type in your string and send it all at once instead of the Hyperterminal send as you go stuff.... Its small and Does RS-232 and IP... Sweet emulator
    Got a link for that? Can't find it with Google ...
  • Well I must be doing something wrong or missing something. I have been trying these commands from the control a device window under Netlinx but still without luck. I have been using the AMX provided RS232 cable to try and talk to the DVD player, as I understand that cable should be a pin to pin cable. Is there a SET_BAUD command I need to add to DEFINE_START to address that serial port on the back of the NI-3000?

    This is what I have been testing with so far.

    DEFINE_EVENT

    button_event [tp8400,100]
    {
    PUSH:
    {
    SEND_STRING dvDV7600, "'@PLY:0',$0D"
    }
    }

    button_event [tp8400,101]
    {
    PUSH:
    {
    SEND_STRING dvDV7600, "'@STP:0',$0D"

    }
    }

    Cheers
  • Joe HebertJoe Hebert Posts: 2,159
    Try this:
    DEFINE_DEVICE
    
    dvDVD	= 5001:1:0	//RS-232 Port 1
    dvTP	= 10001:1:0	//Touch panel
    
    DEFINE_EVENT
    
    DATA_EVENT[dvDVD] {
    
       ONLINE: {
          //set comm settings after ONLINE event for device
          SEND_COMMAND DATA.DEVICE,'HSOFF' //turn handshaking off
          SEND_COMMAND DATA.DEVICE, 'TSET BAUD 9600,N,8,1 485 DISABLED'
       }
    }
    
    BUTTON_EVENT[dvTP,1] { //play button
    
       PUSH: {
          SEND_STRING dvDVD, "'@PLY:0',$0D"
       }
    }
    
    BUTTON_EVENT[dvTP,2] { //stop button
    
       PUSH: {
          SEND_STRING dvDVD, "'@STP:0',$0D"
       }
    }
    

    You should see the TX light flash for RS-232 port 1 when you press the Play or Stop buttons. If you don?t have a touch screen then you can use Emulate a Device for device 10001:1:0 and push channels 1 and 2. If you want to send the strings directly to the device then you can use Control a Device for device 5001:1:0.

    Does this do the trick?
  • DHawthorneDHawthorne Posts: 4,584
    I have noticed that some AMX modules turn the hardware handshaking ON for Marantz devices, when in fact it needs to be off (though probably it's a cable flaw). This requires a slight delay to the port to use the SEND_COMMAND "'HSOFF'" in the ONLINE event, because the module is doing the same, but turning it on. By all right though, if the cable is correct, the Marantz should set the handshaking lines correctly for it to work if on.
  • OK - It's just gotta be the cable. I will pick up a new cable first thing tomorrow and give a try. This will be my first installation of the AMX product and it all happens this Thursday.

    This last week has been overwhelming for me in my first intoduction into the AMX world.

    For the past year things were simpler, installing RF to IR blasters and using universal RF remotes, but my customers started asking for more and I bit off on that. Kinda makes me wish I had stayed on the structured wiring side of things but I am up to this challange!

    I just wish there were better documentation on the Netlinx API - all I had luck finding on the AMX training site was basically an introduction to the GUI of Netlinx. Still the product is just plain neat and I like the WOW factor it seems to give my customers.

    Anybody have suggestions on how best to ramp up my knowledge on the programming side? Are there any tutorials out there outside of the AMX offered classes?
  • DenisDenis Posts: 163
    Vantage tester

    There is Vantage tester if it can help you
  • HedbergHedberg Posts: 671
    There's plenty of good advice already on how to talk to the device -- it should be working. You can test your cable by shorting pins 2 to 3 on the device end and then connect just the other end to the AMX port. You should then get the port to both send and receive your command. Don't forget to send an RXON command if you don't have a string processor in the device's data event or a create buffer command. We had a thread about that a while ago -- search for RXON.

    As for documentation, up until about a month ago, there was some self training stuff on the web site called "Intro to AMX programming." It doesn' look likes it's still there, but I see no reason why I can't email the zip files to you. let me know.

    Otherwise, the Netlinx programming manual covers most everything and the Studio manual covers a lot, too. If you've had prior programming courses/experience in C or FORTRAN, you can learn enough from the Intro, and the Netlinx Programming manual to accomplish a whole lot of the basic stuff. There is no substitute for the real training courses, though, if you want to get proficient.

    Of course, if you watch this forum (and read the archives) you'll learn how to solve a grand assorment of problems with efficiency and style and before long you will be pursued unmercifully by members of the opposite sex.

    The downloadable modules are a good source of sample code to look at. The actual device control is hidden, but there's a bunch of stuff in the UI code that you should be able to looke at, understand and profit from.

    Also, there is some good stuff in the technote archives though searching there--you have to sort of know what you're looking for. There is some stuff on master to master, there is a style guide, and there's stuff on IP and other things.

    So, there's a lot there -- good luck with it. Trying to learn on your own without going through the training can be a little tough, but you can probably learn enough to accomplish what you need for many things.
  • The new cable worked! Thanks everyone for all the help. Could have never done it without all the support.

    With that out of the way the last nut I need to crack is the CD player. I have been sending what I thought were the correct strings but whatever I send it just turns it off.

    BUTTON_EVENT [tp8400, 103] { //Power DVD

    PUSH: {
    SEND_STRING CD, "$32,$30,$31,$32,$30,$31,$0D"
    }
    }

    I have been using the control a device feature in Netlinx and every string I send out just powers off the player. Something I notice when I send the string is that the TX and RX lights on port 3 flash at the same time where as on the DVD player (that now works thanks to all in this forum) only flashes the TX light. Any thoughts?

    Cheers
  • Well scratch the last post - the CD started working - guess it helps when you plug into the right port. It is obvious I need to take a break.

    Cheers
  • Joe HebertJoe Hebert Posts: 2,159
    Glad to hear the story had a happy ending. Have fun!
Sign In or Register to comment.