Home AMX User Forum NetLinx Studio
Options

Christie DWU600-G Projector

Having issues parsing the lamp hours from this projector. Re-using a similiar module I created for the LWU505 which worked fine. Seems like they changed thier syntax, which I dont know why. When I use SEND_STRING 0 I get LAMP_HOURS=
MODULE_NAME='Christie DWU600' (DEV dvVP,DEV vdvVP)
(***********************************************************)
(*  FILE_LAST_MODIFIED_ON: 09/24/2015  AT: 13:38:54        *)
(***********************************************************)
(***********************************************************)
(*               CONSTANT DEFINITIONS GO BELOW             *)
(***********************************************************)
DEFINE_CONSTANT
// Video Projector Channels
POWER                  = 9     // Momentary: Cycle lamp power
DIGIT_0                = 10    // Momentary: Press menu button digit 0
DIGIT_1                = 11    // Momentary: Press menu button digit 1
DIGIT_2                = 12    // Momentary: Press menu button digit 2
DIGIT_3                = 13    // Momentary: Press menu button digit 3
DIGIT_4                = 14    // Momentary: Press menu button digit 4
DIGIT_5                = 15    // Momentary: Press menu button digit 5
DIGIT_6                = 16    // Momentary: Press menu button digit 6
DIGIT_7                = 17    // Momentary: Press menu button digit 7
DIGIT_8                = 18    // Momentary: Press menu button digit 8
DIGIT_9                = 19    // Momentary: Press menu button digit 9
MENU_PLUS_10           = 20    // Momentary: Press menu button plus_10
MENU_ENTER             = 21    // Momentary: Press menu button enter
VOL_UP                 = 24    // Ramping:   Ramp volume up
VOL_UP_FB              = 24    // Feedback:  Volume ramp up feedback
VOL_DN                 = 25    // Ramping:   Ramp volume down
VOL_DN_FB              = 25    // Feedback:  Volume ramp down feedback
VOL_MUTE               = 26    // Momentary: Cycle volume mute
PWR_ON                 = 27    // Momentary: Set lamp power on
PWR_OFF                = 28    // Momentary: Set lamp power off
SOURCE_TV1             = 30    // Momentary: *deprecated Input Source in favor of Input Select* TV 1 source select
SOURCE_VIDEO1          = 31    // Momentary: *deprecated Input Source in favor of Input Select* Video 1 source select
SOURCE_VIDEO2          = 32    // Momentary: *deprecated Input Source in favor of Input Select* Video 2 source select
SOURCE_VIDEO3          = 33    // Momentary: *deprecated Input Source in favor of Input Select* Video 3 source select
SOURCE_TAPE1           = 34    // Momentary: *deprecated Input Source in favor of Input Select* Tape 1 source select
SOURCE_TAPE2           = 35    // Momentary: *deprecated Input Source in favor of Input Select* Tape 2 source select
SOURCE_CD1             = 36    // Momentary: *deprecated Input Source in favor of Input Select* CD 1 source select
SOURCE_TUNER1          = 37    // Momentary: *deprecated Input Source in favor of Input Select* Tuner 1 source select
SOURCE_PHONO1          = 38    // Momentary: *deprecated Input Source in favor of Input Select* Phono 1 source select
SOURCE_AUX1            = 39    // Momentary: *deprecated Input Source in favor of Input Select* Auxiliary 1 source select
MENU_CANCEL            = 43    // Momentary: Press menu button cancel
MENU_FUNC              = 44    // Momentary: Press menu button menu
MENU_UP                = 45    // Momentary: Press menu up button
MENU_DN                = 46    // Momentary: Press menu down button
MENU_LT                = 47    // Momentary: Press menu left button
MENU_RT                = 48    // Momentary: Press menu right button
MENU_SELECT            = 49    // Momentary: Press menu Select button (select current item under cursor)
MENU_EXIT              = 50    // Momentary: Press menu button exit
MENU_UP_LT             = 51    // Momentary: Press menu up left button
MENU_UP_RT             = 52    // Momentary: Press menu up right button
MENU_DN_LT             = 53    // Momentary: Press menu down left button
MENU_DN_RT             = 54    // Momentary: Press menu down right button
MENU_VIDEO             = 57    // Momentary: Press menu button video
MENU_THUMBS_DN         = 58    // Momentary: Press menu button thumbs down
MENU_THUMBS_UP         = 59    // Momentary: Press menu button thumbs up
MENU_ACCEPT            = 60    // Momentary: Press menu button accept
MENU_REJECT            = 61    // Momentary: Press menu button reject
MENU_LIVE_TV           = 62    // Momentary: Press menu button live TV
MENU_SLEEP             = 63    // Momentary: Press menu button sleep
MENU_PPV               = 64    // Momentary: Press menu button PPV
MENU_FUNCTION          = 65    // Momentary: Press menu button function
MENU_SETUP             = 66    // Momentary: Press menu button setup
MENU_XM                = 77    // Momentary: Press menu button xm
MENU_FM                = 78    // Momentary: Press menu button fm
MENU_AM                = 79    // Momentary: Press menu button am
MENU_CLEAR             = 80    // Momentary: Press menu button clear
MENU_BACK              = 81    // Momentary: Press menu button back
MENU_FORWARD           = 82    // Momentary: Press menu button forward
MENU_ADVANCE           = 83    // Momentary: Press menu button advance
MENU_DIMMER            = 84    // Momentary: Press menu button dimmer
MENU_HOLD              = 85    // Momentary: Press menu button hold
MENU_LIST              = 86    // Momentary: Press menu button list
MENU_LT_PAREN          = 87    // Momentary: Press menu button left paren
MENU_RT_PAREN          = 88    // Momentary: Press menu button right paren
MENU_UNDERSCORE        = 89    // Momentary: Press menu button underscore
MENU_DASH              = 90    // Momentary: Press menu button dash
MENU_ASTERISK          = 91    // Momentary: Press menu button asterisk
MENU_DOT               = 92    // Momentary: Press menu button dot
MENU_POUND             = 93    // Momentary: Press menu button pound
MENU_COMMA             = 94    // Momentary: Press menu button comma
MENU_DIAL              = 95    // Momentary: Press menu button dial
MENU_CONFERENCE        = 96    // Momentary: Press menu button conference
MENU_PLUS_100          = 97    // Momentary: Press menu button plus_100
MENU_PLUS_1000         = 98    // Momentary: Press menu button plus_1000
MENU_DISPLAY           = 99    // Momentary: Press menu button display
MENU_SUBTITLE          = 100   // Momentary: Press menu button subtitle
MENU_INFO              = 101   // Momentary: Press menu button info
MENU_FAVORITES         = 102   // Momentary: Press menu button favorites
MENU_CONTINUE          = 103   // Momentary: Press menu button continue
MENU_RETURN            = 104   // Momentary: Press menu button return
MENU_GUIDE             = 105   // Momentary: Press menu button guide
MENU_PAGE_UP           = 106   // Momentary: Press menu button page up
MENU_PAGE_DN           = 107   // Momentary: Press menu button page down
MENU_DECK_A_B          = 108   // Momentary: Press menu button deck AB
MENU_TV_VCR            = 109   // Momentary: Press menu button TV VCR
MENU_RECORD_SPEED      = 110   // Momentary: Press menu button record speed
MENU_PROGRAM           = 111   // Momentary: Press menu button program
MENU_AB_REPEAT         = 112   // Momentary: Press menu button AB repeat
MENU_HELP              = 113   // Momentary: Press menu button help
MENU_TITLE             = 114   // Momentary: Press menu button title
MENU_TOP_MENU          = 115   // Momentary: Press menu button top menu
MENU_ZOOM              = 116   // Momentary: Press menu button zoom
MENU_ANGLE             = 117   // Momentary: Press menu button angle
MENU_AUDIO             = 118   // Momentary: Press menu button audio
MENU_PREVIEW_INPUT     = 129   // Momentary: Press menu button preview input
MENU_SEND_INPUT        = 130   // Momentary: Press menu button send input
MENU_SEND_GRAPHICS     = 131   // Momentary: Press menu button send graphics
VOL_PRESET             = 138   // Momentary: Cycle volume preset
ASPECT_RATIO           = 142   // Momentary: Cycle aspect ratio
BRIGHT_UP              = 148   // Momentary: Increment brightness
BRIGHT_DN              = 149   // Momentary: Decrement brightness
COLOR_UP               = 150   // Momentary: Increment color
COLOR_DN               = 151   // Momentary: Decrement color
CONTRAST_UP            = 152   // Momentary: Increment contrast
CONTRAST_DN            = 153   // Momentary: Decrement contrast
SHARP_UP               = 154   // Momentary: Increment sharpness
SHARP_DN               = 155   // Momentary: Decrement sharpness
TINT_UP                = 156   // Momentary: Increment tint
TINT_DN                = 157   // Momentary: Decrement tint
PIP_POS                = 191   // Momentary: Cycle pip position
PIP_SWAP               = 193   // Momentary: Swap pip
PIP                    = 194   // Momentary: Cycle pip
PIP_ON                 = 195   // Discrete:  Set pip on
PIP_FB                 = 195   // Feedback:  Pip feedback
SOURCE_CYCLE           = 196   // Momentary: *deprecated Input Source in favor of Input Select* Cycle source select
VOL_MUTE_ON            = 199   // Discrete:  Set volume mute
VOL_MUTE_FB            = 199   // Feedback:  Volume mute feedback
MENU_FLASH             = 203   // Momentary: Press menu button flash
PIC_MUTE               = 210   // Momentary: Cycle picture/video mute
PIC_MUTE_ON            = 211   // Discrete:  Set picture/video mute on
PIC_MUTE_FB            = 211   // Feedback:  Picture/video mute feedback
PIC_FREEZE             = 213   // Momentary: Cycle freeze
PIC_FREEZE_ON          = 214   // Discrete:  Set freeze on
PIC_FREEZE_FB          = 214   // Feedback:  Freeze feedback
MENU_RESET             = 215   // Momentary: Press menu button reset
MENU_INSTANT_REPLAY    = 218   // Momentary: Press menu button instant replay
DEVICE_COMMUNICATING   = 251   // Feedback:  Device online event
DATA_INITIALIZED       = 252   // Feedback:  Data initialized event
LAMP_WARMING_FB        = 253   // Feedback:  Lamp is warming up
LAMP_COOLING_FB        = 254   // Feedback:  Lamp is cooling down
POWER_ON               = 255   // Discrete:  Set lamp power state
LAMP_POWER_FB          = 255   // Feedback:  Lamp power state feedback

