This article describes the use of Software-in-the-loop (SIL) and Robot Operating System (ROS) as tools for controller implementation and simulation of discrete-time plants is exposed. For experimental validation a magnetic levitation plant is used, this is modeled using Lagrange obtaining a nonlinear model which is linearized. Thus this model is discretized using a Tustin transformation for subsequent implementation of the control loop. Feedback state variable is implemented as control strategy for experimental validation on a system (Raspberry-Pi / fit-PC, Matlab / PC). We chose to use ROS as it is available for computers running operating systems based on Linux, as used in various embedded systems commercially available com the Fit-PC, Beagle-Board and Raspberry-Pi, ROS occupies low disk space (basic installation), programming is done in C ++ allowing more thorough use of the hardware. For testing three modules (node) implemented; "Reference_node" which is responsible for requesting the user to the desired position and transmit it to the next node, "control_node" is responsible for carrying out checks, which receives as inputs the reference (desired position) and the output of the plant (position current), and which outputs the control signal (u), finally "plant_node" is the node that simulates the behavior of the plant.