Docsity

Function Block Diagram-Digital Logic Design And Programming-Lecture Slides, Slides of Digital Logic Design and Programming

Toggle sidebar
bg1
Function Block Diagram
The flexibility of custom block creation is enhanced
by the fact that the user can build custom blocks
using ladder diagrams or any of the other IEC 1131-3
languages (IL and ST).
Also, custom blocks can be used in conjunction with
other standard or vendor-specified function blocks.
This allows the programmer to create very powerful
function blocks that can be integrated into any ladder
diagram or function block diagram.
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Function Block Diagram-Digital Logic Design And Programming-Lecture Slides and more Slides Digital Logic Design and Programming in PDF only on Docsity!

Function Block Diagram^ ^ The flexibility of custom block creation is enhancedby the fact that the user can build custom blocksusing ladder diagrams or any of the other IEC 1131-3languages (IL and ST).^ ^ Also, custom blocks can be used in conjunction withother standard or vendor-specified function blocks.^ ^ This allows the programmer to create very powerfulfunction blocks that can be integrated into any ladderdiagram or function block diagram.

Instruction List (IL)^ ^ Instruction

list^ (IL)

is^ a^ low-level

language

similar^

to^ the

machine or assembly language used with microprocessors.  This type of language is useful for small applications, as well asapplications that require speed optimization of the program or aspecific routine in the program.  IL can be used to create custom function blocks.  A typical application of IL might involve the initialization to zero(i.e., reset) of the accumulated value registers for all the timersin a control program.  Each line

of code of IL can be divided into four fields: label, operator, operand, and comment.

Program Description^ ^ TMR1 AR is the address of thefirst^

timer’s^ accumulatedregister. ^ In^ the^

FBD,^ this^

address^ is known as Timer_AR_1 so thatthe IL program can interpretit.  The result of the IL programwill be that the values in thespecified^

accumulated registers will be reset to 0.  The variable Reset_Timer willtrigger the block and start theIL instruction.  The IL routine will cycle backto^ start^ while

the^ block

is enabled^ by

the^ Reset_Timer variable being ON.  There are also ways to “pulse”just once through the programso^ that^ the

instruction

is executed^ only

one^ time,

if enabled.

Structured Text (ST)^ ^ Structured

text^ (ST)

is^ a^ high-level

language

that^ allows

structured programming, meaning that many complex tasks canbe broken down into smaller ones.  ST^ resembles

a^ BASIC-

or^ PASCAL-type

computer

language,

which uses subroutines to perform different parts of the controlfunction^

and^ passes

parameters

and^ values

between

the

different sections of the program.  Like^ LD,^

FBD,^ and

IL,^ the^

structured

text^ language

utilizes

variable definitions to identify input and output field devices andany^ other

internally

created variables

that^ are

used^ in

the

program.  ST^ also supports

iterations,

such^

as^ WHILE...DO

and

REPEAT...UNTIL, as well as other conditional executions, suchas IF...THEN...ELSE.

Structured Text (ST)^ ^ Example, an ST instruction such as FORCEVariable_One would force Variable_One to beON^

regardless

of^ any

other

conditions,

as

long as Variable_One is Boolean.  If^ the^

variable

was^

analog,

the^ instruction

may^ be

FORCE

Variable_One

=^ 5000;

in

which case, the value of the analog variablewould be set to 5000 during the forcing.

Example of Basic LikeComputer Program

Structured Text (ST)^ ^ Structured

text^

programming

is^ particularly

suited to applications involving data handling,computational

sorting,

and

intensive

mathematical

applications

utilizing

floating-

point values.  ST is also the best language for implementingartificial intelligence (AI) computations, fuzzylogic, and decision making.

Sequential Function Charts(SFC)^ ^ Graphical “language” that provides a diagrammaticrepresentation of control sequences in a program.^ ^ Basically, sequential function chart is a flowchart-likeframework

that^ can

organize

the^ subprograms

or

subroutines (programmed in LD, FBD, IL, and/or ST)that form the control program.  SFC^ is^

particularly

useful

for^ sequential

control

operations, where a program flows from one step toanother once a condition has been satisfied (TRUE orFALSE).

Sequential Function Charts(SFC)^ ^ When the control program receives an input, it willexecute each of these steps starting with step 1.^ ^ Each step may or may not have an action associatedwith it.^ ^ An action is a set of control instructions promptingthe PLC to execute a certain control function duringthat step.^ ^ An action may be programmed using any one of thefour IEC 1131-3 languages.^ ^ After the PLC executes a step/action, it must receivea transition before it will proceed to the next step.

Sequential Function Chart of aTypical Mixing Process  A^ transition

can

take the form ofa^ Variable input,a^ result

of^

a

previous

action,

or^ a^

conditional

IF^

statement

(e.g.,^

IF

Temp_

Sequential Function Charts(SFC)^ ^ The sequential function chart language has its originin^ the

French

standard

Grafcet,

a^ flowchart-like

programming language.  The^ Grafcet

graphic

language

also^

uses^ steps,

transitions, and actions, which operate in the samemanner as in SFC.  In Grafcet, when a step is active, the processor scansthe I/O logic and program pertinent to the step’saction,^

as^ well

as^ the

logic^

for^ the

transition

immediately

after^

it^ (i.e.,

the^

transition

that

deactivates the step and action).

Sequential Function Charts(SFC)  Like^

Grafcet,

SFC is similarto a flowchartin^ the

way

control

is

passed

from

one^

step^

to

another