Working With Buttons
122
TPDesign4 Touch Panel Design Program
Using Power Assign: 2) Assign Codes
Next assign new function codes:
1. Under Function Code Action, select Assign.
2. Under Function Code Type, select Channel, Address or Level.
3. Click Assign.
To use take full advantage of Power Assign, you need to understand the nuances of some of the
options involved:
 Begin Assignment At
 Ensure Contiguous Code Assignment
 Wrap Within Port ID
Begin Assignment At
If you don't check the Begin Assignment At option, the assign operation begins at the first available
channel, just like the standard Auto Assign. When Begin Assignment At is selected you can specify
the starting value of the channels.
This is particularly useful for setting up things like numeric keypads, where you need the channels
to begin at a specific value, since you might be using offset math in your code to process the button
pushes.
Ensure Contiguous Code Assignment
This is used when the channels have to be in order, with no breaks between them, as in a numeric
keypad. In these cases, since the order is important, use the Shift-select technique to select the
buttons in the order you want to assign the channels.
If you don't care what channels are assigned, uncheck this option, and TPDesign4 will find the next
available free channels, skipping used channels and continuing on until all available channels have
been assigned.
In this case the values will be subject to whether or not you've set the Begin Assignment At
checkbox.
Wrap Within Port ID
Since the touch panels support more than one port, you're no longer limited to 256 channels and
variable text addresses. However, things like
SYSTEM_CALLs are based upon all the channels
coming from a single device. And if the channels are split across device IDs the feedback part of
the System Call won't work. Another thing that comes into play with being able to use multiple
device IDs on the bus is that you may need to confine certain ranges of channels to a single device
to take advantage of the
DEFINE_MUTUALLY_EXCLUSIVE channel grouping in the code. Since
MUTUALLY EXCLUSIVE works on a particular device ID, ensure that the group of buttons is
entirely within a single device. In either of these cases, check the Don't Split option, which ensures
that all channels assigned fall within a single device ID code.
When power assign is run with this option enabled, one of two things can happen, depending upon
the setting of the Keep Checking option. If Keep Checking is not set, you get an error notice. If it is
selected, Power Assign keeps looking until it either finds a valid range to assign the channels to, or