Home AMX User Forum NetLinx Studio

cannel problems

Hi at all.
I have on a 8400 one button with channel port 10001:17:1 and channel code 50 . I copy and paste it, and change only the channel code to 3999.

So in the code I write
on[10001:17:1,50]
on[10001:17:3999]

When I execute the coe only the code 50 button goes to on.
Why?
Thanks
Alex

Comments

  • Jimweir192Jimweir192 Posts: 502
    eddymouse wrote: »

    on[10001:17:3999]

    You have missed out the system number in your D:P:S

    should be ON[10001:17:1,3999]

    If you Define your devices properly you can avoid these mistakes i.e.

    dvTP = 10001:17:1

    ON[dvTP,3999]
  • eddymouseeddymouse Posts: 67
    It's a typo error!
    In the real code is correct.
    I write
    on[10001:17:1,50]
    on[10001:17:1,3999]
    and only the first button goes on.
    The second don't work.
    In a R4 it works!
  • Spire_JeffSpire_Jeff Posts: 1,917
    First off, doing this is REALLY a bad idea, unless you are using all of the channels from 255 to 3998. I am guessing that the reason you are having problems is that you need to use the SET_VIRTUAL_CHANNEL_COUNT. Is the touch panel combined with a virtual device?

    But, more importantly, by using a channel off 3999, you are forcing the processor to monitor all of the channels from 1-3999. This is not a problem if you are using all of the channels, but it is very wasteful if you are not.

    Jeff
  • eddymouseeddymouse Posts: 67
    Yes. I'm using a virtual device with a combine with two real devices. And If I use a channel code < 255 it works.

    But If I use SET_VIRTUAL_CHANNEL_COUNT(vdv,3000) ( where? in DEFINE_START?) do I use much more power processor?

    Where can I find more information about this topic?
  • viningvining Posts: 4,368
    eddynouse wrote:
    where? in DEFINE_START?
    In an online event for the virtual device.
    do I use much more power processor?
    Well it probably would affect the system much but it adds up. On a small system monitoring and extra 3,949 channels that aren't being used wouldn't be so bad but if you do this for other devices and have a large system by time your done, yes it could slow things down.

    The question is why? If you're not using these channels why not just go to the next channel 51 or 61 why 3999? That's a big leap even if you want extra space for expansion.
  • eddymouseeddymouse Posts: 67
    I have also a problem with a real device with a level. If the level port is 30 I can't handle the level change event. If the level port is 2 I can handle the event.
    So I used SET_VIRTUAL_LEVEL_COUNT on the REAL device to seto device level to 30 and now I can handle also the level event on port 30.
    But why? Sometimes I can't understand how Amx products works! And where can I found information about this? I search on Netlinx Manual but I didn't found nothing!!!
    Thanks a lot
    Alessandro
  • a_riot42a_riot42 Posts: 1,624
    I think it was pretty clear from what others have said. Due to the fact that all the extra channels, levels etc take up space in a lookup table, it is best to use as few as necessary and expand as needed. Netlinx makes you declare if you are going to use channels, levels that are past the normal values so the tables can be small unless you really need them larger. Its called efficiency and economy of resources. In the programming world you use the least amount of resources you can to get the job done. You are not adhering to that philosphy and are paying the price.
    Paul
  • eddymouseeddymouse Posts: 67
    Ok.
    But if use high value is because I need to use it, because the other low value is used!
    But I never view documentation about this limits of Netlinx.
    I have spent two days to understand because my code don't work!
    It's a good idea to limit resources, to speed-up the system. But I can't find documentation about that!
  • ericmedleyericmedley Posts: 4,177
    I suppose this kinda brings up something I've had to sorta figure out as time went by as well.

    I too was giddy and punch-drunk about using the ports on Touch Panels. I'd burn up whole ports on something that really only needed to use 100~200 buttons. The system wasn't overly bogged down or anything. But it is true that assigning ports/buttons starts to eat up space in the RAM. I went through and somewhat consolidated things a bit and have noticed an increase in zippiness. So, for example, I consolidated all my source controls (DVDs, Blu-Ray, VCR, CDs, pretty much anything to to with home theaters) down to one port in button groups of 100.

    I also, make sure to fill from the bottom up. In other words, I don't pick random numbers way up high. I keep all the info in a spread sheet since my pea-brain can't keep it any more.


    I've done some pretty big systems and still kept the Touch Panel port counts down below 10.
  • DHawthorneDHawthorne Posts: 4,584
    We've discussed this before.

    Ports and channels are all tracked internally in the master, whether you are actually using them or not. If you declare something as port 3999, then ports 1-3998 are all automatically allocated, with all the default channels and levels, each using up whatever memory space is needed to do the internal tracking. I have seen this kind of thing bring a larger system to its knees; you may get away with it in a small system, but it's a bad habit to get into, and you never know when you are going to expand past that threshold where it matters.
Sign In or Register to comment.