Hlbl Tac Lab | Compiler | Software Development

Creati ng Sequenti al Logic

With IEE
Lab Guide
Introduction
Sequence blocks are created in IDE, and programmed using HLBL language to perform several functions in a
control strategy. ou can edit Sequence blocks using t!e HLBL Editor, as follo"s#
• I$D, DE%, and E&' blocks can use all of t!e HLBL statements.
• ()$ blocks use a limited set of statements.
• *I( blocks do not use HLBL statements.
In t!is lab, you "ill create a DE% sequence block, "rite HLBL code and t!en compile. +pon compilation, if
t!ere are any compilation errors, you "ill make t!e necessary correction and t!en recompile.
Module Objective:
+tili,ing all available documentation, t!e student "ill be able to "rite HLBL sequential control code
using t!e IDE interface.
Enabling Objectives:
*!e enabling ob-ectives t!at support t!is module ob-ective are as follo"s#
.. 'reate sequence blocks and use HLBL to "rite sequence code.
/. 'ompile HLBL code, access and correct compilation errors "!en present.
Lab Guide 1
HLBL Lab
Sequential Logic
TABLE OF CONTENTS
1 Creating Seuence Bloc!s and Seuence Code"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""#
'reati ng a 'ompound and a Strat egy ............................................................................0
'reati ng a Sequence Block Inst ance ...............................................................................0
'reati ng HLBL 'ode .............................................................................................................. 1
$ Co%&iling 'LBL Code"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" (
'ompiling sequence blocks ................................................................................................2
2 Lab Guide
HLBL Lab
Sequential Logic
1 C)EATIN* SE+,ENCE BLOC-S AN. SE+,ENCE CO.E
3 Sequence Block can be created in IDE, by instantiating it from t!e I34Blocks template folder
located in t!e *emplate *oolbo5 "indo". *!e procedure involves clicking and dragging t!e specific
sequence block template from I34Blocks folder onto a ne" or previously e5isting strategy. Here, you
"ill create a ne" strategy and a compound specifically for t!is portion of t!e lab e5ercise.
Creating a Co%&ound and a Strateg/
.. 'all up IDE control database configurator.
/. In t!e Deployment "indo", e5pand 6ala5y and t!en +nassigned Host folders
0. In *emplate *oolbo5 "indo", e5pand 6ala5y
7. 'reate a ne" compound and rename it 8E3'*)84$ as follo"#
• E5pand I34'ompounds template folder locate in t!e *emplate *oolbo5 9indo"
• 'lick and drag :')(%$D template do"n to a blank area in t!e Deployment 9indo"
• 9ait until it appears in t!e +nassigned Host area and c!ange its name to 8E3'*)8*4$.
1. 'reate ne" strategy and rename it 8eactor as follo"#
• E5pand Invensys folder locate in t!e *emplate *oolbo5 9indo"
• 'lick and drag :Strategy template do"n to a blank area in t!e Deployment 9indo"
• 9ait until it appears in t!e +nassigned Host area and t!en c!ange its name to 8eactor.
Creating a Seuence Bloc! Instance
;. 'all up t!e Strategy Editor by double clicking 8eactor strategy.
2. 3dd a DEP block to t!e 8eactor strategy and name it HE3*4''LE as follo"#
• E5pand I34Blocks folder.
• 'lick and drag t!e :DE% <DE%E$DE$*= block template from I34Blocks folder into t!e
Strategy Editor screen. See figure .>.
• $ote t!e appearance of t!e DE% Sequence block in 8eactor strategy.
• Double click t!e DE% block and select HLBL from t!e dialog bo5.
• Select t!e 6eneral tab from t!e editor top menu and enter 8eactor in t!e I?3 $ame field
.
Lab Guide 3
HLBL Lab
Sequential Logic

Figure 1-1 HEAT_CYCLE Block
4 Lab Guide
HLBL Lab
Sequential Logic
Creating 'LBL Code
*!e HLBL 'ode Editor is used to enter HLBL code.
.. Select t!e key labeled HLBL Editor from t!e strategy editor top menu
Figure 1-2 HLBL Editor
 9!ic! section of t!e template is used for constants@
a= ')$S*3$*S
b= A38I3BLES
Lab Guide 5
HLBL Lab
Sequential Logic
c= +SE84L3BELS
d= S*3*E(E$*S
 9!ic! section of t!e template is used to assign names to Boolean inputs and
outputs@
a= ')$S*3$*S
b= A38I3BLES
c= +SE84L3BELS
d= S*3*E(E$*S
 9!ic! section of t!e template is used to enter HLBL code@
a= ')$S*3$*S
b= A38I3BLES
c= +SE84L3BELS
d= S*3*E(E$*S
/. Scroll do"n to S*3*E(E$*S section of t!e block and type t!e follo"ing code# < ou could use
t!e function menu for some of t!e HLBL statements=
<*!is code !as errors in it intentionally, so you could see an unsuccessful compilation result "it!
types of errors generated by t!e compiler. ou "ill t!en correct t!e errors and recompile successfully=
BS"itc! temperature controller to 3uto and LocalC
##*'0DD..(3 # E *8+E
##*'0DD..L8 # E 8emote F
BSet temperature setpoint to /DD.DD and "aitC
##*'0DD..8S% # E /DD.DD F
93I* +$*IL ##*'0DD..(E3S GE .HH.DD F
B Send message to screen and printer C
SE$D(ESS36E < I*emperature reac!ed desired setpoint of /DD.DDJ= *) (S668.F
B3ctivate t!e monitor block 3L38(4()$C
3'*IA3*E ##3L38(4()$ F
6 Lab Guide
HLBL Lab
Sequential Logic
$ COM0ILIN* 'LBL CO.E
Co%&iling seuence bloc!s
our code must compile error free before it could be do"nloaded to t!e '%. If a compilation produces
any errors, you must correct t!e errors and recompile. 3n uncompiled code cannot be do"nloaded to
t!e '% to run. 3 Sequence block must be recompiled eac! time any subsequent c!anges are made and
t!e compilation must be successful.
In t!is section you "ill compile HE3*4''LE block. *!is block "ill not compile successfully t!e
first time because it contains errors. ou "ill t!en look at t!e compilation errors, make corrections,
and recompile successfully <!opefully=.
.. Ensure t!at t!e HLBL Editor is open for t!e HE3*4''LE block.
/. Select t!e compile Icon from t!e top rig!t corner area of t!e editor screen <pass t!e cursor over it
first, it s!ould say 'ompile=. ou may "ant to enlarge t!e 'ompile )utput 9indo" located at
bottom of screen to provide better vie"ing of t!e error messages. See figure />.
 Scroll t!e 'ompilation )utput 9indo" and describe t!e nature of t!e error messages.
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
Lab Guide 7
HLBL Lab
Sequential Logic
Figure 2-1 Unsuccessful Co!il"tion #esult
0. *!ere s!ould be several errors in t!is code, by double clicking an error, you "ill access t!e error
location in t!e code and make correction. 3t t!is time, look at t!e error types and practice double
clicking to locate t!e error.
7. Eac! error is "ell described, and one can make t!e correction "it! some kno"ledge of HLBL
1. our correct code s!ould be as s!o"n belo". See if you could spot t!e difference bet"een t!e t"o
codes. (ake correction to t!e code as follo"#
BS"itc! temperature controller to 3uto and 8emoteC
##*'0DD..(3 # E *8+E F
##*'0DD..L8 # E *8+E F
BSet temperature setpoint to /DD.DD and "aitC
##*'0DD..8S% # E /DD.DD F
93I* +$*IL ##*'0DD..(E3S GE .HH.DD F
B Send message to screen and printer C
8 Lab Guide
HLBL Lab
Sequential Logic
SE$D(S6 <I*emperature reac!ed desired setpoint of /DD.DDJ= *) (S668.F
B3ctivate t!e monitor block 3L38(4()$C
3'*IA3*E ##3L38(4()$ F
;. 8ecompile after correcting t!e errors.
2. If you still !ave any errors, make correction, recompile until your program is error free.
K. Save and e5it HLBL Editor
H. Save and e5it Strategy Editor.
.D. Since t!is is only a tutorial session for you to learn !o" to build, compile and make corrections to
sequential logic, t!ere is no need to do anyt!ing else. If t!is "ere to run in a '%, you "ould assign
t!e strategy to a compound like 8E3'*)84$, you "ill t!en assign t!e compound to a '% and
t!en Deploy t!e compound and its content
... Delete bot! t!e strategy 8eactor and t!e compound 8E3'*)84$.
./. 8edo t!e lab if you need to.
Lab Guide 9
HLBL Lab

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.