Understanding profiles

The profile system is at the very heart of the G3WGV FlexRadio controller. It has two primary functions:
  • To enable any control (switch, encoder or VFO) to be assigned any valid function for that control type, thus making the front panel completely user configurable
  • To enable support for controllers with different numbers of controls with a single executable host program.

Principles of operation

There are three classes of controls: VFOs, Encoders and Switches. All controllers will have at least one VFO and may, additionally have encoders and switches. Any given controller has a physical layout that comprises a set number of controls in each of the three classes. These are known as physical controls.

The software knows nothing about physical controls. It knows about control functions and its job is to present those controls to the radio, so that the radio can be operated via the controller. These software controls are known as logical controls.

The purpose of the profile system is to map physical controls to logical controls.

Physical controls

Physical controls are always in the same physical location on the panel of a given controller design and are numbered from zero. So, for example, the VFO controls are known as VFO0 and VFO1 and for a practical controller we might reasonably decide that VFO0 is on the left and VFO1 is on the right. Wherever you decide to put them, that's where they stay.

The same principle applies to the physical encoders and switches. Some of these, e.g. volume, will have functions that relate to a specific VFO, so it will make sense for them to be physically arranged around the VFO knob. Others are radio-wide.

Logical controls

Logical controls have names that describe their function, e.g. VFO-A volume, VFO-B mute, transmit power, etc. You will note immediately that the name can refer to a logical function, VFO-A, for example. So our mapping system has to map logical VFOs to physical VFOs and then permit other controls to map to that logical mapping. Interesting...!


The Profile file

Let's now take a look at various parts of the profile file. Profile files are simple text files that can be created/edited using Notepad or, more usefully, by the Profile Manager.

You can download a complete profile file. What follows is extracts from that file, with explanations.

VFO profiles


Here we define the VFOs for our controller and map them to logical VFOs. This is the definition for VFO-A on my home station:

VFO          0        Physical VFO 0
Exists       Yes      The VFO exists
Designation  A        Maps physical VFO 0 to logical VFO-A
OwnEncoder   Yes      VFO has its own encoder
Name         VFO-A    Descriptive name for the VFO
SliceNo      0        VFO uses Slice 0 on the Flex radio
TuneRate     2        Default tuning rate for this VFO
Top          150      Note 5
Left         50       Note 5
Colour       clYellow VFO display colour
/VFO                  End of VFO 0 profile

Notes:
  1. If OwnEncoder is set to No then this indicates that the VFO shares its encoder with another VFO. This permits configurations with a single VFO knob that can be switched between two VFOs. At least one of the VFOs must be set to OwnEncoder Yes.
  2. The designation parameter is the way that the software maps or connects the physical VFO to its logical control. 
  3. Name can be anything we like, within reason. It's just there to display the VFO identification to the operator.
  4. TuneRate sets the rate at which the encoder sends steps to the Host controller. It is effectively a divider, with possible values of 1, 2, 4 or 8. On a 400 step encoder, a setting of 2 means that 200 steps are sent per encoder revolution. The value can be changed by the operator.
  5. Top and Left are not used by the Flex Controller. They are there to tell the Profile Manager where to position the physical controls.
  6. Colour is used to set the colour for various aspects of the display for this VFO.
A similar set of parameters exists for VFO 1, which is, to us, VFO-B. It uses slice 1. You can probably already see that if we wanted to swap the VFOs over, it's simply a matter of designating VFO 0 as B and VFO 1 as A.


Switch profiles

We can typically define 16 or 32 switches and these are numbered from 0. Each physical switch can have one and only one function assigned to it.

Switch       3          Physical switch number 3
Exists       Yes        The switch exists
Enabled      Yes        Switch is enabled in this profile
Name         VFOA-Lock  Descriptive name for the switch
Function     swVFOALock Maps switch to the VFO-A lock function
Type         Switch     Note 2
Top          20
Left         200
/Switch


Notes:
  1. Function names are defined in the Controller software.
  2. There are two possible types: Switch and Encoder. Switch means that this is a stand-alone pushbutton switch. Encoder means that it is a switch on an encoder.

Control profiles

More correctly, "rotary controls". There are numerous possible rotary controls, such as volume, filter width, etc. Each control has various parameters that are defined in this section. It is important to understand that this section is defining the characteristics of the controls, not a particular physical control.

Control      0            Control 0 definition
Enabled      Yes          The control is enabled
Name         Volume-A     Name for the control
Function     SetAudioGain Maps control to the audio gain function
VFONo        0            Sets audio gain for physical VFO 0
MaxValue     100.00       Maximum value
MinValue     0.00         Minimum value
StepValue    1.00         Amount value is changed per step
Unit         %            Units used to describe value
/Control

Notes:
  1. Function names are defined in the Controller software.
  2. VFONo can have various values: 0 or 1 are the respective physical VFO to which this control belongs; 100 means that the control belongs to whichever VFO is currently selected; -1 means that this control is not VFO specific, e.g. Power, break-in delay, etc.

Encoder profiles

This section defines the physical rotary encoders and maps them the the control functions defined above. Each encoder can have up to four control functions assigned.

Encoder      0        Physical encoder 0
Exists       Yes      Encoder exists in this profile
HasSwitch    Yes      Encoder incorporates a pushbutton switch
SwitchNo     10       Switch is physical switch 10
Shift0Fn     Volume-A Primary control function: VFO-A volume
Shift1Fn     Pan-A    Secondary function
Shift2Fn     Width-A  Note 2
Shift3Fn     Shift-A
Top          310
Left         20
/Encoder


Notes:
  1. The function names defined in the ShiftnFn parameters are the names of the associated controls. The Shift0Fn is Volume-A and by referring back to the Controls section above, you can see that control name's definition and its characteristics.
  2. The encoder pushbutton switches between the Shift0Fn and Shift1Fn functions. An optional separate switch permits the selection of a second set of functions, Shift2Fn and Shift3Fn.

Summary

The concept of profiles can be confusing but I hope I have provided at least some insight into how they work.

It is entirely possible to write profile files by hand, using an ordinary text editor such as Notepad and, indeed, that is how I started off doing it. In practice this is prone to all sorts of difficult to find errors so I soon came up with the idea of a Profile Manager that lets the user select the various physical controls and set the relationships between them and the logical controls.

No comments:

Post a comment