(** USER DEFINED CONSTANTS**)
ASPECT_RATIO_16X9 = 350
ASPECT_RATIO_4X3  = 351
VP_ZOOM_IN      = 352
VP_ZOOM_OUT      = 353

SOURCE_VID4      = 357

LAMP_FOCUS_IN       = 354
LAMP_FOCUS_OUT      = 355

PC_AUTO_ADJUST      = 356

SIDE_BY_SIDE      = 357
(***********************************************************)
(*               VARIABLE DEFINITIONS GO BELOW             *)
(***********************************************************)
DEFINE_VARIABLE
NON_VOLATILE CHAR cMsg[25]
(***********************************************************)
(*                 STARTUP CODE GOES BELOW                 *)
(***********************************************************)
DEFINE_START
CREATE_BUFFER dvVP, cMsg
(***********************************************************)
(*              STRUCTURE DEFINITIONS GO BELOW             *)
(***********************************************************)
DEFINE_TYPE
(***********************************************************)
(*       MUTUALLY EXCLUSIVE DEFINITIONS GO BELOW           *)
(***********************************************************)
DEFINE_MUTUALLY_EXCLUSIVE

(***********************************************************)
(*                  THE EVENTS GO BELOW                    *)
(***********************************************************)
DEFINE_EVENT
DATA_EVENT[dvVP]
{
    ONLINE:
    {
    SEND_COMMAND dvVP, "'SET BAUD 19200,N,8,1'" //Sets baud rate
    SEND_COMMAND dvVP, "'RXON'" //starts serial port
    SEND_COMMAND dvVP, "'HSOFF'" //turns handshaking off
    ON[vdvVP,DEVICE_COMMUNICATING]
    }
    STRING:
    {
    SEND_STRING 0, "'FROM PROJECTOR: ',cMsg"    //Send VP Msg to TELNET
    SELECT
    {
       ACTIVE(cMsg = "'(PWR!1)'"): //LAMP is ON
        {
        OFF[vdvVP,LAMP_WARMING_FB]
        OFF[vdvVP,LAMP_COOLING_FB]
        ON[vdvVP,LAMP_POWER_FB]
        }
        ACTIVE(cMsg = "'(PWR!0)'"): //LAMP is OFF
        {
        OFF[vdvVP,LAMP_WARMING_FB]
        OFF[vdvVP,LAMP_COOLING_FB]
        OFF[vdvVP,LAMP_POWER_FB]

        }
        ACTIVE(cMsg = "'(PWR!11)'"): //LAMP is WARMING
        {
        ON[vdvVP,LAMP_WARMING_FB]
        }
        ACTIVE(cMsg = "'(PWR!10)'"): //LAMP is COOLING
        {
        ON[vdvVP,LAMP_COOLING_FB]
        }
    }
    }
    OFFLINE:
    {
    OFF[vdvVP,DEVICE_COMMUNICATING]
    }
}

