Download Application Software Development via Model Based Design
Transcript
44 more about targeting the design into the Vacon 100 is discussed. There are also some tips for fine-tuning the design into form best suitable for the Vacon 100. 6.5 Code generation and import to IDE Simulink PLC Coder has a very simplified user interface, which allows to do only minor adjustments to the generated code. It is actually very understandable, because the generated code should be in the universal Structured Text form. All the available options are basically for effecting a visual presentation or targeting the code for a specific system. There are no options that effects on how the code is generated and what kind of programming structures are used. The most important thing to do before the code generation is to determine the target IDE software. Even though the ST language is strictly defined, each IDE uses a little bit different implementation syntaxes and structures. For example MULTIPROG requires ‘<br/>’ at the end of each line to create a line change, whereas CoDeSys does not. Targeting the code for a specific IDE shapes the code in a form that can be implemented correctly. The target IDE in this case is Vacon Programming, which is based on MULTIPROG. So we choose the target IDE as KW-Software MULTIPROG 5.0 from the options menu showed in figure 28. The other options of PLC Coder are discussed more in chapter 7.2. The default options offer a basic selection for code generation, but if we want to improve usability we should also take a look at the other options. Figure 28. Choosing the target IDE shapes the code to implementable form. With the target IDE defined and the wanted options selected the design can be now translated into the ST code. There are three choices available in the PLC Coder menu