Home AMX User Forum NetLinx Studio

Need help with RS-232 syntax on LG flat panels

Greetings!

I'm a newbie to NetLinx and it's been about a year-and-a-half since I took Programming 1. I'm trying to control 4 - LG M4210 flat panels via RS-232. I have the manual (which includes over a dozen pages on serial control), but I'm not able to find the combination that these suckers want to see. I know I'm connected properly 'cuz I can see code coming back every time I send something out. Any help will be greatly appreciated. JB

Comments

  • Can you give us some examples of what you're sending and getting back in response? (Even if the things don't >do< what you asked, what they send as a reply can be relevant)

    - Chip
  • Here's a snippet from a module I'm using. This is the power on command.
    DEFINE_CONSTANT
    
    VOLATILE INTEGER SP = 32 // This value is the ASCII value for a Space
    
    VOLATILE INTEGER CR = 13 // This value is the ASCII value for a Carriage Return
    
    DEFINE_EVENT
    
    <EVENT>
    SEND_STRING dvTV, "'ka', SP, cID, SP, '1', CR"
    

    What the TV gets is "ka 01 1 <CR>"

    What I'm doing is sending the ka as a string literal. Then I send the ASCII value for the space, although looking at it, you may be able to include that in the string literal part like 'ka '

    The cID is the TV's device ID which is set in the TV's menu. I have it as a constant defined elsewhere in the program and passed into the module.

    After the set ID is another space.

    Then comes your data. In this case, 1 is on, 0 is off.

    Then it ends with a carriage return, which once again I send the ASCII value. Remember every time you switch between data types you need a comma, but not between single quotes since that will make it part of your string.

    Hope that helps.
  • Try ID = 0 - thinks its a universal
  • icraigie wrote: »
    Try ID = 0 - thinks its a universal

    Nice ninja edit. The ID is two digits, so the universal is 00.
  • Thanks to all who replied. I'm hoping to get in and try your suggestions tomorrow after 2pm (heavily booked classroom). I had not tried the syntax that Chris suggested, so I'm feeling pretty good about that!

    I need to get in there physically because, all of a sudden, I couldn't get any asynchronous notifications from any of my devices. I could see everything on the online tree. But I couldn't see any serial traffic to or from the devices as I had before (when using "Control a device"). I couldn't see any traffic on the projector either, but it was being controlled just fine by the system. I reinstalled NS2.7, but nothing changed. Any suggestions would be helpful. Thanks in advance, JB
Sign In or Register to comment.