4.2  piWebCAT - Database table - buttons       See also buttons configuration notes     timing.disable

  • rig                The current radio   - drop down selector (from radios table)
                   Must have same spelling through the tables.
  • description        Descriptive text- no function
  • color        Button's background colour at startup. (or bright 'ON ' colour for a read-only LED button)
                     Can be a standard HTML color, eg teal, indigo etc or a numeric colour:
                       ie:  #RRGGBB   eg #223344 where 0x22 is red level (0x00 - 0xFF)
  •  caption        The caption to be applied to the button at start up.  Must fit the button's width.
                       Try something and then observe. (Lower case letters are MUCH narrower!)
  • bttno        The button's unique, fixed, numeric identifier. See: Button and slider numbering
  • active        Y = button active N = button inactive  S = active + sync (repetitive state update from rig)
                    = sync and 'LED' read-only indicator lamps ( See:  LED buttons )
  • code        3 or  4 upper case characters. This links a button command to its action
                     on the server. It must match the code for the linked record in catcodes.
                   See below for more explanation.
  • vx                V for client to send A or B according to current VFO. (A and B catcodes records)

               X to send X (single non-VFO dependent server record. U no action to server.
               (U = do not participate in buttons state store and retrieve)  See also: vx and abx

  • action        S = single momentary. Button flashes briefly.  Sends von column value.
                   T = toggled. Alternates on/off. Client code highlights it when on and remembers
                                 its current state. Sends von or voff column value.        
                   G = grouped. Is in a group of other G buttons with the same code.
                   Only one of the group is highlighed. Each button in the group sends its data
                   from the nset/nans columns or chset/chans columns- see below.

M = meter button.   R = slider reset button.  U = unused.

  • seton        ON value for an on/off (toggling) button  ie: action = S or T   (usually 1 )
  • setoff        OFF value for an on/off button  ie: action = S or T   (usually 0 )
  • anson        ON value to match a button state command received from the radio.
  • ansoff        OFF value to match a button state command received from the radio.
  • nset        The send value for a button that is in a button group
  • nans        The answer matching value for a button in a group (not always the same as sent)
                   See also end of section 3.7 - button group problem
  • bgsdata        Unused - Icom CIV only ... included to simplify RS232 / CIV compatibility.


The button table fields have to be set to match with the corresponding record(s) in the catcodes table.

piWebCAT's buttons table editor is shown below:


The numeric fields are actually all nine-character string fields and so can accept hexadecimal characters A - F.


Unmatched button conditions
If a button group does not have a button to match all corresponding states on the rig, then an error arises.
My  FTdx101D has fifteen modes. If I only configure buttons for seven, then selecting one of the other eight
on the rig will cause a problem.   This is discussed at the end of section 2.11  Learning guide Transceiver-H-A


Example (FTdx101D)  -   Preamp / IPO  control


The CAT manual gives the command as PA0; to read the main Rx and PA1; to read the sub Rx status.

The set and answer data is PA0u;  or PA1u; where u is a single ascii digit for the data.


The data to send  (or read on startup) is  IPO =  0    Amp 1 = 1    Amp 2 = 2


We have three buttons entries in the buttons table, one for each button.


We have two entries in the catcodes table, one for the Main receiver and and one for the Sub receiver.


All five carry the same code..... I have used PAMP  
                       (This is not internally fixed ... so I could have used PRMP or PREA)


In the buttons table, all three buttons must have action = G  (grouped)

We must set vx = V     See:  vx and abx

This makes the client send to the server the current VFO selection (A or B)
It also make client store the latest VFO A and VFO B settings for application on VFO change.


For each button the data is in the nset and nans  fields and numchar = N
  ie IPO button = 0      Amp1 button = 1    Amp 2 button = 2


When the Amp1 buttons is clicked, with VFO A is selected, the client sends to the server:
         code = PAMP      jobdata = 1       VFO = A

The server code pulls from the database catcodes table the record with:

          code = PAMP     abx = A    


From this record the code picks up  sendmask = PA0u; and sendbytes = 5.


It substitutes the jobdata of 1 for u in the mask and sends the message as PA01;


The table entries are shown below:

There are three buttons records for three groups buttons.

There are two catcodes records for two VFOs  which have different commands


buttons


catcodes



Tx meter buttons

These do not communicate with the server - they select the Tx meter on the client.
action = M    and the code field is fixed as TXME

Clicking the button does not issue a  command to the radio. It records the Tx meter selection
on the client so that the repetitive meter read process reads the correct meter. It also identifies
the group in order to clear the group before highlighting the clicked button.

Meter reading codes are set up in the meter table.
The link to the meter table is the button numbers 61 to 65.   See meter table section