Gap All PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 139

Graphical Application Programmer

GAP TM

Objective: Demonstrate an
understanding of the GAP

Slide 1
Woodward Governor Company
Copyright

This Training Guide is only intended to be used as a training aid to support courses
offered by the Woodward Governor Company’s Educational Services Department.
The Information contained within pertains only to the general operation and service
of Woodward Governor Company products. The information in this guide is not
complete or specific to meet the requirements necessary to operate or service a
Woodward Governor Company product. Please consult the specific Product Manual
to find complete information on operation, service, and safety information for your
Woodward control.

No part of this guide may be used or reproduced in any form or by any means,
electronic or mechanical, including photocopying, recording or by any information
storage retrieval system. No one may teach this material, in whole or in part, in
formal or informal training environments, whether for fee, salary, or gratis, without
either having received a technical certification or otherwise obtaining special
express written permission from Woodward Governor Company.

Woodward Governor Company expressly disclaims any and all damages of any type
which may occur or result from the improper use of this Training Guide.

Slide
i 2
Introduction

GAP™ is a Windows™ based, high level,


block-oriented programming language.
GAP Blocks are proven pieces of
software.
You don’t have to be computer
programmer to program in GAP.

Slide 3
History
WGSPL (Woodward Governor
Sequencer Programming
Language) - 1981
MOE (Menu Oriented Editor) - 1984
Ladder Logic - 1991
ABLS (Application Block Language
Software) - 1991
GAP (Graphical Application
Programmer) - 1993

Slide 4
GAP Features
The GAP program has sophisticated
algorithms and timing control that have
been rigorously proven at Woodward.
Many blocks have been in service since
1984.
Documentation is created along with
the application programming.

Slide 5
Sample of GAP Block
Category Name

Block Name

Output Fields
Input Fields

Rate Group
Block Type

Field Name: LMT.SS_FAILED.DELAY


CATEGORY.BLOCK_NAME.FIELD

Slide 6
Sample of GAP Block
Category Name
Block Name

Output Fields
Input Fields

Nets

Rate Group

Block Type

Slide 7
Block Connections

Nets Connect GAP Blocks On The Same


Page
Variables Are Passed From The Output Fields
To The Input Fields.
Slide 8
Block Connections

Text Symbols on different pages


A Text Symbol is used on the input or output
of a block when a net cannot be drawn.

Slide 9
Tunable / Fixed Inputs
Any analog or discrete input can be
made fixed or variable (tunable).
By putting an asterisk (*) in front of the
tunable will allow the user to tune that
input.
Examples:
*TRUE (Can be adjusted to FALSE)
*10.0 ( -20, 100) (Can be adjusted in
the range of -20 to +100)

Slide 10
Tunable / Fixed Inputs

Tunable True/False

Fixed 2.0

Tunable 10.0
Min = 2.0
Max = 100.0

Slide 11
Rate Groups

Guaranteed “Sample Rate” For The


GAP Block
Millisecond Units
No Faster / No Slower
Each Rate Group:
Looks At Inputs
Processes Them
Rate Group Updates Outputs
Rate Groups can be:
5 mSec
10 mSec
20 mSec
40 mSec.
80 mSec
Slide 12
160 mSec.
Rate Group Timing

10 mSec 10 mSec 10 mSec 10 mSec 10 mSec 10 mSec 10 mSec 10 mSec 10 mSec 10 mSec 10 mSec

10 mSec Rate Group

20 mSec Rate Group

40 mSec Rate Group

80 mSec Rate Group

Free Run

Slide 13
Rate Group Execution Order

Rate group execution order is from left


to right.
The Coder will not process a block
until all of the inputs to that block have
been processed or come from a
different rate group.

Slide 14
Rate Group Crossing
When Rate Groups are crossed, the effect is a time
delay due to the scheduling of the Rate Groups.
Use Fast RG=10mSec, Mid RG = 20mSec, Slow RG =
80mSec
When two Rate Groups are crossed:
Slow-Faster (Fast RG + Slow RG) = 90 mS
Faster-Slower
Best Case (Fast RG + Slow RG) = 90 mS
Worst Case(Slow RG Time * 2) = 160 mS
When two Rate Groups are crossed:
Fast-Slow-Fast
Best Case (Fast RG *2) + Slow RG = 100 mS
Worst Case(Fast RG + (Slow RG *2)) = 170 mS
Slow-Fast-Slow (Slow RG *3) = 240 mS

Slide 15
16.16 Math Package
The 723Plus, 2301D and other hardware platforms use a
math package in the processor called 16.16 fixed point
math.
This means that the “whole” number portion is
represented by a 16-bit number, and the “fractional”
portion of the number is represented by a 16-bit number.
Whole Number. Fraction
= 216. 1/(216) or 216. (216 - 1 ) /(216)
= 65,536.000015259
= +/- 32,768.000015259 Smallest Fractional Number
= +/- 32,768.999984741 Largest Fractional Number

