Home NetLinx Modules & Duet Modules

Anyone have an NEC LCD5220 Monitor Module

Has anyone written a Duet or NetLinx control module for the NEC LCD5220-AV LCD monitor? I've reached a bit of a road block writing a NetLinx one because the manual is horrible on telling you which command type each command in the appendix is!

Anyone else tried/succeeded in writing this??

Thanks

Comments

  • staticatticstaticattic Junior Member Posts: 200
    Not sure what manual you have, but I got this one from NEC. The only controls I have to do with NEC devices are turn them on or off and switch inputs. Other things, like volume ramping, I can't really help too much. When I was having NEC issues, I found this code on the forums. Unfortunatly I don't remember the original author, so I can't properly cite the reference. It is for older NEC models, but I found it helpful with formatting. Hope this helps...
    PROGRAM_NAME='nx_mitsubishi_nec_lcd30004000'
    (***********************************************************)
    (*  FILE CREATED ON: 05/17/2004  AT: 17:00:02              *)
    (***********************************************************)
    (***********************************************************)
    (***********************************************************)
    (*  FILE_LAST_MODIFIED_ON: 05/17/2004  AT: 19:18:36        *)
    (***********************************************************)
    (* System Type : Netlinx                                   *)
    (***********************************************************)
    (* REV HISTORY:                                            *)
    (***********************************************************)
    
    (***********************************************************)
    (* IMPORTANT !                                             *)
    (*                                                         *) 
    (*  The following code blocks are provided as a guide to   *)
    (*  programming the device(s). This is a                   *)
    (*  sample only, and will most likely require modification *)
    (*  to be integrated into a master program.                *)
    (*                                                         *)
    (*  Device-specific protocols should be obtained directly  *)
    (*  from the equipment manufacturer to ensure compliance   *)
    (*  with the most current versions. Within the limits      *)
    (*  imposed by any non-disclosure agreements, AMX will     *)
    (*  provide protocols upon request.                        *)
    (*                                                         *)
    (*  If further programming assistance is required, please  *)
    (*  contact your AMX customer support team.                *)
    (***********************************************************)
    
    (***********************************************************)
    (*   AB HIER:  GERAETE - DEFINITIONEN                      *)
    (***********************************************************)
    DEFINE_DEVICE
    
    dvLCD    =  5001:1:0
    dvPANEL  =   128:1:0
    
    (***********************************************************)
    (*   AB HIER:  KONSTANTEN - DEFINITIONEN                   *)
    (***********************************************************)
    DEFINE_CONSTANT
    CHAR SOH                   = $01
    CHAR BYTE2                 = $30
    CHAR ID_CONTROLLER         = $30
    CHAR ID_LCD3K4K            = $41
    CHAR MSG_CMD               = $41
    CHAR MSG_CMD_REPLY         = $42
    CHAR MSG_GET_PARAM         = $43
    CHAR MSG_GET_PARAM_REPLY   = $44
    CHAR MSG_SET_PARAM         = $45
    CHAR MSG_SET_PARAM_REPLY   = $46
    
    
    
    
    (***********************************************************)
    (*   AB HIER: DATA TYPE DEFINITIONEN                       *)
    (***********************************************************)
    DEFINE_TYPE
    
    (***********************************************************)
    (*   AB HIER:  VARIABLEN - DEFINITIONEN                    *)
    (***********************************************************)
    DEFINE_VARIABLE
    
    INTEGER nVOLUME = 0 // 0..100 (dez)
    
    (***********************************************************)
    (*   AB HIER:  DEFINITION BISTABILER ELEMENTE              *)
    (***********************************************************)
    DEFINE_LATCHING
    
    (***********************************************************)
    (*   AB HIER:  DEFINITION GEGENSEITIGER VERRIEGELUNGEN     *)
    (***********************************************************)
    DEFINE_MUTUALLY_EXCLUSIVE
    
    (***********************************************************)
    (*   AB HIER:  DEFINITION VON UNTERPROGRAMMEN              *)
    (***********************************************************)
    (* EXAMPLE: DEFINE_FUNCTION <RETURN_TYPE> <NAME> (<PARAMETERS>) *)
    (* EXAMPLE: DEFINE_CALL '<NAME>' (<PARAMETERS>) *)
    
    DEFINE_FUNCTION CHAR[50] LCD3K4K_DO_COMMAND (CHAR XBYTE2,      // Byte2 Value
                                                 CHAR DEST,        // Destination ID
                                                 CHAR SOURCE,      // Source ID
                                                 CHAR TYPE,        // Command Type
                                                 CHAR OP_PAGE,     // Operation Code Page
                                                 CHAR OP_CODE,     // Operation Code
                                                 INTEGER VALUE)    // Value 0..65535 $0000..$FFFF
    LOCAL_VAR CHAR sTEMP_BYTE[50], sTEMP_ASCII[100], CMD_LENGTH, VAL_H, VAL_L, MSG[25]
    LOCAL_VAR INTEGER nCMD_LENGTH, nX, CHKSUM
    {
      sTEMP_ASCII = ''
      sTEMP_BYTE = ''
      CMD_LENGTH = 0
      CHKSUM = 0
      VAL_H = TYPE_CAST(VALUE / 256)
      VAL_L = TYPE_CAST(VALUE % 256)
      MSG = "$02,FORMAT('%02X',OP_PAGE),FORMAT('%02X',OP_CODE),FORMAT('%02X',VAL_H),FORMAT('%02X',VAL_L),$03"
      CMD_LENGTH = LENGTH_ARRAY(MSG)
      sTEMP_BYTE = "$01,XBYTE2,DEST,SOURCE,TYPE,FORMAT('%02X',CMD_LENGTH),MSG"
      
      FOR(nX=2;nX<=LENGTH_ARRAY(sTEMP_BYTE);nX++)
      {
        CHKSUM = CHKSUM BXOR sTEMP_BYTE[nX]
      }
      sTEMP_ASCII = "sTEMP_BYTE,CHKSUM"
      RETURN "sTEMP_ASCII,13"
    }
    
    
    DEFINE_CALL 'LCD_SET_VOLUME'(DEV dvCARD,INTEGER nVOL, INTEGER nSTEP, INTEGER nDIR)
    {
      SWITCH(nDIR)
      {
        CASE 1: // lauter
        {
          IF(nVOL < 100)
          {
            IF(nVOL <=(100-nSTEP))
              { nVOL = nVOL + nSTEP }
            ELSE 
              { nVOL = 100 }
            SEND_STRING dvCARD,"LCD3K4K_DO_COMMAND(BYTE2,ID_LCD3K4K,ID_CONTROLLER,MSG_CMD,$00,$62,nVOL)"
          }
        } 
        CASE 2: // leiser
        {
          IF(nVOL > 0)
          {
            IF(nVOL >= (0+nSTEP))
              { nVOL = nVOL - nSTEP }
            ELSE 
              { nVOL = 0 }
            SEND_STRING dvCARD,"LCD3K4K_DO_COMMAND(BYTE2,ID_LCD3K4K,ID_CONTROLLER,MSG_CMD,$00,$62,nVOL)"
          }
        }
      }
    }
    
    (***********************************************************)
    (*   AB HIER:  INITIALISIERUNG DES SYSTEMS                 *)
    (***********************************************************)
    DEFINE_START
    
    (***********************************************************)
    (*   AB HIER: DIE EVENTS                                   *)
    (***********************************************************)
    DEFINE_EVENT
    
    DATA_EVENT[dvLCD]
    {
      ONLINE:
      {
        SEND_COMMAND DATA.DEVICE,'SET BAUD 9600,N,8,1 485 DISABLE'
        SEND_COMMAND DATA.DEVICE,'HSOFF'
        SEND_COMMAND DATA.DEVICE,'XOFF'
        SEND_COMMAND DATA.DEVICE,'CHARD-0'
      }
    }
    
    
    BUTTON_EVENT[dvPANEL,11] // lauter
    {
      PUSH:
      {
        CALL 'LCD_SET_VOLUME'(dvLCD,nVOLUME,5,1) // (RS232,VOL Variable, Schrittgr??e, Richtung)
      }
      HOLD[5,REPEAT]:
      {
        CALL 'LCD_SET_VOLUME'(dvLCD,nVOLUME,5,1)
      }
    } 
    
    BUTTON_EVENT[dvPANEL,12] // leiser
    {
      PUSH:
      {
        CALL 'LCD_SET_VOLUME'(dvLCD,nVOLUME,5,2) // (RS232,VOL Variable, Schrittgr??e, Richtung)
      }
      HOLD[5,REPEAT]:
      {
        CALL 'LCD_SET_VOLUME'(dvLCD,nVOLUME,5,2)
      }
    }
    
    
    
    (***********************************************************)
    (*   AB HIER:  DAS EIGENTLICHE PROGRAMM                    *)
    (***********************************************************)
    DEFINE_PROGRAM
    
    PUSH[dvPANEL,1] // Volume Mute EIN
    {
      // Um in Terminal zu sehen was rausgeht 
      SEND_STRING 0,"'String to LCD: ',LCD3K4K_DO_COMMAND(BYTE2,ID_LCD3K4K,ID_CONTROLLER,MSG_CMD,$00,$8D,$01)" 
      // das KOmmando an den LCD
      SEND_STRING dvLCD,"LCD3K4K_DO_COMMAND(BYTE2,ID_LCD3K4K,ID_CONTROLLER,MSG_CMD,$00,$8D,$01)"
    }
    
    PUSH[dvPANEL,2]
    {
      // Volume Mute AUS
      SEND_STRING dvLCD,"LCD3K4K_DO_COMMAND(BYTE2,ID_LCD3K4K,ID_CONTROLLER,MSG_CMD,$00,$8D,$00)"
    }
    
    PUSH[dvPANEL,3]
    {
    	// der gleiche Befehl wie in der Protokollbeschreibung Seite 5 unten (Ende Kapitel 4.5)
      SEND_STRING dvLCD,"LCD3K4K_DO_COMMAND(BYTE2,ID_LCD3K4K,ID_CONTROLLER,$45,$00,$10,$64)"
    	//Die Function rechnet richtig......
    	// Line      1 :: String To [5001:1:100]-[$010A0E0A$0200100064$03w$0D] - 15:02:47
    	// oder anders formatiert: $01 0 A 0 E 0 A $02 0 0 1 0 0 0 6 4 $03 $77 $0D ($.. -> Hex-Wert, ansonsten ASCII)
    
    }
    
    
    
    (***********************************************************)
    (*                     PROGRAMMENDE                        *)
    (***********************************************************)
    
  • William_HuhnWilliam_Huhn Junior Member Posts: 4
    Thanks static_attic, but that is actually the command set for the NEC plasma monitors, not the LCD monitors which is, unfortunately, entirely different. I've attached the external control PDF that NEC provides for RS232 control of the LCD monitors.

    The smaller 40" and 46" LCD monitors include a list of basic controls for power on/off, and input control which will probably work with the larger 52" and 65" models, but I haven't had an opportunity yet to test this method. However these commands do not allow for full control of brightness, contrast, tint, etc.

    If anyone has worked with NEC's advanced command set like this, my main question still centers around how NEC has classified the commands so that I use the correct header.....

    Thanks!
  • avi_daveavi_dave Junior Member Posts: 62
    sweet structure, helped alot.
  • Marc ScheibeinMarc Scheibein Junior Member Posts: 669
    @ staticattic:
    was done by me long time ago :cool:

    @ William_Huhn:
    if the manual you have attached is for the display model you have on the desk, the routines should work, as by the manual, the commands are the same. (check end of page 5 against the comment at the end of the code).

    But I currently have a customer request about a NEC P701, which also seems to have the above protocol by documentation, but doesn't react to any of that strings...
  • ShermanltsShermanlts Junior Member Posts: 1
    Just a follow up to this. The NECLCD6520AVT module does work for the 5220.
  • Marc ScheibeinMarc Scheibein Junior Member Posts: 669
    Shermanlts wrote: »
    Just a follow up to this. The NECLCD6520AVT module does work for the 5220.

    Yeah, seems that a lot of LCDs will work with this 6520 module.

    Still the question if it also does with the P701....
Sign In or Register to comment.