MATLAB: How to check the outputs of the Incremental Shaft Encoder in Simulink
checkoutputsimulink
There is a problem coming in checking the outputs of the incremental shaft encoder in Simulink.
Best Answer
Since you are using blocks from simscape multibody, which have different signals as compared to normal signals of Simulink. You cannot connect signals from two different types with each other directly. You need to add some appropriate blocks to make the signals compatible. See the attached simulink file for the example on how to connect these two signals.
These are few rules which will help you pick the correct blocks.
Simscape signals are different then the normal simulink signals. We need to use converters (PS-Simulink and Simulink-PS blocks) to connect them.
In simscape, there are several libraries. Blocks in each library have special conservative ports and physical signal port. For example, look at this block from simscape electrical . It has two voltage conservative port (marked with small dots), and one physical signal port marked with triangle. The voltage conservative port can only be connected to other blocks in same library (in this case simscape electrical, they cannot be connected with simscape mechanical or even simscape power electronics).
Even for special conservative ports, only output and input can be connected. Input - Input or output - output will not connect.
Since conservative ports are confined within their own library. Only physical signal ports can be connected with the converters mentioned in point 1.
You can also use physical signal ports (marked with triangle) to connect blocks from different simscape libraries. For example, rotational motion sensor for simscape mechanical, and controlled voltage source from simscape electrical can be connected through this. Both these blocks have physical ports. These are use to transfer signals from one library to the other.
You can look at the documentation of the block. Mostly it mentions the type of each port and how it can be connected.
Best Answer