Slide 16
16.16 Math Package Example
Example: Lets say you wanted to calculate the percent load on a
11 MW generator, which was carrying 5,500 KW.
You might use the following equation:
Percent Load = [ 1/11,000 * 100 * (5,500,000)]
The problem is when the math calculates 1/11,000.
1/11,000 = 0.00009090909. The math package comes up with
1/11,000 = 5/65536 = 0.0000076294
This means instead of calculating 50% load, it actually
calculates the load at 41.96 % load. An error of over 16%.
You can usually avoid this problem by re-arranging your order of
operations and keeping your numbers as high as possible.

Slide 17
A New Application

Slide 19
Getting Started
Start by opening up the GAP program
ver. 2.15.
Right click on the “NEW” application.

Slide 20
Template Version

Slide 21
Template Version
Select the template version for the new
application and select OK.
The template version defines the blocks
available to the programmer.

Slide 22
The Title Corner

Slide 23
The Title Corner
The Title Corner displays lots of
information.
Be sure to fill it out!

Slide 24
Page One

List of GAP Pages

Change History

Master / System Info Block

Title Corner

Slide 25
Page One
Page One Displays the following:
GAP Pages
Title Corner
Change History
Master / System Info Block

Slide 26
Master / Sys Info Block

Slide 27
Master / Sys Info Block
This block provides information about
system constants and characteristics.
It contains a catch-all collection of
fields used to supply information to and
get information from the system.

Slide 28
Adding A New Page

Slide 29
Adding A New Page
Select “File” and “NEW”, then “Append
New Sheet To End” to add a new sheet.

Slide 30
Sheet Description

Slide 31
Sheet Description
It will ask you for a “Sheet Name” (40 Characters),
which shows up on each GAP page, lower-middle
part of page.
It will also ask you for an optional “Long Sheet
Description” (128 Characters), which shows up on
each GAP page, lower-left part of page.
The optional "Extended Sheet Description" field does
not appear on the sheet. It can only be viewed
through the displayed dialog box or by exporting it to
a database.
The "Revision History" is updated when a sheet is
saved in an application which is published or has the
option "Maintain rev. history on unpublished apps."
selected.
Slide 32
2301D Master Hardware Block
MPU Input
2301D Input and Analog Inputs
Output Declaration
Load Sharing I/O
Actuator Output
Analog Output
Discrete Inputs

Discrete Outputs

Serial Communications

Slide 33
2301D Master Hardware Block
This block identifies the physical I/O
channels on the 2301D hardware
platform.
The fields in this block allow the
applications engineer to interface the
physical I/O channel with the GAP
software blocks that are listed for each
field.

Slide 34
Ready?

Slide 35
Adding Blocks
What kind of blocks do you want to
add?
Five types of GAP blocks available.
Service
Configure
Process
Interface
Hardware

Slide 36
Service Blocks

Slide 37
Service Blocks
These password protected blocks can
be used while the engine is running. It
permits monitoring of values, and tuning
of tunable values.

Slide 38
Configure Blocks

Slide 39
Configure Blocks
These password protected blocks
cannot be used while the engine is
running. The blocks are used to set up
application specific variables, before
actual operation of the system starts.
Example: (How many teeth on the
Magnetic pickup?)

Slide 40
Process Blocks

Slide 41
Process Blocks
These blocks are the base of the
program.
They consist of the logical block types,
arithmetic block types, and control block
types.

Slide 42
Interface Blocks

Slide 43
Interface Blocks
These blocks are used to interface with
the outside world.
They consist of blocks that can
communicate with RS-232, and
MODBus.
There are other special blocks in this
listing.

Slide 44
Hardware Blocks

Slide 45
Hardware Group
These blocks are used to interface with
the outside world. They consist of
blocks that can communicate with
analog inputs and outputs, discrete
inputs and outputs, Magnetic Pickups,
RTD’s, Actuators, and Position Sensors.

Slide 46
Various Block Descriptions

Slide 47
ABSOLUTE
Absolute Value Block

This block takes the absolute


value of the Analog Input Field
and outputs it. The Analog
Output Field of this block is
always a positive value,
regardless of the sign of the
input.

Question: What is the output of


the block?

Slide 48
ADD
Add Block

This block adds the Analog Input


Fields together and outputs the
Analog result.

Question: What is the output of


the block?

Slide 49
AND
And Block
This blocks output will be true only if all
of the Boolean Input Fields are true.
Otherwise the output of this block will
be false.

Question: What is the output of the


block?
AND Truth Table

IN_1 IN_2 IN_x AND Output

FALSE X X FALSE

X FALSE X FALSE

X X FALSE FALSE

TRUE TRUE TRUE TRUE

X = This input can be true or false.


Slide 50
A_3_RM
Analog Redundancy Management Block
This block generates the median value
of the first input (IN_1), the second
input (IN_2) and the third input (IN_3)
and passes the result to the output
(A_3_RM).

If any input differs from the median by


more than the maximum difference
(MAX_DIFF), the alarm field (ALM)
latches at true. If that input returns
within the maximum difference from
the median, the reset field (RST) sets
the alarm field to false.

Slide 51
A_COMPARE
Analog Compare Block
This block determines whether the first input
(IN_1) is greater than/equal to or less than the
second input (IN_2), and can use a Hysteresis
buffer (HYSTER) to prevent chatter in the output.

When the Hysteresis is not used (HYSTER = 0):

The output (A_COMPARE) is set to true if the first


