Home AMX User Forum NetLinx Studio

Lamp Info Programming

Hello. Firstly please excuse my basic programming knowledge. Can somebody tell me the best way to display projector lamp life hours on a touch panel button, from retrieving the info from the projector to sending the info to the button (in hours.)
I appreciate any tips. Thanks

Comments

  • kbeattyAMXkbeattyAMX Posts: 358
    mundo wrote: »
    Hello. Firstly please excuse my basic programming knowledge. Can somebody tell me the best way to display projector lamp life hours on a touch panel button, from retrieving the info from the projector to sending the info to the button (in hours.)
    I appreciate any tips. Thanks

    If you are receiving the information from the projector in hours as an integer. Then just send_command Panel,"''TEXT1-'itoa(projectorHours)". This will display the hours as an ASCII representation of the integer in Address 1 of a button on the Panel.
  • mundo wrote: »
    Hello. Firstly please excuse my basic programming knowledge. Can somebody tell me the best way to display projector lamp life hours on a touch panel button, from retrieving the info from the projector to...

    As for the part about retrieving the info from the projector, that's going to depend on the projector that you're using. It's also going to be a more complex answer because it's going to involve parsing the data that you retrieve from the projector. Do you need to know how to parse the data too, or do you just need to know how to format the commands to send to the projector?


    --John
  • ericmedleyericmedley Posts: 4,177
    As for the part about retrieving the info from the projector, that's going to depend on the projector that you're using. It's also going to be a more complex answer because it's going to involve parsing the data that you retrieve from the projector. Do you need to know how to parse the data too, or do you just need to know how to format the commands to send to the projector?


    --John

    To add to what John wrote, there is a way you can also track this even if the projector doesn't volunteer lamp hours info. (there are several models that do not do this...)

    You simply track the time of the on state in the program. Granted, it can get out of sync, but it can be helpful to at least aproximate how old a projector bulb is. You just have to 1) make sure nobody turns on the projector manually and only uses the AMX system ot power it on and off and 2) make sure the technician who changes the bulb knows to reset the AMX system's bulb hours when he/she changes the bulb. It also might be helpful to put an adjustment on the AMX system so a user can correct the time by observing the actual time on the projector's menu.
  • mundomundo Posts: 3
    It's Christie projectors that I'm working with so I'm looking to receive the string from the proj with the lamp hours, then whatever needs to be done from then to displaying the hours on a tp button is where I'm looking to get to. If parsing the data is necessary then yes if you could explain that I'm all ears!

    Many thanks!
  • Spire_JeffSpire_Jeff Posts: 1,917
    I apologize if I am wrong, but looking at the questions you are asking, it seems that what you are trying to do might be a little too advanced for you to just jump right into. Most of what you are asking has been covered in the programmer classes offered by AMX. If you just need a refresher on a couple things, I would suggest starting to write the code and then post the code you write and tell us what is not working the way you want. The help files also discuss the commands available fairly well, so if you know what commands you want to use, but don't remember the specifics, the help files generally get you on the right track.

    If you are having troubles figuring out where to even start writing the code, you might want to contact one of the independent programmers on the forums and hire them to help get you started. I'm sure you could find one that will let you buy the source code for most of what you are asking so that you can refresh your memory on how to code the problem should it need to be changed or done again. Also, keep in mind that if you are just adding to existing code, you don't want to add/change anything that will break the existing code.

    Jeff
  • John GonzalesJohn Gonzales Posts: 609
    Spire_Jeff's post sums it up pretty well. While most of us are happy to assist with code questions, concepts, and ideas, the forum isn't really a substitute for a programmer class. There are many independent programmers here that would be more than happy to write the code for you if you need it for an upcoming project.

    Here are some threads that can get you started in learning AMX programming if you haven't run across them yet:
    http://www.amxforums.com/showthread.php?t=5147
    http://www.amxforums.com/showthread.php?t=5024
    http://www.amxforums.com/showthread.php?t=4085

    As for the basics of answering your question, the process of querying a device is usually a Send_String command; for Parsing, I would recommend writing a function to handle it. You'll also need to learn about defining devices, creating buffers, online events, data events, variable text, queueing, and string manipulation. If any of these concepts aren't familiar to you then you would really benefit from the programmmer classes. In one of the posts I linked above, forum member Mush gives some really good links for viewable programming reference material too.

    If you're not in a rush to get this code ready for a project, then like Spire_Jeff suggested, try writing it and if you get stuck ask questions.


    --John
  • kbeattyAMXkbeattyAMX Posts: 358
    Spire_Jeff's post sums it up pretty well. While most of us are happy to assist with code questions, concepts, and ideas, the forum isn't really a substitute for a programmer class. There are many independent programmers here that would be more than happy to write the code for you if you need it for an upcoming project.

    Here are some threads that can get you started in learning AMX programming if you haven't run across them yet:
    http://www.amxforums.com/showthread.php?t=5147
    http://www.amxforums.com/showthread.php?t=5024
    http://www.amxforums.com/showthread.php?t=4085

    As for the basics of answering your question, the process of querying a device is usually a Send_String command; for Parsing, I would recommend writing a function to handle it. You'll also need to learn about defining devices, creating buffers, online events, data events, variable text, queueing, and string manipulation. If any of these concepts aren't familiar to you then you would really benefit from the programmmer classes. In one of the posts I linked above, forum member Mush gives some really good links for viewable programming reference material too.

    If you're not in a rush to get this code ready for a project, then like Spire_Jeff suggested, try writing it and if you get stuck ask questions.


    --John

    Please don't take this information wrong. Most all of these guys are very generous with their code and information. That's what makes this forum so popular! We understand that you might not be programming systems on a weekly or monthly basis. If you don't use it, you loose it. We are more than glad to refresh what you've already learned. Generally everyone here is very open to providing help and support! Let us know your level in AMX programming.

    Whenever I have to program a device, I first check out AMX and ********* for modules. A lot of times AMX has the protocol for the device. Then I google the device for about 15-30 minutes to find protocol. After that I call the manufacturer (generally last because it's time consuming to get a hold of them). At this point you can judge if control of this device is possible with your experience. If you can't do it then spec a different device that you can control or get someone to program a module for you. AMX has a lot of modules for Christie. Check them out to see if one will work for you. I know recently I was looking for a Module for Tandberg C60 but didn't find one so I had to make one myself.
  • mundomundo Posts: 3
    Thanks. I have been on the Programmer 1 course recently but still trying to learn all aspects of programming. My intentions were not to get someone else to write code for me, it was just a query to see what the best way of doing it was and I'll do the rest. I appreciate that most people on here are experienced programmers, I'm basically an av tech who is looking to make some improvements to existing programs in my workplace at this stage, rather than writing whole programs.

    I appreciate the advice anyway, cheers!
Sign In or Register to comment.