2.2. Designing the Control Algorithm You build a model for the Controller and controlled system using the Simulink. The code is created for the Controller by the Simulink PLC Coder. Therefore, you need to build the model using a block supported by the Simulink PLC Coder. Additional Information Access the website of The MathWorks Inc. or refer to the Simulink User Guide that Access the website of The MathWorks Inc. or refer to the Simulink PLC Coder is provided by The MathWorks Inc. for how to use the Simulink. User’s Guide that is provided by The MathWorks Inc. for the blocks supported by the Simulink PLC Coder. controls the position and a Servo Drive controls the velocity.
This Guide gives an example for designing the control algorithm so that an NJ-series CPU Unit In the Sample File No. 1 PLCCoderDemoMC.mdl that is provided separately, a model is created for the Controller (Controller block) and controlled system (ControlledSystem block) by the Simulink as shown in the following figure. The sampling time of the Controller is set to 1 ms in the sample. Additional Information Set the sampling time of the Controller so that it matches the task period of the Sysmac Studio. (Primary periodic task period on the Sysmac Studio: 500 μs, 1 ms, 2 ms, or 4 ms) 19