I have simple model with the following blocks:
1. Hystersis
2. Relay block.
The Hystersis block in the model emulates the Relay block, meaning, the output is set to '1' if the input value is above a specific value and '0' vice-versa. Both the blocks inherit their sample times from the 'Fixed-Step Discrete' solver and have a step size of '0.2'.
Upon updating the model, I expect the outputs of both these blocks on the Scope to be plotted as fixed step discrete. But, this is not the case in my observation. This can be determined in two ways:
– Save Scope output to workspace. The two inputs two the scope block have different plotStyle. This can be verified by executing:
sd.signals.plotStyleans = 0 1
– Update the model using the 'Format->Sample Time Display -> Colors' option. The output lines from both the blocks are black, representing continuous sample time. But, the plot of only the hysteresis block is 'continuous', where as Relay block has a 'discrete' output.
Further, the 'Scope' block is red colored, representing a discrete block, but, its inputs are continuous.
Best Answer