16.2
Structured Text Program Example
A new Function Block will be constructed to perform a simple “Centigrade to Fahrenheit” conver-
sion similar to that used in a previous example, in order to illustrate the use of the ‘Structured
Text’ language editor.
The formula used is as follows:
Fahrenheit
Celsius
=
´ +
9
5
32
The input and result variables will be in Floating Point (REAL) format.
NOTE
For the FX range of PLCs, floating point calculation is only possible with the main units of the
FX
2N
, FX2
NC
, FX
3G
, FX
3U
, and FX
3UC
series.
햲
Create a new project called "Structured_Text".
햳
Create a new POU named "Fahrenheit", of Class:
FUN
, Result Type:
REAL
, with a lan-
guage of “ST” (
Structured Text
):
햴
Create an entry in the header (LVL) of the Function “Fahrenheit”:
햵
Open the Body of the Function “Fahrenheit” and enter the following simple ST program:
Fahrenheit := (Centigrade*9.0/5.0+32.0);
Structured Text Program Example
IEC Structured Text
16 - 2
MITSUBISHI ELECTRIC
햶
Create a new POU with a name “Temp_Conv”,
Class:
PRG
, Language:
Function Block Diagram
Содержание FX2N-32CAN
Страница 1: ...MITSUBISHI ELECTRIC FACTORY AUTOMATION Programmable Logic Controllers GX IEC Developer ...
Страница 2: ......
Страница 4: ......
Страница 6: ......
Страница 10: ...IV MITSUBISHI ELECTRIC ...
Страница 18: ...Modular PLC Training Hardware Course Overview and Requirements 1 2 MITSUBISHI ELECTRIC ...
Страница 172: ...Monitoring Instances of Function Blocks Advanced Monitoring Functions 7 12 MITSUBISHI ELECTRIC ...
Страница 176: ...Device Edit 8 4 MITSUBISHI ELECTRIC ...
Страница 190: ...Assigning DUT Variables to Function Blocks Data Unit Types DUT 10 10 MITSUBISHI ELECTRIC ...
Страница 198: ...Array Example Single Dimension Array Arrays 11 8 MITSUBISHI ELECTRIC ...
Страница 219: ...Sequential Function Chart SFC SFC Elements Training Manual GX IEC Developer 14 3 ...
Страница 220: ...14 3 SFC configuration examples SFC configuration examples Sequential Function Chart SFC 14 4 MITSUBISHI ELECTRIC ...
Страница 230: ...Structured Text Program Example IEC Structured Text 16 4 MITSUBISHI ELECTRIC ...
Страница 248: ...Configuring GX IEC Developer to access the PLC on Ethernet Ethernet Communications 18 10 MITSUBISHI ELECTRIC ...
Страница 278: ...PLC Components Glossary Appendix A 18 MITSUBISHI ELECTRIC ...
Страница 283: ......