(**VP Command SET**)
CHANNEL_EVENT[vdvVP,PWR_ON]
CHANNEL_EVENT[vdvVP,PWR_OFF]
CHANNEL_EVENT[vdvVP,SOURCE_VIDEO1] //Input 1 HDMI
CHANNEL_EVENT[vdvVP,SOURCE_VIDEO2] //Input 1 Display Port
CHANNEL_EVENT[vdvVP,MENU_ENTER]
CHANNEL_EVENT[vdvVP,MENU_EXIT]
CHANNEL_EVENT[vdvVP,ASPECT_RATIO_16X9]
CHANNEL_EVENT[vdvVP,MENU_UP]
CHANNEL_EVENT[vdvVP,MENU_LT]
CHANNEL_EVENT[vdvVP,MENU_RT]
CHANNEL_EVENT[vdvVP,MENU_DN]
CHANNEL_EVENT[vdvVP,MENU_SELECT]
{
    ON:
    {
    SWITCH(CHANNEL.CHANNEL)
    {
        CASE PWR_ON:        SEND_STRING dvVP, "'(PWR1)',13"
        CASE PWR_OFF:        SEND_STRING dvVP, "'(PWR0)',13"
        CASE SOURCE_VIDEO1:         SEND_STRING dvVP, "'(SIN4) HDMI',13"
        CASE SOURCE_VIDEO2:     SEND_STRING dvVP, "'(SIN5) DVI-D',13"
        CASE MENU_ENTER:            SEND_STRING dvVP, "'(KEY17)',13"
        CASE MENU_EXIT:            SEND_STRING dvVP, "'(KEY17)',13"
        CASE ASPECT_RATIO_16X9:     SEND_STRING dvVP, "'(KEY67)',13"
        CASE MENU_UP:            SEND_STRING dvVP, "'(KEY38)',13"
        CASE MENU_LT:            SEND_STRING dvVP, "'(KEY39)',13"
        CASE MENU_RT:            SEND_STRING dvVP, "'(KEY41)',13"
        CASE MENU_DN:            SEND_STRING dvVP, "'(KEY42)',13"
        CASE MENU_SELECT:           SEND_STRING dvVP, "'(KEY40)',13"
    }
    }
}

