Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
(EOD).Mechatronics.pdf
Скачиваний:
82
Добавлен:
23.08.2013
Размер:
5.07 Mб
Скачать

page 478

25. PLC PROGRAMMING

25.1 PROGRAMMING STANDARDS

25.1.1 IEC 1131

The IEC 1131 standard is an effort towards standardizing PLC oriented control. This is more necessary now that personal computers and software are starting to open the PLC market.

These standards were not designed to force a rigid style, so the different PLC vendors will still have programming environments that vary, but the conceptual elements will be consistent.

The most notable differences between implementation of PLCs will be addresses of outputs, inputs, internal memory, etc.

There are a few components to the standard,

IEC 1131-3 Data types and programming

IEC 1131-5 Communications

IEC 1131-7 Fuzzy control

• IEC 1131-3 defines the basic programming languages,

IL (Instruction List) - This is effectively mnemonic programming ST (Structured Text) - A BASIC like programming language

LD (Ladder Diagram ) - Relay logic diagram based programming

FBD (Function Block Diagram) - A graphical dataflow programming method SFC (Sequential Function Charts) - A graphical method for structuring programs

Many of the functions described in this note set support the standard.

The standard also defines data types,

page 479

Name

Type

Bits

Range

BOOL

boolean

1

0 to 1

SINT

short integer

8

-128 to 127

INT

integer

16

-32768 to 32767

DINT

double integer

32

-2.1e-9 to 2.1e9

LINT

long integer

64

-9.2e19 to 9.2e19

USINT

unsigned short integer

8

0 to 255

UINT

unsigned integer

16

0 to 65536

UDINT

unsigned double integer

32

0 to 4.3e9

ULINT

unsigned long integer

64

0 to 1.8e20

REAL

real numbers

32

 

LREAL

long reals

64

 

TIME

duration

not fixed

not fixed

DATE

date

not fixed

not fixed

TIME_OF_DAY, TOD

time

not fixed

not fixed

DATE_AND_TIME, DT

date and time

not fixed

not fixed

STRING

string

variable

variable

BYTE

8 bits

8

NA

WORD

16 bits

16

NA

DWORD

32 bits

32

NA

LWORD

64 bits

64

NA

25.1.2 The Future of Open Architecture Controllers

a PLC is not simply a computer. It contains a computer, with special interfacing abilities. But the programming environment is like the Java Virtual Machine. The programs are interpreted within the ladder logic model. Some features are not available, while others are enhanced.

Each PLC vendor has developed one or more different PLC models that bare some similarity at the level of basic inputs and outputs. To unite these models there has been recent work to develop a common standard so that all PLCs are similar (IEC 1131) but this is not to the point where it will free the user from a single vendor.

At the present time inputs and outputs are becoming more flexible, but the central computation controller (PLC CPU) is still vendor specific. Consider that you can write a program in Java that will compile on dozens of java compilers.

There are two possible directions that this might go,

-some third party companies are developing products that are based on other companies

Соседние файлы в предмете Электротехника