The Guided Harness tool automatically identifies inputs, outputs, and methods that can be used as ports on a VMC Transform. It also provides a dialog for selecting ports to use and specifying their properties.
To start a new project using a VMC, see Using VMCs.
Click the Guided Harness verb in the VMC's properties.

If you are working with a previously harnessed or partially harnessed project, the Signal Info Not Found dialog may be displayed. If it is not displayed, proceed to the Select Signals dialog. The dialog opens when a port name is different from the associated variable in the C++ code.
 Signal Info Not Found Dialog
For example, if this function is included in one of the AppIF files:
MxVRegisterPortDiscrete("L_front_door_ajar", PortDataFlowInput, &DigIN, 0, B01_BITS, mxFalse, 0, 1, 0);
The dialog is displayed because the port name (L_rear_door_ajar) is different from the variable name (DigIN).
Use the dialog to associate the port name with the variable name. Select the variable name from the Available pane, and the port name from the Unassigned Signals pane. Then click the add button.
Note: For Boolean Signals such as L_front_door_ajar, the Start Bit and Bit Count properties must be set in the Select Signals dialog. The start bit (0) is the fourth argument in the MxVRegisterPortDiscrete function. The Bit Count (B01_BITS or 8) is the fifth argument.
When all needed Signals have been associated with a variable, click OK to proceed to the Select Signals dialog.
|
To add a port, select it in the Available list, and click Add. To remove a port, select it in the Selected list and click Remove.
 Select Signals Dialog
You can use the Edit AppIF Includes button to ensure that all required appif files are included and to add any missing files. See Prerequisites.
Setting Properties
The following properties must be specified for all Signals:
Name - The name of the Signal. By default, this is the name of the variable or task in the C code.
In/Out - The direction of the port, input or output.
Type - The type of the port. These options correspond to Signal Classifications: Discrete, Continuous, and TaskInfo (Event)
 Click to expand.
The following properties must be specified for discrete Signals:
Init - The initial value of the port.
Min - The minimum value of the port.
Max - The maximum value of the port.
Enumeration - Select the Enum set (if any) associated with this Signal. To create or edit an Enum set, click the Edit Enumerations button. For more information, see Working with Enums.
Start Bit - The bit offset within the variable.
Bit Count - The bit width of the variable. This must be 8. 16, 32, or 64.
To see the name of the variable, scroll the Select pane horizontally to see the Path Column:
 Select Signals Dialog showing Path Column
|

The following properties must be specified for continuous Signals:
Init - The initial value of the port.
Min - The minimum value of the port.
Max - The maximum value of the port.
Generate Declaration - Select this checkbox if none of the appif files contain a declaration for the variable being harnessed. Usually this occurs when a variable is declared in a C file, but not declared in a header. Best practice is to declare all globals in a header file.
|

The following properties must be specified for task (event) Signals:
Mode - Controls how the task is called (ticked): Call From Test Case (using a Task Signal) or Call Automatically. If Call Automatically is selected, you must specify an AutoTick Rate.
AutoTick Rate - Specify how often the task is called in milliseconds.
Note that in the Available pane, task Signals are listed under the Functions node.
|
|
|
In case of problems, see Troubleshooting Guided Harnessing.
Related Topics:
Using VMCs
Troubleshooting Guided Harnessing
Converting an Existing VMC Project
Port Registration