CHANNEL_EVENT[vdvVP, SIDE_BY_SIDE]
{
    ON:
    {
    SEND_STRING dvVP, "'(PIP 1)',13"
    }
    OFF:
    {
    SEND_STRING dvVP, "'(PIP 0)',13"
    }
}


CHANNEL_EVENT[vdvVP,LAMP_FOCUS_IN]
{
    ON:
    {
    SEND_STRING dvVP, "'(KEY5)',13"
    }
    OFF:
    {

    }
}

CHANNEL_EVENT[vdvVP,LAMP_FOCUS_OUT]
{
    ON:
    {
    SEND_STRING dvVP, "'(KEY6)',13"
    }
    OFF:
    {

    }
}

CHANNEL_EVENT[vdvVP,VP_ZOOM_IN]
{
    ON:
    {
    SEND_STRING dvVP, "'(KEY9)',13"
    }
    OFF:
    {

    }
}

CHANNEL_EVENT[vdvVP,VP_ZOOM_OUT]
{
    ON:
    {
    SEND_STRING dvVP, "'(KEY10)',13"
    }
    OFF:
    {

    }
}

(***********************************************************)
(*            THE ACTUAL PROGRAM GOES BELOW                *)
(***********************************************************)
DEFINE_PROGRAM
{
   WAIT 50
   {
       SEND_STRING dvVP, "'(PWR?)',13" (**Every 5 sec Poll Lamp**)
    WAIT 22
        {
        CLEAR_BUFFER cMsg
        SEND_STRING dvVP, "'(LIF+LP1H?)',13" (**Every 2sec Poll Lamp**)
        REMOVE_STRING(cMsg, '(LIF+LP1H!', 1)
        LEFT_STRING(cMsg, 5)
        SEND_STRING vdvVP, "'LAMPTIME=',cMSG"
        SEND_STRING 0, "'LAMPTIME=',cMSG"
        }
    CLEAR_BUFFER cMsg
   }
}

Comments

Sign In or Register to comment.