input is greater than or equal to the second input.
The output is set to false if the first input is less
than the second input.

Question: What is the output of the block?

Slide 52
A_COMPARE
Analog Compare Block

Slide 53
A_COMPARE
Analog Compare Block

Slide 54
A_COMPARE
Analog Compare Block

Slide 55
A_MUX_N_1
Analog Multiplexer Many to One Block
This block functions like a many-to-one
hardware Multiplexer. Use the Repeat
command to add inputs. The channel
selector field (SEL) is an integer input that
determines which input the output value
will be. If SEL is 4, the output will be the
analog value from IN_4.

If the SEL input is invalid ,< 1 or > than the


max # of available inputs, the output will
remain unchanged and will.be from the
IN_x of the last valid input.

Question: What is the output of the block?

Slide 56
A_NAME
Analog Name Block
The block allows you to name an Analog
value and use that name throughout the
rest of the GAP application. A_NAME is
useful for cases where a tunable value is
used as an input to more than one block in
an application. This block simplifies
program flow and reduces processing time
compared to using several tunable values
scattered in different locations of the
program. A_NAME can also make it easier
to follow Analog signals in the program
flow.

Question: What is the output of the block?

Slide 57
A_SW
Analog Switch Block
This block is used to switch
between two analog inputs.

When the control field is set to


false, the normally closed input
is passed to the output.

When the control field is set to


true, the normally open input is
passed to the output.

Slide 58
A_TO_INT
Analog To Integer Block

This block accepts an Analog value


and converts it to an integer by
truncating any fractional part.

The inputs/outputs are in a repeat


group.

Question: What is the output of the


block, OUT_1, OUT_2?

Slide 59
B_ALARM
Boolean Alarm Block
This block has the same function as a
latch block but with special features built
in. There are three outputs B_ALARM,
HORN and LIGHT which can be used to
indicate that an alarm has occurred. The
input can be delayed or bypassed all
together. The latching output can be
reset if the input is false.
Note: The acknowledge (ACKN) input will
reset the HORN output regardless of the
state of the input, but will not affect the
B_ALARM or LIGHT outputs.

Slide 60
B_NAME
Boolean Name Block

The block allows you to name a Boolean


value and use that name throughout the rest
of the GAP application. B_NAME is useful
for cases where a tunable value is used as
an input to more than one block in an
application. This block simplifies program
flow and reduces processing time compared
to using several tunable values scattered in
different locations of the program. B_NAME
can also make it easier to follow Boolean
signals in the program flow.

Question: What is the output of the block?

Slide 61
B_SW
Boolean Switch Block
This block is used to switch
between two Boolean inputs.

When the control field is set to


false, the normally closed input
is passed to the output.

When the control field is set to


true, the normally open input is
passed to the output.

Slide 62
CURVE_2D
2-Dimensional Curves Block
This block is a two dimensional table lookup block.
The X_IN represents a point along the x-axis of a
simple line graph. The output represents the y-axis
value that corresponds to the specific x-axis value. If
the X_IN is less than the minimum X_IN value in the
table or greater than the maximum X_IN value in the
table, the CURVES_2D block will extrapolate using
the slope of the last two points on the table. If a
truncated output is desired, provisions must be made
in the data table to provide this function.
X In
0 1000 2000 3000 4000 5000 6000 7000 8000
0
-100
-200
-300
Y Out

-400
-500
-600
-700
-800
Slide 63
DEADBAND
Deadband Block
This block provides a deadband controller. When the enable (ENBL)
input is true, the block compares DEMAND and VAL inputs. If the
difference between DEMAND and VAL is equal to or less than the first
deadband window size (DB_1) the block will not take any action and
the outputs RAISE_VAL and LOWER_VAL will both be false. If
DEMAND is greater than VAL by more than DB_1, RAISE_VAL will be
true. If VAL is greater than DEMAND by more than DB_1,
LOWER_VAL will be true. A second window size is provided (DB_2)
that, when exceeded, causes the EXCD_DB_2 output to go true.

Added a hysteresis(HYSTER) input. This new input only affects the


EXCD_DB_2 output. When the difference between the VAL and
DEMAND inputs exceed the DB_2 setpoint the output EXCD_DB_2
output will go TRUE. However, the difference between VAL and
DEMAND must be less than (DB_2 - HYSTER) before the
EXCD_DB_2 output will go back FALSE.

Slide 64
DELAY
Delay Block
This block is used to provide a delay function.

This block sets the output (DELAY) to true, when


the trigger field (TRIGGER) stays true for longer
than the delay time (DLY_TIME). The output will go
false, when the trigger field stays false longer than
the negative edge delay time (NEG_DTIME). If the
trigger field changes states but does not maintain
that change for the specified time interval, the
output will not change state. The remaining time
field (R_TIME) displays the time remaining until the
output changes states.

Slide 65
DELAY
Delay Block

Slide 66
DIVIDE
Divide Block
Divide block. This block performs
a divide function. It takes IN_1
and divides it by IN_2.

Output = IN_1 / IN_2 or


dividend/divisor.

Question: What is the output of the


block?

