CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2008
    Posts
    114

    Exclamation RS232c A/V Receiver help

    Hey all, i am trying to turn on a A/V Reciever with a RS232 command using the VB6 comm32. To turn it on it says to use:
    Code:
     Command code | Parameter code | CR  | Code set example
     PW           | ON             | <CR>| PWON<CR>
    And this is my VB6 code i am currently using that doesnt seem to work...
    Code:
       MSComm.CommPort = 2
       MSComm.RThreshold = 1
       MSComm.Settings = "9600,N,8,1"
       MSComm.InputLen = 0
       MSComm.PortOpen = True
       
       MSComm.Output = "PWON" & Chr$(13)
       MSComm.Output = "PWON" & vbCrLf
       MSComm.Output = "PWON" & vbNewLine
       
       MSComm.Output = "ZMON" & Chr$(13)
       MSComm.Output = "ZMON" & vbCrLf
       MSComm.Output = "ZMON" & vbNewLine
    
       MSComm.PortOpen = False
    End If
    The reciever never turns on. What could i be doing incorrectly? I checked to make sure the com port was 2 and it is.

    The PDF of the rs232 commands can be found here for the Marantz SR7005: http://www.filefactory.com/file/b45c...ceiver_All.pdf

    David

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: RS232c A/V Receiver help

    The first thing I would suspect is the comm port settings.

    Baud Rate, Comport, and such. Make sure that your cable is attached to comm 2 and make sure that the device is actually expecting 9600,N,8,1

    Also could be cable related. Are you using a straight through cable or a null modem?
    Always use [code][/code] tags when posting code.

  3. #3
    Join Date
    Aug 2008
    Posts
    114

    Re: RS232c A/V Receiver help

    Well for some reason i got it to work finally. I guess i needed to turn the unit on first then control it there after.

    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured