Custom Instrument Enhancements
Custom Instruments have been enhanced in the Winter 09 release of Altium Designer, mainly in support of the standalone Altium Instrument Dashboard – new for the Winter 09 release.
When configuring a Custom Instrument, you will find new options available on the Signals tab of the Custom Instrument Configuration dialog, as illustrated in Figure 1.
Instrument Display
You can specify how the instrument's customized GUI will display at runtime. Choose from:
- Standard Rack Panel – the GUI will appear as part of the Instrument Rack - Soft Devices panel (when opened from Altium Designer's Devices view), or as part of the Dashboard Instrument Rack panel (when opened using the Altium Instrument Dashboard).
- Custom Panel – the GUI will appear in its own, standalone panel.
Dashboard-Specific Options
Each Custom Instrument can be given an Instrument ID as part of its configuration. This ID can be used as part of a script associated to one Custom Instrument, for calling (to display) another Custom Instrument.
When the Altium Instrument Dashboard initially opens, you can specify whether a detected Custom Instrument also gets displayed or not. Use the Show On Startup option accordingly. If you want to control the display of an instrument from another Custom Instrument GUI, this option would typically be disabled for the instrument that is to be 'called'.
Script Support for Controlling Instrument Display
A new function is available for use in your Custom Instrument scripts, that allows you to control the display of one Custom Instrument from another. The function uses the ID assigned to an instrument to target that instrument. For example, the event handling script to cause an instrument panel to display when a button is clicked would be:
procedure TDesignedAreaPanel.InstrumentButton1Click(Sender: TObject);
begin
InstrumentAction(2, iaShow);
end;
In this case, the Custom Instrument assigned the ID of 2 will be displayed when the button in the Custom Instrument to which this script is used, is clicked.
Conversely, the current, or another Custom Instrument could be 'closed' by using the following event handling script:
procedure TDesignedAreaPanel.InstrumentButton1Click(Sender: TObject);
begin
InstrumentAction(3, iaHide);
end;
In this case, the Custom Instrument with ID 3 will be closed upon clicking the button to which the script is associated.
Interface Type
You can now choose the type of interface for your custom instrument, using the Interface Type field, located in the Interface region of the tab.
Choose from:
- Parallel – one pin per defined IO signal will be added to the instrument's symbol.
- Wishbone – a standard set of Wishbone interface pins will be added to the instrument's symbol.
For a Wishbone interface, the presence of DAT_I
and DAT_O
lines, and their width, will be calculated automatically, depending on the existence of defined inputs and outputs respectively and the maximum signal width defined. For example, if the maximum signal width of defined IO signals is 17 bits, then DAT_I
and/or DAT_O
lines with a width of 32 bits will be added.
The presence and width of the ADR_I
line will depend on how many inputs and/or outputs are defined. For a single input and/or output, there will be no ADR_I
line. If a second input and/or output is added, an ADR_I
line will be added to the interface, with a width of 1 bit, and so on.