Slide 67
HSS_BUS
High Signal Select Block
The HSS_BUS block performs a high signal select
function of multiple Analog input values. The output
of the HSS_BUS block will equal the input with the
highest input value provided the value is not higher
than the high limit (HI_LIM) or lower than the low
limit (LOW_LIM) inputs.

There are several Boolean outputs which provide


status of what input signal is the highest value and
individual outputs to indicate whether the output of
the HSS_BUS is being limited by either the LO_LIM
or HI_LIM. There is a SEL_x output for each input
signal respectively which is set true when its
corresponding input value is the highest value. The
Boolean output for HI_LIM limit indication is
HI_LIM_I and LO_LIM_I for the LO_LIM limit
indication.

Question: What is the output of the block?

Slide 68
I_COMPARE
Integer Compare Block

The block accepts two integer


input values and compares them.
The block has three outputs that
indicate IN_1 is less than (LT),
greater than (GT) or equal to
(EQ) IN_2.

Slide 69
I_TO_AN
Integer to Analog Block

This block accepts an integer


value and converts it to an
Analog value.

The inputs/outputs are in a


RPT group.

Slide 70
LAG
Lag Block
The purpose of this block is to
perform the Lag function on the
input.
This block, which is a low-pass
filter, generates a delay in the time
it takes for the output signal (LAG)
to match a change in the input (IN).
This block can be used to ignore
noise from the input. The output is
lagged according to the Lag Tau
value (LAG_TAU). The derivative
field (DERIV) is the rate of change
of the input.
Slide 71
LAG_2
Lag 2 Block
This block is used to perform the Lag function on
the input with a Lag Tau from another block.
This block, which is a low-pass filter, generates a
delay in the time it takes for the output signal
(LAG) to match a change in the input (IN). This
block can be used to ignore noise from the input.
The output is lagged according to the Lag Tau
value (LAG_TAU). The derivative field (DERIV) is
the rate of change of the input.
The main difference between LAG and LAG_2 is
that in LAG_2, the Lag Tau can be an input from
another block. Thus, LAG_2 must calculate all
the internal variables every time the block is
executed. These extra calculations cause LAG_2
to need 30-50% more execution time than LAG.

Slide 72
LAG_3
Lag 3 Block
The purpose of this block is to perform the
Lag function on the input without calculating
the derivative.
This block is like the LAG block except it
does not calculate the derivative. This block,
which is a low-pass filter, generates a delay
in the time it takes for the output signal
(LAG) to match a change in the input (IN).
This block can be used to ignore noise from
the input. The output is lagged according to
the Lag Tau value (LAG_TAU).

Slide 73
LATCH
Latch Block
This block looks at a single Boolean
input (TRIGGER) and sets the output
(LATCH) true if the input is set true. If
the input is false and the reset (RST) is
set true, the output will return to false. If
both the input and the reset are true, the
output will remain latched true because
the input has priority over the reset.
TRIGGER Field Transition RST Field Value LATCH Output Value
false to true true true
false to true false true
true to false false since TRIGGER transition true
true to false is true or goes true false

If the input goes from false to true, the output is set to true regardless of the state of the reset field.

Since the input is a rising edge trigger, when it goes from true back to false, the output will remain true
until the reset goes true.

Slide 74
LATCH1
Latch 1 Block
The LATCH1 is a multiple input latch block. The LATCH1 block has two kinds
of latched outputs: the LATCH1 output which is a logical or of all the inputs,
and individual latched outputs for each input. If any input goes to the true
state, the LATCH1 output goes TRUE. Also, when any input goes into the true
state, its corresponding SEL_n output is latched TRUE. An input that goes into
the true state must be reset before it can go into the true state again. The
LATCH1 output and the SEL_n outputs can be reset only by a true state on the
RST input. When an input goes into the true state, its ALM_NO_n output will
be set to an integer which represents the relative order in which that input went
into the alarm state (for instance, if input number three was the second input to
go true after a reset, the ALM_NO_3 field would contain the integer 2). The
FIRST_ALM output is an integer which will have the number of the alarm that
caused the LATCH1 output to be set TRUE (for instance, if Input number 4
was the first input to go true after a reset, it would cause the LATCH1 output to
be set to TRUE, and the FIRST_ALM field would contain the integer 4). The
first out reset input (FA_RST) will reset the FIRST_ALM back to 0 even if there
are inputs that are true, the next input to go true will be displayed in
FIRST_ALM. The HORN output will go TRUE when any input goes into the
alarm state; it can be reset to FALSE by either RST (reset) or ACK
(acknowledge). When the OVRD input is TRUE, the outputs are prevented
from going TRUE.

Slide 75
LSS_BUS
Low Signal Select Block
The LSS_BUS block performs a low signal select function
of multiple Analog input values. The output of the
LSS_BUS block will equal the input with the lowest input
value provided the value is not higher than the high limit
(HI_LIM) or lower than the low limit (LOW_LIM) inputs.

There are several Boolean outputs which provide status of


what input signal is the lowest value and individual outputs
to indicate whether the output of the LSS_BUS is being
limited by either the LO_LIM or HI_LIM. There is a SEL_x
output for each input signal respectively which is set true
when its corresponding input value is the lowest value. The
Boolean output for HI_LIM limit indication is HI_LIM_I and
LO_LIM_I for the LO_LIM limit indication.

