Simulation Mode

The main purpose of using simulation mode is to create a application without having your physical hardware connected, for this the following tasks are required:

  • Enable simulation mode in config.json
  • Set simulation parameters inside linking.json
  • Add simulated ECAT-devices inside ECAT-Tool
  • Link simulated ECAT-device parameters to motorcortex parameters

The next steps will explain you in detail how to set up your application in simulation mode:

  1. Inside config.json, set system mode to Simulation.

  2. In simulation mode, linking with systemMode: "Simulation", and "All", are applied and can be adjusted in the xxx.link.json.

  3. In the Domain Configuration Panel you can enable the Simulation switch, but this is not necessary because the system is in Simulation mode. Simulation of a domain is only required in production mode, for example if you want to simulate one or multiple etherCAT devices.

    image not found
  4. Each domain can contain multiple etherCAT devices. In order to simulate the device PDO’s, you have to assign a simulation link to each simulated etherCAT device, so motorcortex knows that the device is included to the simulator. The Link Simulation should be assigned to the following path: root/DriveLogic/driveSimulation.

    image not found
  5. EtherCAT devices contain rxPDO and txPDO parameters that can be linked to a path, for simulation use: root/Simulator/.... For example target position should be linked to root/Simulator/targetPosition, channel 0 because this is linked to the first axis.

    image not found

    Press to open property menu and enable simulation switch the turns blue, this means that the link is only used if the system is in simulation mode!

  6. Step 5 can also be used for all root/Simulator/... parameters:

PDOmapping: Description: Link to Motorcortex Parameter:
rxPDO
0x607A Target Position root/Simulator/targetPosition
0x60B2 Target Offset root/Simulator/targetTorqueOffset
0x6071 Target Torque root/Simulator/targetTorque
txPDO
0x6064 Position Actual Value root/Simulator/positionValue
0x6077 Torque Actual Value root/Simulator/torqueValue

For parameters in an array like root/Simulator/targetPosition you need to define the index, starting at 0 till 5, respectively for axis 1 till 6.

After linking the PDO entries you are able to run the application in simulation mode.