ABB DCS 系统 培训课程 系列讲座 Exercises Chapter 7.docx
《ABB DCS 系统 培训课程 系列讲座 Exercises Chapter 7.docx》由会员分享,可在线阅读,更多相关《ABB DCS 系统 培训课程 系列讲座 Exercises Chapter 7.docx(9页珍藏版)》请在冰点文库上搜索。
ABBDCS系统培训课程系列讲座ExercisesChapter7
ExercisestoChapt.7FunctionBlockDiagram(FBD)Language
7.1UsetheFBDlanguage–Exercise7.1
7.1.1Description
ThisexercisedescribestheuseoftheprogramminglanguageFBD.
7.1.2Objectives
Afterthisexerciseyouwillbeableto:
∙ConfigureasmallprogramusingtheFBDlanguage
∙UsepagesintheFBDLanguage.
7.1.3ReferenceDocumentation
IntheOnlineHelp:
Contentstab,FunctionBlockDiagramEditor.
7.1.4Missions
7.1.4.1
UsingtheFBDlanguage
☞UseyourCourseProject
1.OpenProgram2andchangelanguageofthe
codeblocktoFBDlanguage.
Writethemathematicalexpressionbelow,byusingthefunctionAdd.
Sum=Constant1+Integer1
2.Saveandsimulatetheproject
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
7.1.4.2Attributesofvariables
☞Thereissomethingwrongabouttheattributesofthevariablesusedinthepreviousexercise.Canyoufindoutwhat?
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
7.1.4.3
Variablevalues
☞Changetheattributesonthevariablesinexercise7.1.4.1.
3.ThevariableInteger1shouldretainthevalueafteraColdRestart.
4.IsitnecessarytohavetheattributecoldretainonthevariableSumtomaintainitsvalueaftercoldrestart?
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
7.1.4.4Motor_Type
☞Configureaprogramwiththefunctionalitydescribedbelow.
InsertanewcodeblockwithFBDlanguageaftertheexistingcodeblockinProgram2andnameitMotor.
DeclareavariableMotor1ofthestructureddatatypeMotor_Type
Saveandsimulatetheproject
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
7.1.5
Solutions–Exercise7.1
7.1.5.1Solution:
UsingtheFBDlanguage
5.OpentheeditorofProgram2.
6.ChangethelanguageofthecodeblockCodefromStructuredTexttoFunctionBlockDiagram.
7.RightclickintheFBDpaneandselectInsertfunction/Functionblock.
8.ExpandtheSystemLibandselectanADDfunctionandclickOK
9.RightclickononeoftheinputpinsoftheADDboxandselectConnect.
10.Anewwindowappears.PressCtrl+J,clickonConstant1,pressEnter.
11.PressApply/Next,PressCtrl+J,clickonInteger1,pressEnter.
12.PressApply/Next,PressCtrl+J,clickonSum,pressEnter.
13.ClickontheOKbutton.
14.
TheFBDpanewillnowlooklikethis.
15.Usetheseicons
and
tocheckandclosethewindow.
16.Select(Tools>SimulateProject)intheprojectexplorermenu.
17.DoubleclickontheProgram2icon.
18.ChangevaluesonthevariableInteger1byrightclickingonitandselectSetValue.
19.Stopthesimulationbyselecting(Tools>StopSimulate)intheprojectexplorermenu.
7.1.5.2Solution:
Attributesofvariables
ThevalueofthevariableSumwillbecalculatedsinceInteger1andConstant1retainstheirvalues.Theorderofthecodewillbesignificant.
7.1.5.3Solution:
Variablevalues
20.GivethevariableInteger1theattributecoldretain.
21.ItisnotnecessarytohavetheattributecoldretainonthevariableSum,becauseafunctiondoesnotsavetheoutputvalue.
7.1.5.4
Solution:
Motor_Type
22.
DeclarethevariableMotor1ofthedatatypeMotor_TypeinthedeclarationpaneofProgram2.
23.InsertanewcodeblockandnameitMotorwiththeFBDlanguage.
24.RightclickintheFBDpaneandselectInsertfunction/Functionblock.
25.ExpandtheSystemLibandselectanORfunctionandclickOK
26.RightclickontheinsertedORboxandselectInsertfunction/Functionblock.
27.InsertanANDfunction,answernotothequestionaboutweretoplacetheelement.
28.
TheFBDpanewillnowlooklikethis:
29.ConnecttheoutputpinfromtheORboxwithoneoftheinputpinsoftheANDboxbyclickingontheoutputpinwiththeleftmousebutton,presstheCtrlkeyandclickononeoftheinputpinsoftheANDbox.
30.RightclickontheunconnectedinputpinoftheANDboxandselectInvert.
31.RightclickontheunconnectedinputpinoftheANDboxandselectConnect.
32.Anewwindowappears.PressCtrl+J,clickonMotor1thenpress.(dot),ClickonStop,thenpressEnter.ClickontheOKbutton.
33.ConnectMotor1.StarttooneoftheinputsoftheORbox.
34.ConnecttheoutputoftheANDboxtothevariableMotor1.Run.
35.ConnecttheoutputoftheANDboxtotheunconnectedinputoftheORbox:
RightclickontheoutputpintheANDbox,pressCtrlandclickontheunconnectedinputoftheORbox.
36.ClickontheoutputpinoftheANDboxandpressCtrlandtheclickontheunconnectedinputpinoftheORbox.
37.
TheFBDpanewillnowlooklikethis
38.CheckthecodewiththeCheckbutton.
39.ClosethewindowwiththeApplyandClosebutton.
40.Select(Tools>SimulateProject)intheprojectexplorermenu.
41.DoubleclickontheProgram2icon.
42.ChangevaluesonthevariablesbyrightclickingonthemandselectOn/Off.
43.Stopthesimulationbyselecting(Tools>StopSimulate)intheprojectexplorermenu.
7.2
UsepagesintheFBDlanguage–Exercise7.2
7.2.1Description
ThisexercisedescribestheuseoftheFBDlanguagewhenusingmorethanonepageofcode.
7.2.2Objectives
Afterthisexerciseyouwillbeableto:
∙UsepagesintheFBDLanguage.
7.2.3ReferenceDocumentation
IntheOnlineHelp:
Contentstab,FunctionBlockDiagramEditor.
7.2.4Missions
7.2.4.1
Copy/Paste
☞DeclareavariablenamedMotor2ofthedatatypeMotor_Type.
Usethecopyandpastefunctiononthefunctions
(fromexercise7.1.4.3.Motor_Type)
Replace1with2andremovethePastePageBreaksOption,
whenyoupastethecopiedfunctions.
Writecommentslikeitisdonebelow.
Saveandsimulatetheproject
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
7.2.5
Solutions–Exercise7.2
7.2.5.1Solution:
Copy/Paste
44.OpentheeditorofProgram2.
45.DeclarethevariableMotor2ofthedatatypeMotor_Type.
46.Expandthestructurepane(thepanetotheleftoftheFBDpanes).
47.
PressShiftkeyandclickwiththeleftmousebuttonontheORandthenAND.
48.RightclickonAND,selectcopy.(TheORandANDmustbemarkedblue).
RightclickonAND,selectPaste.
49.
Anewwindowappears.ClickontheOptionstabandremovethePastePageBreakscheckfromthecheckbox.WritelikebelowintheReplaceVariablestab.ClickonReplaceandthenonOK.
50.
Thestructurepanewillnowlooklikethis.
51.RightclickonORonthefirstrowofthestructurepane,
selectEditPageComment…
52.WritethecommentinthewindowandclickOK.
53.RightclickonORonthefirstrowofthestructurepane,selectEditComment…
54.WritethecommentinthewindowandclickOK.
55.
Thestructurepanewillnowlooklikethis.
56.
TheFBDpanewillnowlooklikethis.
57.Saveandsimulate.
58.Stopsimulation
Dukantagbortdennaosynligatextmenlåt
nedanståendePageBreakliggakvar!
Låtävendenefterföljandesidanliggakvar!
Thispageisintentionallyleftblank