What is the output of the block?

Slide 76
MULTIPLY
Multiply Block
The MULTIPLY block can be
used to perform simple
multiplication of 2 or more
inputs up to a maximum of 50
input values. Output = IN_1 x
IN_2.

What is the output of the


block?

Slide 77
NOR
NOR Block
This blocks output will be true only if
all of the Boolean Input Fields are
false. If any one of the inputs is true
then the output of this block will be
false. This block is similar to an OR
gate except the output is negated.

IN_1 IN_2 IN_x NOR Output


FALSE FALSE FALSE TRUE
TRUE ---------- ---------- FALSE
---------- TRUE ---------- FALSE
---------- ---------- TRUE FALSE

Slide 78
NOT
Not Block

This block negates the input


Boolean value.

What is the output of the


block?

Slide 79
ONE_SHOT
One Shot Block
This block is used to latch the output at true for a
specified amount of time, when triggered by the input.

This block sets the output (ONE_SHOT) to true, only


when the input (TRIGGER) goes from false to true,
like a rising edge trigger. The output stays true for the
specified delay time (DLY_TIME) even if the input
goes back to false during that delay time. When the
delay time expires or the reset (RST) goes true, the
output is set to false even if the input is still true. The
input must return to false and then go true, while the
reset is false, before the output will be set to true
again. The remaining time field (R_TIME) displays the
amount of time remaining before the output function
times out.

Slide 80
ONE_SHOT
One Shot Block

Slide 81
OR
Or Block
This blocks output will be false only
if all of the Boolean Input Fields are
false. If any one of the inputs is true
then the output of this block will be
true.

What is the output of the block?


“OR” Truth Table (X = don’t care)

IN_1 IN_2 IN_x OR Output


FALSE FALSE FALSE FALSE
TRUE X X TRUE
X TRUE X TRUE
X X TRUE TRUE

Slide 82
PID_ENGA
PID Block
PID_ENGA control block. This block performs
a proportional (P), a proportional-integral (PI),
or a proportional / integral / derivative (PID)
control function.
The set point is compared to the process input
and a corrective output (scaled from 0 to 100)
results from the sensed error.

This block uses the following Control Theory


formula in its operations.
PID_ENGA (%) = [(GAIN x 100) / S] x
[(ACT_COMP x S) + 1] x {[SP - (RESET x S +
1) x PROC] / (1.2 x MAX_PROC)}

Slide 83
RAMP
Ramp Block

This block is a RAMP, it will ramp to a certain point depending on which position is selected. It will also ramp at a certain
rate depending on which rate is selected. It can be initialized to a certain value on power up, and it has a reverse output
function. The output is in units and the rates are in units/sec. The P_SEL_x inputs are like a priority encoder, when
USE_REV is FALSE, P_SEL_1 has the highest priority then P_SEL_2 and so on until the last P_SEL_x which will have the
lowest priority. The rate at which the ramp will move is determined by the DFLT_RATE, (Default rate) R_SEL_x and
R_SP_x. If there are NOT any R_SEL_x and R_SP_x then the ramp will move at the DFLT_RATE. If an R_SEL_x and
R_SP_x are being used then the ramp will move at the rate being selected by R_SEL_x. If they are being used and NOT
selected then the output will move at the DFLT_RATE. The rates are priority encoded to, with R_SEL_1 being the highest.

Slide 84
SFC_STEP
Sequential Function Chart Step Block

Sequential Function Chart (SFC) step block. This function block formalizes a sequence
of actions and is based upon the IEC-1131 Sequential Function Chart specification.
This block complements the B_ACTION block in offering an elegant way of designing
and implementing sequential control actions associated to the Sequential Function Chart.

The coder uses special loop-breaking logic for the SFC_STEP block such that the
SFC_STEP output field acts as a loop-breaker when needed. Explicit definition of
ZMINUS1 blocks are not needed for loops created by the SFC_STEP or TRAN_x output fields.

Slide 85
SFC_STEP
SFC is similar to a state diagram but with a few extra features, like
permitting parallel sequences.
To use the SFC_STEP you must layout the Control sequence as a
number of distinct states with defined conditions which cause the state
to change.
For instance, one state might be defined as “Out of Operation” and
another as “RUN” where the transition condition is “Initiate Start”.
The initial state, “Out of Operation”, is TRUE until the transition
condition, “Initiate Start”, becomes TRUE.
Then “Out of Operation” becomes FALSE and the next state, “RUN”,
becomes TRUE.
The transition can be thought of as passing a TRUE “token” from one
Sequence State to another.
This is more easily understood when graphically represented with
SFC_STEP blocks as follows:

Slide 86
SFC_STEP

Even this simple example is obviously


incomplete. What happens after “RUN”?
How do we Initialize “OUT OF OPERATION”?
What are the output fields (> and T>) at the
right of the SFC_STEP block?

Slide 87
SFC_STEP
The SFC_STEP Fields and their Descriptions

