Home AMX General Discussion

Hitachi projector lamp hours

MLaletasMLaletas Junior MemberPosts: 226
This could be considered lazy, although I did try to research the topic a good bit. The manual is super vague for the expected response back from the hitachi projector. Wondering if anyone knows what the expected response is for the lamp hour query? I cant tell which of the two bytes determine what... Maybe im stupid?

Comments

  • ericmedleyericmedley Senior Member - 4000+ posts Posts: 4,177
    Got a snippet of the manual, the actual lamp hours, and the actual return? Perhaps we can help.
  • MLaletasMLaletas Junior Member Posts: 226
    I was prepping for the job today, our best service tech is going out there Monday. Protocol is pretty easy, problem is I just can't seem to guess how the lamp query response is going to look like. I assume it will $1D,byte,byte. Just how are those last two bytes supposed to interpreted.

    here is the excerpt
    RS-232C Communication (continued)
    3. Response code / Error code ("h" shows hexadecimal)
    (1) ACK reply : 06h
    When the projector receives the Set, Increment, Decrement or Execute
    command correctly, the projector changes the setting data for the specified
    item by [Type], and it returns the code.
    (2) NAK reply : 15h
    When the projector cannot understand the received command, the projector
    returns the error code.
    In such a case, check the sending code and send the same command again.
    (3) Error reply : 1Ch + 0000h
    When the projector cannot execute the received command for any reasons,
    the projector returns the error code.
    In such a case, check the sending code and the setting status of the projector.
    (4) Data reply : 1Dh + xxxxh
    When the projector receives the GET command correctly, the projector returns
    the responce code and 2 bytes of data.
    NOTE ? For connecting the projector to your devices, please read the
    manual for each devices, and connect them correctly with suitable cables.
    ? Operation cannot be guaranteed when the projector receives an undefined
    command or data.
    ? Provide an interval of at least 40ms between the response code and any other
    code.
    ? The projector outputs test data when the power supply is switched ON, and
    when the lamp is lit. Ignore this data.
    ? Commands are not accepted during warm-up.
    ? When the data length is greater than indicated by the data length code, the
    projector ignore the excess data code. Conversely when the data length is
    shorter than indicated by the data length code, the projector returns the error
  • ericmedleyericmedley Senior Member - 4000+ posts Posts: 4,177
    There is nothing in the snippet you posted about the formatting of the Lamp Hour message. And I don't have any of my Hitachi code handy... but typically they do these kinds of things in a fairly straight-forward manner. The two bytes are usually the GSB and LSB of the number of lamp hiurs. Yiu just have to figure out which is which.

    lets say the lamp hours were at 508

    bear in mind a byte's max value is 255 (0xFF).
    So, to split the value up so it works:
    GSB =$01. ( $1 X $100)
    LSB = $FC
    so to do,the math

    lamp hours = ( GSB X $100) + LSB

    If it uses this method, t would be easy to figure out which byte was the LSB and GSB by knowing what the projector said it's hours were in the on screen display and the two hex values it returned.

    also, the AMX module for the Hitachi does work - just sayin...
  • MLaletasMLaletas Junior Member Posts: 226
    ericmedley wrote: »
    There is nothing in the snippet you posted about the formatting of the Lamp Hour message. And I don't have any of my Hitachi code handy...
    Right that's why I looked around and eventually posted here. I hate api's that are vague, I like to be as prepared as possible. So I'll see how it looks on monday and I'll post my findings here in case anyone else runs into it

  • MLaletasMLaletas Junior Member Posts: 226
    ericmedley wrote: »

    also, the AMX module for the Hitachi does work - just sayin...

    Also I'm ignoring that last part :)
  • MLaletasMLaletas Junior Member Posts: 226
    Well I dont have a ton to report unfortunately. The projector had 1 hour of lamp hours which displayed, $1D,$01,$00. So i just kind of assumed what you said Eric, oh well, I wish that documentation specified how that worked.
  • restensorestenso Junior Member Posts: 1
    Try
    REMOVE_STRING(data.text,"$1D", 1)
    Temp=MID_STRING(data.text,1,1)
    PROJ_LAMP = (Temp[1])
  • MLaletasMLaletas Junior Member Posts: 226
    I appreciate the response restenso, but the post was really about how to interpret how to calculate the lamp query response not so much the code behind it.
  • ericmedleyericmedley Senior Member - 4000+ posts Posts: 4,177
    MLaletas wrote: »
    Well I dont have a ton to report unfortunately. The projector had 1 hour of lamp hours which displayed, $1D,$01,$00. So i just kind of assumed what you said Eric, oh well, I wish that documentation specified how that worked.

    Here again - with the usual disclaimers about not having the protocol at hand...

    If our assumption that they are doing the usual LSB/MSB method of getting past the $FF limit of integers with single bytes I would guess the format of the message is

    $1D = command/response ID where $1D means 'here's my lamp hours'
    $01 = LSB
    $00 = MSB

    So the hex value fo the lamp hours is
    $0001

    When the lamp hours roll pas 255 you will probably see the 2nd byte turn to a $01.

    Back in olden dayes of yore it was quite common for the MSB to be the last byte.

  • MLaletasMLaletas Junior Member Posts: 226
    Right, this case it was reversed. I really dont feel bad about this one if it doesnt work properly once the hours start to tick up. Really the only thing that was happening in the existing code with the lamp hours on the previous projector that was in place was a email getting sent once it was above 1000hrs
Sign In or Register to comment.