To test the system, an elevator door open-close cycle is constructed. A typical cycle is to open for 1.2s followed with a close command. An open command means the desired door displacement is 21 inches, while the close command implies that the desired door displacement is zero inches.
Using a ramp block to access the current value of simulated time (t) and using if-then-else logic with a merge block, you can implement the open/close cycle as shown below.
After connecting all the subsystems and assigning variables for monitoring (control_voltage, motor_current and reaction_torque), the system is complete.