Preparing IP Communication with Client

Before we start IPC with BondSim as a client we must load it and open the corresponding project we wish to visualize by the server. To illustrate this we use Puma 560 project, which we can find among the BondSim library projects. We right-click the project and copy it into the model workspace. It represents a model of Puma 560 robot arm in the control loop. More details you may find in the book shown at the top of the page.

Bond Graph model of Puma 560 control loop
Bond Graph model of Puma 560 control loop


The system level model the figure above shows the Puma 560 project, which consists of the following main components: Manipulator, which represents the Puma 560 robot arm, Workspace, which models the space in which robot works, and finally the Input and Controller, which drive the robot in the feedback control loop.

The model of Manipulator consists of two main components: Arm and Wrist (see the figure below on the left). Model of the Arm is shown in the figure on the right. The Arm and Wrist consist of three joints and links each and correspond to Device command in Puma 560 script (see Generating Virtual 3D Scene).

Model of Manipulator  & Model of Arm
Model of Manipulator  & Model of Arm

The important role plays IPC pipe component represented in the system level model of the robot (see the figure at the top) as a red ring (a pipe). This component was created by dragging and dropping the corresponding tool from Editing Tools, Continuous Signal Components. It serves to collect the signals (the joint angles in degrees) at the input and sent them to the server during the simulation run; it also distributes the signals received from the server (e.g. the coordinates of the robot tip). The order of the signal values that are sent must corresponds to the order of the joints in Device command in the script (counting from the robot base to its tip). By clicking the input ports a dialog opens, which show these signal (see the figure below). The same holds for the signals received. 

IPC pipe component dialog
PipeOutputVariablesWe must build the model first. After this operation was successfully completed to start the communication with the server we must connect to it by selecting Connect IPC Socket command in Simulation menu. If the command is accepted we can start the simulation and both side of pipe are active - simulation and visualization. For more details refer please to the book.