Controlling a DC Motor with an Encoder
From Mech
Jump to navigationJump to searchThe printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Controlling a brushed DC motor with an encoder is very common and serves as a good example of the basic programming of xPC models. Below you will find the xPC model code for controlling a DC motor, like the Maxon 6W motor in the lab.
Here is the code: xPC PID Example.mdl