Home AMX User Forum NetLinx Studio

What's the Problem with DEVCHANs?

Greetings,

I remember several posts a while back about people avoiding the use of DEVCHANs. If so, what do people have against them? Is there a particular scenario in which they can be problematic? I find them to be very handy, especially as an old Axcess guy who would have died for them years ago.

Thanks.

Comments

  • What's the Problem with DEVCHANs?

    I don't recall any posts about DEVCHANs indicating they can be problematic and therefore are to be avoided. There are some limitations with DEVCHANs when used in events (a limit of 4000 event triggers per event declaration) but then this limitation extends to any combination of devices and channels/levels in an event and is not unique to DEVCHANs. There are problems with DEVLEVs when used in LEVEL_EVENTs and this has been documented.

    I use DEVCHANs frequently and they are handy in a number of instances. Others might avoid them for personal preference and flexibility in their coding but I am not aware of any intrinsic problems with them as a language construct.

    Reese
  • DHawthorneDHawthorne Posts: 4,584
    I pretty much stopped using them only because I find it more flexible to maintain seperate arrays for the devices, then integer arrays for button channels, text addresses, and levels. I started this when I ran into the upper limit on event triggers with a large project, and it made better sense to have one array for the devices, then multiple integer arrays for the buttons rather than pages of DEVCHAN arrays. I have since started doing it with smaller projects as well.

    The thing with my projects is that I almost never have a single touch panel in a system, and only rarely have a case where it makes sense to combine my multiple panels to act as one. That alone rules out DEVCHANs; seperate arrays are the more elegant solution.
  • Good Answer
    DHawthorne wrote:
    I pretty much stopped using them only because I find it more flexible to maintain seperate arrays for the devices, then integer arrays for button channels, text addresses, and levels. I started this when I ran into the upper limit on event triggers with a large project, and it made better sense to have one array for the devices, then multiple integer arrays for the buttons rather than pages of DEVCHAN arrays. I have since started doing it with smaller projects as well.

    The thing with my projects is that I almost never have a single touch panel in a system, and only rarely have a case where it makes sense to combine my multiple panels to act as one. That alone rules out DEVCHANs; seperate arrays are the more elegant solution.

    I agree this is the best approach to make a program scaleable.
Sign In or Register to comment.