Slide 88
SFC_STEP Function and Fields
A SFC_STEP block becomes TRUE when any of it’s SF_SEL_x inputs
becomes TRUE.
If a SFC_STEP block is FALSE, then T_COND_x inputs have no effect.
When a SFC_STEP block is TRUE, if any T_COND_x input becomes
TRUE, then the SFC_STEP block becomes FALSE and the TRAN_x
output is TRUE for a single Rate Group “pulse”.
If a SFC_STEP block is TRUE and two or more T_COND_x inputs
become TRUE simultaneously, then the SFC_STEP block becomes
FALSE but only the single TRAN_x output for the highest priority
T_COND_x is TRUE for a single Rate Group “pulse”. Priority is based
on the order of the repeat, so T_COND_1 has the highest priority.
The path of sequence flow is defined by connection of a TRAN_x
output from one SFC_STEP block to the SF_SEL_x input of another.
The T_COND_x input is connected to a Boolean value representing one
of the State’s “Transition Conditions ”. The “Transition Condition” is
usually, but not always, a GAP block output.

Slide 89
Some Rules Regarding the use of SFC_STEP fields

SF_SEL_x inputs may ONLY be connected to


TRAN_x outputs.
Every TRAN_x output MUST be connected to
a SF_SEL_x input.
SFC_STEP blocks connected via Transitions
must be in the SAME rate Group.
Every Sequence composed of interconnected
SFC_STEP blocks must have one and only
one block where the INIT input is set to
“ACTIVE”.

Slide 90
SFC_Step Notes:
While it is possible to connect SF_SEL_x inputs to any GAP block
output of type BOOLEAN this should never be done. There exists the
potential to inadvertently generate multiple “tokens”, that is multiple
TRUE sequence states where only one should exist.
If a TRAN_x output field is not connected to a SF_SEL_x input field the
“token” will be lost, no SFC_STEPs in the sequence would be TRUE.
From this “Dead” Sequence state, nothing can happen.
It is possible to define a sequence which is starts from a “Dead” state
by connecting the first state SF_SEL_x input to some non-SFC_STEP
block (or to a tunable Boolean). This should NOT be done as it
invalidates the protections built into the SFC_STEP structure.
Rate Group crossings have the potential to generate multiple tokens or
to lose the token resulting in a “Dead” sequence.
In general, TRAN_x outputs are connected to a single SF_SEL_x input.
It is possible to connect a TRAN_x output to multiple SF_SEL_x inputs,
generating multiple “tokens”. In some cases, this creation of a
“divergent” sequence, one with multiple parallel paths is desirable. It
is very important to manage the convergence of such sequences
properly.

Slide 91
Sequence Initialization Considerations
Which SFC_STEP block is defined to Initialize to the
ACTIVE state depends upon application
considerations. An “OUT OF OPERATION” state may
be appropriate in many cases. Depending on fail-
safe states or the possibility that the control could re-
initialize as the result of a momentary CPU power
loss or inadvertent CPU reset, specific actions may
be required so initialization to a “TRIPPED” or
“SHUTDOWN” state may be a preferable starting
point. Alternatively, a special “POWERUP” state
might be defined from which system conditions such
as speed, temperatures, etc. are evaluated to
determine whether to transition to an “OUT OF
OPERATION” or some “POST OPERATION” state.

Slide 92
Sequence Response to Non-Sequential Events
In any sequence, proper response to faults or
otherwise non-sequential events must be considered
and addressed. Therefore, most SFC_STEP blocks
should have a transition condition (or conditions)
tied to events like “Shutdown”, “Emergency
Shutdown”, “Normal Shutdown”, “Sequence Timer
Overrun”, “Sub-System Fault” and so on. NOTE: The
subsequent sequence state may not be identical for a
given “event”. For instance, the response to a
“Normal Shutdown Request” while in the state
“PREPARE FOR START” may be significantly
different than while in the state “FULL LOAD
OPERATION”.

Slide 93
SFC_Step Example

Slide 94
SUBTRACT
Subtract Block
Output = IN_1-IN_2 or
Minuend Input-Subtrahend
Input.

What is the output of the


block?

Slide 95
Other Functions

Is your head in a fog yet?

Slide 96
Using the GAP Program
To connect two blocks together, start at
the output of one block, click with the
right mouse button and drag to the input
of another.

Slide 97
Connecting Two Blocks

Right Mouse Click


On Block Output

Slide 98
Connecting Two Blocks

Drag Cursor to input,


while holding down
mouse key.

Slide 99
Connecting Two Blocks

Release mouse key.


Connection (Net) is made.

Slide 100
Multiple Output Symbol

This indicates that the output


Goes to other inputs.

These inputs can be displayed by double-


Clicking on the block, and selecting the
Output option.

Slide 101
GAP Block Repeat Inputs
Certain blocks can have as many inputs
as the programmer wants.
These multiple inputs are called repeat
inputs.

Slide 102
Repeat Inputs

Slide 103
Repeat Inputs

Click on the Append, Insert, or Delete


For the repeat fields.

Slide 104
GAP Hot Keys
FILE
APPEND NEW SHT TO END - - - - - - CTRL+A
INSERT NEW SHT AFTER CURR. - - CTRL+I
OPEN SHEET - - - - - - - - - - - - - - - - - CTRL+O
SAVE - - - - - - - - - - - - - - - - - - - - - - - SHFT+S
COMPLETNESS CHECK - - - - - - - - - SHFT+C

