Power Assign
One of the big time-eating factors of creating a touch panel file is correctly setting up the channel, address and level function codes for any given button, and other properties that depend on button type. Use Power Assign (Button > Power Assign) to streamline this process.
FIG. 391 Power Assign dialog
The Power Assign feature can operate on a single button or on a group of selected buttons, but does not affect Pages, Popup Pages, Sub-Pages or Application windows.
One valuable use of this feature is to establish a contiguous range of channel / address codes on a set of buttons. To accomplish this, left-click on the button in the set that should receive the first channel / address code, then by holding down the CTRL key, select each of the remaining buttons in the set in the order in which you want the channel / address codes to be assigned.
By following the instructions below and utilizing the Begin Assignment At and Ensure Contiguous Code Assignment options (available in the Power Assign dialog), one can assign channel / address codes to every button in the set with significantly fewer mouse clicks and keystrokes than would otherwise be possible.
There are two basic steps to using Power Assign (select a help topic):
- Step One - Clear Channels
- Step Two - Assign Codes
Function Code Assignment Options
To use take full advantage of Power Assign, you should understand the following Function Code Assignment options (in the Power Assign dialog):
- Begin Assignment At: When Begin Assignment At is selected you can specify the starting value of the Port and Function (Channel, Address, or Level) code.
NOTE: If you don' t check the Begin Assignment At option, the assign operation begins at the f irst available channel, just like standard Auto Assign.
The Begin Assignment At function is particularly useful for setting up things like numeric keypads, where you need the channel codes 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: Select to assign all codes in unbroken numerical order.
This is used when the channel codes have to be in order, with no breaks between them, as in a numeric keypad. In these cases, since the order is important, use CTRL-select 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 TPD5 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: Select to assign all codes within a single port.
Since touch panels support more than one port, you're not limited to 256 channel and address codes.
However, things like SYSTEM_CALLS are based upon all the channels coming from a single device (port). If the channels are split across ports, the feedback part of the System Call will not work.
Another thing that comes into play with being able to use multiple ports is that you may need to confine certain ranges of channel codes to a single port to take advantage of the DEFINE_MUTUALLY_EXCLUSIVE channel grouping in the code.
Since MUTUALLY EXCLUSIVE works on a particular port, one must ensure that the group of buttons is entirely within a single port.
In either of these cases, check the Wrap Within Port ID option, which ensures that all channel codes assigned fall within a single port.
Limitations
The following limitations apply to Function Codes:
- The maximum number of channel codes per port is 4000.
- The maximum number of address codes per port is 4000.
- The maximum number of level codes per port is 600.
- The maximum number of ports in TPD5 is 100.
Step One - Clear Channels
It is good practice to clear the function codes before any Assign Codes operations. If you don't clear the codes first, and any of the buttons in the group you are assigning already have codes assigned, they will show up as used when Power Assign does its' checks. In some cases, this may be what you want to have happen, but usually you will want to clear them before assigning.
One powerful feature of Power Assign is the ability to clear the various function codes from the buttons:
- In a Design View window, select the buttons that you want to include in this Power Assign (FIG. 392):
FIG. 392 Buttons selected for Power Assign
- Select Button > Power Assign (or press F8) to open the Power Assign dialog.
- Under Function Code Action, select Clear.
- Under Function Code Type, select Channel (FIG. 393):
FIG. 393 Power Assign - Clear Channels
- Click Assign. The figure below shows the same group of buttons, with their Channel Codes cleared (FIG. 394):
FIG. 394 Buttons selected for Power Assign - Channel Codes cleared
- Repeat this process for Address and Level codes.
- Note that the Power Assign dialog is a floating dialog - you can leave it open after clicking Assign to do the next action: Simply select Address (under Function code type) and Assign. Then select Level and click Assign.
- The figure below shows the same group of buttons, with their Channel, Address and Level codes cleared (FIG. 395):
FIG. 395 Buttons selected for Power Assign - Channel, Address and Level codes cleared
Step Two - Assign Codes
Next assign new function codes:
- Select one or buttons in the Design View window.
- In the Power Assign dialog, under Function Code Action, select Assign.
- Under Function Code Type, select Channel.
Select one or more Function Code Assignment options. These options are described in the
Function Code Assignment
Options section on page 276
.
- Click Assign.
- Repeat this process for Address and Level codes.
- Since the selection is retained after any operation, if you make a mistake, it's easy to select Clear and click the Assign button to clear the codes. One can also simply undo the action if desired.
- Power Assign processes the function code assignments based on the order in the selection. Therefore, if the order is important, make sure to create the selection using CTRL-Select.