Using High Channel Numbers
John Gonzales
Posts: 609
I'm looking at a module written for a CLO X-arm motorized TV mount, and there are 12 buttons for this device (in, out, tilt up, etc..) but the channel numbers that they used on the touchpanel are in the 3300+ range.
There was talk on a post a long time ago about the resource drain created by using these high numbers and how it was a waste when the previous channels are unused. I was wondering if there was any verdict regarding the memory drain on these high numbers, or is this necessary to take into consideration when programming. If so, do these also take up large memory resources when being used as channels on virtual devices too?
Thanks, and Happy Easter to all those who will be celebrating it!
--John
There was talk on a post a long time ago about the resource drain created by using these high numbers and how it was a waste when the previous channels are unused. I was wondering if there was any verdict regarding the memory drain on these high numbers, or is this necessary to take into consideration when programming. If so, do these also take up large memory resources when being used as channels on virtual devices too?
Thanks, and Happy Easter to all those who will be celebrating it!
--John
0
Comments
I don't think it's enough to matter if you've skipped a few ports to allow for growth and keep things organized, or if you have button ranges a hundred or so channels above another set of channels just to keep it neat. But, jumping ahead thousands of channels is a bit much. I would re-assign them if possible (which may not be if it's hard coded into a compiled module).
Thanks for the response Dave. Seeing this particular module which is used to control a device with 12 buttons and almost no feedback caused me to think of that post a few years ago where the port numbers and channel numbers issue was brought up. I guess as a matter of programming practice, it would be more efficient to keep the channel numbers tightened up with room to add some in-betweens if the need arises. It would not be fun to have to go in and re-number several hundreds of buttons on a large project after discovering that they're causing trouble .
--John
I control these via IR and have had great success. We have about 10 in the field amongst several houses. I am not a fan of their serial connector, so on my first install we cut back to IR just to make it work and have never looked back. I use preset 1 for the out and center position and preset 2 for the general viewing location. In general, on a mio remote, I will give them one macro button to MoveTV and that is a toggle between preset 2 and the IN/OUT (return to home) buttons. On a touch panel, I give them full control.
We ran into the port/channel allocation problem recently at a residence with 26 pannels on a NI4000. I added a weather module to port 100. My thought was that moving forward we could always count on that port being free. Another programmer was onsite and noticed what I had done by watching the panel online/offline events in telnet and he caught it. That was the first I had heard about it, but it makes sense. It truly brought the NI to its knees. That combined with another for loop issue crashed the NI. It was funny to watch the equivalent of a Blue Screen of Death happen to the NI.
In the other sites that I had installed the Weather Module on port 100, they did not have anywhere near the number of panels, so it was not readily apparent. I would agree with Dave that as a matter of programming practices, condensing the port/channel numbers is the way to go. If I had not witnessed the crash, I probably would have never paid any attention to it and would have really fallen into a bad habit.
Paul