EDIT
UNDO - - - - - - - - - - - - - - - - - - - - - - CTRL+Z
REDO - - - - - - - - - - - - - - - - - - - - - - CTRL+Y
MOVE - - - - - - - - - - - - - - - - - - - - - - CTRL+M or SHFT LEFTMOUSE
CUT - - - - - - - - - - - - - - - - - - - - - - - - CTRL+X
COPY - - - - - - - - - - - - - - - - - - - - - - - CTRL+C
PASTE - - - - - - - - - - - - - - - - - - - - - - CTRL+V
DELETE SELECTED - - - - - - - - - - - DEL
ADD TEXT - - - - - - - - - - - - - - - - - - CTRL+T
DRAW NET - - - - - - - - - - - - - - - - - - RIGHT MOUSE
EDIT APPLICATION INFO - - - - - - - - SHFT+A
Slide 105
GAP Hot Keys
SELECT
SELECT WITHIN BOX - - - - - - - - - - S OR LEFT
MOUSE
SELECT ALL - - - - - - - - - - - - - - - - - CTRL+S
GROUP SELECTION - - - - - - - - - - - G+LEFT MOUSE
SELECT BY CATEGORY - - - - - - - - SHFT+K
UNSELECT WITHIN BOX - - - - - - - U+LEFT MOUSE
UNSELECT ALL - - - - - - - - - - - - - - CTRL+U

RUN
CODE THIS APPLICATION - - - - - - SHFT+O

Slide 106
GAP Hot Keys
VIEW
BRANCH TO BOX - - - - - - - - - - - - - CTRL+B
BRANCH BY TYPE- - - - - - - - - - - - - SHFT+T
RETURN TO LAST BRANCH - - - - - CTRL+L
VIEW BLOCK INPUTS - - - - - - - - - - ‘<‘
VIEW BLOCK OUTPUTS - - - - - - - - - ‘>‘
REFRESH SCREEN - - - - - - - - - - - - CTRL+R
ZOOM IN - - - - - - - - - - - - - - - - - - - - SHFT+I
ZOOM OUT - - - - - - - - - - - - - - - - - - SHFT+O
ZOOM FULL - - - - - - - - - - - - - - - - - SHFT+F
ZOOM BACK - - - - - - - - - - - - - - - - - SHFT+B
ZOOM AROUND - - - - - - - - - - - - - - SHFT+Z
HARDWARE GROUP - - - - - - - - - - - ALT+H
SERVICE GROUP - - - - - - - - - - - - - - ALT+S
CONFIGURE GROUP - - - - - - - - - - - ALT+C
INTERFACE GROUP - - - - - - - - - - - ALT+I
PROCESS GROUP - - - - - - - - - - - - - ALT+P

Slide 107
Moving A Block

Place Cursor on Block

Slide 108
Moving A Block

Hold Down The Shift Key


And The Left Mouse Button

Slide 109
Moving A Block

Release Buttons To Place Block

Slide 110
Moving A Block
The previous method works for moving:
Blocks
Lines
Groups of blocks
Input and output fields

Slide 111
Cutting and Pasting Of Blocks
Cutting and pasting of blocks
Select a block
Ctrl C = Copy to clipboard
Ctrl V = Paste from clipboard
Ctrl X = Delete

Slide 112
Deleting Blocks and Lines
Select the block by double clicking on
the block or by drawing a dashed line
around the items to delete.
Press the delete key or under Edit,
select “Delete Selected”

Slide 113
Check For Timing Errors

Click on this selection box


To change colors of different
Rate groups.

Slide 114
Check For Timing Errors

Purple = Fastest Rate Group


Green = Slowest Rate Group

Slide 115
Completeness Check
Before the GAP program generates an
output file, a validity test is performed
on the program. This assures that you
have correctly typed all input numbers,
and that they are in correct syntax.
Any errors found are listed in a Window.
Help may be obtained about individual
parameters in a block or about the block
itself.

Slide 116
Completeness Check

Slide 117
Error List

Slide 118
Compiling a GAP Program
Once the completeness check has been
successfully passed, a “.cdr” file is
produced.
This “.cdr” file is then processed by the
coder, which creates a “hex”, or file.

Slide 119
NetSim Control Executive

The Netsim Control Executive allows the user to use


Monitor Gap to de-bug a GAP program.
Used with GAP 2.15 or later.
GAP application must be coded with the Netsim
Coder.
Slide 121
NetSim Control Executive

When the GAP application is coded with the Netsim Coder, the
coder will generate a Debug sub-directory with a .dll file in it.
This file needs to be opened for the Monitor GAP to work.

Slide 122
NetSim Control Executive

Slide 123
NetSim Control Executive

Selecting the RUN MODE, will allow the user to change the Run
Mode to internal, for use with OPC communications.
The user also has the capability to change the speed update of
the Monitor GAP.

Slide 124
NetSim Control Executive

Push the “RUN CYCLER” icon to start the


communications.

Slide 125
NetSim Control Executive

The message “OPC Started” will display, and


the “Elapsed Time” clock will start.

Slide 126
Monitor GAP

