Simulator Assistant
- Updated2023-02-21
- 4 minute(s) read
Owning Palette: Simulator VIs
Requires: Robotics Module
Controls a robotics simulator and interacts with robot components. You can specify the sensors and actuators of a robot that you want to control in a simulation environment. The sensors and actuators you specify display as block diagram inputs and outputs.
You also can programmatically write VIs to control a simulation.
(Control Design and Simulation Module) By default, the Control Design and Simulation Module executes VIs and Express VIs as continuous functions. When you use the Simulator Assistant inside a Control & Simulation loop, you must execute the Simulator Assistant as a discrete function to ensure the Simulator Assistant and Control & Simulation loop are synchronized. Right-click the Simulator Assistant and select SubVI Node Setup from the shortcut menu to display the SubVI Node Setup dialog box. Select Discrete and configure the Discrete timing options to synchronize the Simulator Assistant and Control & Simulation loop.
![]() | Note The Discrete timing options in the SubVI Node Setup dialog box specify timing in seconds. The Simulator Assistant dialog box options specify timing in milliseconds. |
Right-click the Simulator Assistant and select Convert to SubVI to convert the Simulator Assistant to a subVI that contains the Simulator VIs used in the simulation.
![]() | Caution You cannot revert the subVI you convert from the Simulator Assistant back to the Simulator Assistant. |
Dialog Box Options |
Block Diagram Inputs |
Block Diagram Outputs |
Dialog Box Options
Parameter | Description |
---|---|
Overview | Specifies the robotics simulator you want to control.
|
Sensor | Lists the available sensors and selected sensors.
|
Actuator | Lists the available actuators and selected actuators.
|
Properties | Displays the properties of a sensor or actuator you select on the Sensor page or Actuator page, respectively. Click a property or its value in the Properties table to modify that value. When you manipulate a component in the Simulation View, LabVIEW automatically updates corresponding values in the Properties table. This table expresses values in SI units and SI-derived units. |
Simulation View | Displays the simulation scene. |
Device API Preview | Displays documentation about the sensor or actuator you select in the Sensor or Actuator page. The documentation corresponds to a VI on the Simulator palette. |
Block Diagram Inputs
Parameter | Description |
---|---|
Stop | Stops the robotics simulator from running the current simulation instance. |
sensorID.robotID.input | Specifies the data parameter of the sensor you specify in Selected sensors, where sensorID is the name of the sensor and robotID is the name of the robot. The name of the sensor and robot is in the Properties table on the Sensor page. The data parameter corresponds to Data API in the Properties table on the Sensor page. If Data API has more than one parameter, this input is a cluster of all the parameters. |
actuatorID.robotID.input | Specifies the data parameter of the actuator you specify in Selected actuators, where actuatorID is the name of the actuator and robotID is the name of the robot. The name of the actuator and robot is in the Properties table on the Actuator page. The data parameter corresponds to Data API in the Properties table on the Actuator page. If Data API has more than one parameter, this input is a cluster of all the parameters. |
3D picture refnum | Specifies a reference to a 3D picture control in which you want to display the simulation. You can wire a reference to a 3D picture control to this input to display the simulation scene on an existing front panel. By default, the simulator displays the simulation in a new window. |
error in | Describes error conditions that occur before this node runs. |
Block Diagram Outputs
Parameter | Description |
---|---|
sensorID.robotID.output | Returns the data parameter of the sensor you specify in Selected sensors, where sensorID is the name of the sensor and robotID is the name of the robot. The name of the sensor and robot is in the Properties table on the Sensor page. The data parameter corresponds to Data API in the Properties table on the Sensor page. If Data API has more than one parameter, this output is a cluster of all the parameters. |
actuatorID.robotID.output | Returns the data parameter of the actuator you specify in Selected actuators, where actuatorID is the name of the actuator and robotID is the name of the robot. The name of the actuator and robot is in the Properties table on the Actuator page. The data parameter corresponds to Data API in the Properties table on the Actuator page. If Data API has more than one parameter, this output is a cluster of all the parameters. |
Done | Stops the simulation instance. |
error out | Contains error information. This output provides standard error out functionality. |
Example
Refer to the InvertPendulum.lvproj in the labview\examples\robotics\Simulator\InvertPendulum directory for an example of using the Simulator Assistant.