Adding Custom Variable
Thomas Hayes Posts: 1,164
I wish to add my own variable to RMS for tracking a projectors runtime. The variable alreasy exist in my code. I would like to know how to add it to the RMS_Hooks.AXI so it will show up under the projector listed as runtime.
With CodeCrafter, we configure a "Monitored third party device" (the projector) and set it to use the projector support module (rmsProjectorMod.axs). This module will monitor channels 27/28 and start/stop an internal timer (also monitors strings like 'POWER=ON/OFF' and 'LAMPTIME=x'). This module will automatically update RMS of lamp hours for you (RMSTimerCallback()).
CodeCrafter generates RMSMain.axi for us and connects it all automatically.
The RMSMain_Hooks.axi file is where we add our own custom code. This way we can always run CodeCrafter to generate the RMSMain and we don't need to worry about losing anything we've added. Within RMSMain_Hooks you'll see calls to RMSSetLampHours() which essentially builds up the command to RMS for us. This way, our own custom code polls the projector for actual lamp hours and updates each hour.
Hope this helps. Shoot me an email if you want to dig into it further. I've climbed the RMS learning curve and can help pull you up.