Slide 128
Monitor Gap
Now able to view and monitor values
inside a running GAP 2.15 or later
application
Allows you to change tunables during a
running application and watch the
results

Slide 129
Monitor Values

Slide 130
ServLink and OPC Connection

The first time you access the ALT-M feature, Monitor GAP
will prompt you for the connection address

Click here to connect to a ServLink server

Input the address and select Connect to Control

Slide 131
Monitor View
Main menu options
are limited in this
mode.
When in the Monitor
view all GAP appears
gray and the active
values appear In color.

Slide 132
Active Values

Slide 133
Changing a Boolean Input

Boolean values
Can be changed
By double-clicking
On them.

Slide 134
Running Changes

With the Input


changed, observe
logic change through
the GAP.

Slide 135
Changing an Analog Value

Analog values
Can be changed
By double-clicking
On them.

Slide 136
Things to Remember!!!
Keep in mind that
these changes are in
the GAP application
that is running inside
the controller.
If you leave the
changes in place, they
will remain as the
controlling values.
Resetting the
controller power will
return the unit to the
original values.

Slide 137
Exercise #1 – Closed Loop Speed Control And Engine

Exercise: To program GAP for a Closed Loop Speed


Control and Engine Simulator.
Result: This exercise will allow you to learn about
putting in various blocks, connecting the blocks,
fixing errors, compiling the program, and running
NetSim.
Specifications:
Start / Stop and Idle / Rated Discrete Inputs
MPU / Speed Input
Load Stepper 25%, 50%, 75%, 100% Load Steps.
Idle Speed = 1200 RPM, Rated Speed = 1800 RPM.
Tunable Dynamics (PID)
Available Blocks: Shown in diagram.

Slide 138
Exercise #1 – Closed Loop Speed Control And Engine

*10.0 (0.001, 100.0)


*0.6 (0.01, 50.0)
*8.0 (0.01, 100.0)

Slide 139
Exercise #2– Traffic Light
Exercise: Program GAP for a stop light sequence.
Result: This exercise allows you to learn about numerous blocks, and
teaches you sequencing. DO#1
Procedure: Using a Discrete Input, create a program that will start a
sequence for the stop light.
DO#2
Specifications:
The sequence must be started and stopped using a Discrete Input.
A Discrete Output #1(Red Light) should come on first when the sequence is
started. Then Discrete Output #3 (Green Light), then Discrete Output #2
(Yellow Light).
DO#3
The lights should cycle in the following order starting with the red light. Red –
Green – Yellow – Red...
The Red Light should always come on for 10 sec.
The Green Light should always come on for 10 sec.
The Yellow Light should always come on for 3 sec.
All lights should turn off when the “Start / Stop Sequence” input is turned off.
Available Blocks: B_NAME, AND, OR, NOT, XOR, DELAY, LATCH,
A_NAME, ADD, SUBTRACT, MULTIPLY, DIVIDE, ONE_SHOT.
Optional Assignment:
Make the light “on” times tunable with only three time adjustments.
Set-up a service menu and display the following:
Red/Yellow/Green light status
Tunable “on” times for each light

Slide 140
Exercise #3– Traffic Light
Exercise: Program GAP for a stop light sequence.
Result: This exercise allows you to learn about numerous DO#1
blocks, and teaches you sequencing.
Procedure: Using a Discrete Input, create a program that will
start a sequence for the stop light. DO#2
Specifications:
The sequence must be started and stopped using a Discrete Input.
A Discrete Output #1(Red Light) should come on first when the
DO#3
sequence is started. Then Discrete Output #3 (Green Light), then
Discrete Output #2 (Yellow Light).
The lights should cycle in the following order starting with the red
light. Red – Green – Yellow – Red….
The Red Light should always come on for 10 sec.
The Green Light should always come on for 10 sec.
The Yellow Light should always come on for 3 sec.
All lights should turn off when the “Start / Stop Sequence” input is
turned off.
Available Blocks: RAMP, B_NAME, AND, OR, NOT, XOR,
DELAY, LATCH, A_NAME, ADD, SUBTRACT, MULTIPLY, DIVIDE,
ONE_SHOT.

Slide 141
Exercise #4– Traffic Light
Exercise: Program GAP for a stop light sequence.
Result: This exercise allows you to learn about numerous DO#1
blocks, and teaches you sequencing.
Procedure: Using a Discrete Input, create a program that will
start a sequence for the stop light. DO#2
Specifications:
The sequence must be started and stopped using a Discrete Input.
A Discrete Output #1(Red Light) should come on first when the
DO#3
sequence is started. Then Discrete Output #3 (Green Light), then
Discrete Output #2 (Yellow Light).
The lights should cycle in the following order starting with the red
light. Red – Green – Yellow – Red….
The Red Light should always come on for 10 sec.
The Green Light should always come on for 10 sec.
The Yellow Light should always come on for 3 sec.
All lights should turn off when the “Start / Stop Sequence” input is
turned off.
Available Blocks: SFC_STEP, B_NAME, AND, OR, NOT, XOR,
DELAY, LATCH, A_NAME, ADD, SUBTRACT, MULTIPLY, DIVIDE,
ONE_SHOT.

Slide 142

You might also like