# Motion ## Internal DS402 Simulation The EC-Simulator SiL includes an internal DS402 state machine simulation with actual position emulation. Axis movement is implemented by mapping Target position (0x607A) directly to Position actual value (0x6064) in CSP mode, and Target velocity (0x60FF) directly to Velocity actual value (0x606C) in CSV mode. To enable the internal DS402 simulation the application name of the simulated SubDevice must be set to “DS402” in the EXI file exported by EC-Engineer: ![EC-Engineer EXI file editor showing a simulated SubDevice with the application name set to DS402 to enable motion with the internal DS402 state machine simulation](../Media/DS402Exi.png) ## EcSimulatorSilDemoMotion For basic functionality it suffices to use the internal DS402 Simulation as demonstrated with EcSimulatorSilDemo and an EXI file with the application name of the simulated SubDevice set to “DS402”. It is also possible to implement the motion simulation in the application which needs more source code changes. The EcSimulatorSilDemoMotion is an extension of the EcSimulatorSilDemo that shows how to integrate the DS402 simulation into the EC-Simulator application. It handles the following additional tasks: - Simulating CiA402 capabilities of SubDevices The EcSimulatorSilDemoMotion is available “out of the box” for different operating systems. #### SEE ALSO [EcSimulatorSilDemo](software-integration.html.md#ecsimulatorsildemo) There is also support for multiple axes. ## Command line parameters EcSimulatorSilDemoMotion supports all parameters supported by [EcSimulatorSilDemo](software-integration.html.md#ecsimulatorsildemo) . The following additional parameters are supported: - “-ds402 ”: Simulate CiA402 capability of SubDevices. SubDevices are passed as comma separated list of fixed SubDevice addresses to simulate. The Demo uses the following files in addition to the files used by [EcSimulatorSilDemo](software-integration.html.md#ecsimulatorsildemo): - `Examples/Common/EcSimulatorDs402.h`: Simulation of CiA402 capabilities using SubDevice application’s callback functions, see [`esSetSlaveSscApplication()`](api_general.html.md#_CPPv424esSetSlaveSscApplication10EC_T_DWORD9EC_T_WORDP24EC_T_SLAVE_SSC_APPL_DESC) .