Custom Instrument GUI - Directly Hooking up Signal IO to a Control

Frozen Content

In Manipulating Signal IO through a Script, we will look at how IO signals wired to a Custom Instrument can be manipulated to a greater degree by use of scripting. However, use of a script is not a prerequisite for use of the instrument. Indeed, the controls you place for your customized instrument GUI can be hooked up directly to the instrument's inputs and outputs – wired to the component on the schematic – without ever having to touch code.

The key to this direct connection of IO signal to instrument control object, lies in the use of the control's SignalName property. Each control that is capable of being used to monitor input and/or control output, will have this property as part of its properties list.

The value field for the SignalName property provides a drop-down list of the signal(s) that can be 'hooked up' to the control.


Figure 1. Use the SignalName property to directly link a signal to the instrument control.

Note: The signal(s) listed will depend on the type of control. If it is a display-type control, only input signals will be listed. If it can be used to control output only, then only output signals will be listed. If it can be used to either display or control IO, then all inputs and outputs will be listed.

It is also possible to setup controls on the form to only monitor/control part of a signal. In the value field for the SignalName property, simply select the required signal, then modify the index accordingly. For example, consider an input signal, Data_In[7..0], which is wired to a Custom Instrument on the schematic. On the customized instrument panel, we might want to monitor the individual bits of this signal, using eight Progress Bar controls. Starting with the left-most Progress Bar control, you would simply select each control in turn and set the SignalName property to assign the corresponding signal line of the Data_In[7..0] input. So set Data_In[7] for the leftmost control, then Data_In[6] for the next control, through to Data_In[0] for the right-most control.


Figure 2. Example of 'splitting' a signal over multiple instrument control objects.

You are reporting an issue with the following selected text and/or image within the active document: