CLXtipsTask.docx

上传人:b****6 文档编号:8445784 上传时间:2023-01-31 格式:DOCX 页数:20 大小:407.82KB
下载 相关 举报
CLXtipsTask.docx_第1页
第1页 / 共20页
CLXtipsTask.docx_第2页
第2页 / 共20页
CLXtipsTask.docx_第3页
第3页 / 共20页
CLXtipsTask.docx_第4页
第4页 / 共20页
CLXtipsTask.docx_第5页
第5页 / 共20页
点击查看更多>>
下载资源
资源描述

CLXtipsTask.docx

《CLXtipsTask.docx》由会员分享,可在线阅读,更多相关《CLXtipsTask.docx(20页珍藏版)》请在冰豆网上搜索。

CLXtipsTask.docx

CLXtipsTask

TaskModelinControlLogix

Introduction:

OptimizingtheProgramScantimecanhavesignificanteffectsonoverallperformanceofthesystemintermsofDataAcquisitionandControl.FastI/Ocardsandhighbandwidthdeterministicnetworkscanringdatafromthefieldtotheprocessor,butiftheprogramsarenotoptimized,theoutputscannotbeupdated.

ControlLogixhasbuiltingranularityintermsofprogrammanagement.Thislabusesaliveapplicationtodrivehomesomeofthespecificsofthemulti-taskmodelofControlLogix.

Objectives

1.MonitorandUnderstandScanTimeandtheoverheadtimesliceparameter.

2.Creatingperiodictaskandunderstandingtheeffectsofscanrateandpriorityandtheirinter-dependence.

3.Creatinganadditionalprograminoneofthetaskandunderstandingtheeffectsonscantime.

ToolsyouneedforthisLab

∙TwoControlLogixdemounitsconnectedoncontrolnet.

∙RSLogix5000

∙RSLinks2.2

 

FactsonScanTime:

ProgramScanTime:

Scantimeofindividualprogramwithinatask.Thistimerepresentsthetimeittakestoscantheprogram,notincludinginterruptions.

MaximumTaskScanTime:

MaximumScantimeaparticulartaskusedsincethetimeitwasscheduled.

 

TaskModelinControlLogix

Objective1-UnderstandingScanTimeandoverheadtimeslice

YourActions

StarttheProjectcalledPVCComponding_Lab.

1.

Expandthemaintaskintheorganizerandnoticethenumberofsubroutinesintheprogram.Asasidenote,noticesomeofthennuancesofthisactualapplication:

a.

Afairlylargenumberofuser-definedstructuresbeingusedinthisapplication.

b.ThevariousInputOutputmodules.

Anyway,goingbacktothetaskathand,selectthemaintaskandrightclickwithyourmouse.Godowntothepropertiesandthenclickontheconfigurationtab.

2.

NoticethescanTimesinmicroseconds.TheMaxrepresentsthemaximumtimethecontrollertooktoprocesstheentireprogramtillnow.Thelastindicatesthetimetakenbythelastscantooktoexecutetheprogram

TaskModelinControlLogix

Objective1-UnderstandingScanTimeandoverheadtimeslice

3.NotedownthisvaluesintheTaskModelWorkSheet1atSl.No.1

4.ResettheMaxScanandnoticetheupdatedmaximumscan.NotedownthesevaluesontheTaskModelWorkSheet1atSl.No.2

TaskModelWorkSheet1

SLNo

Activity

RecordedTime

1

MainTaskMaximumTimeinmicroSeconds

2

MainTaskMaximumTimeinmicrosecondsafterresetting.

5.

RightclicktoselectpropertiesunderthecontrollercalledPVC_Compounding.NowclickontheAdvancedtabinthefolder.NoticetheSystemOverheadtimeslice.ChangethesystemOverHeadtimeslicefrom10to90%(afterchangingpressapply)andmonitortheeffectthishasonthemaintaskscantime(afterrecordingtheeffectresetthemaximumtime).RecordyourobservationsintheWorkSheet2below:

 

TaskModelinControlLogix

Objective1-UnderstandingScanTimeandoverheadtimeslice

WorkSheet2

SLNo.

SystemOverHeadTimeSlice.

MainTaskMaximumTimeMicroSec.

1

10

2

20

3

30

4

40

5

50

6

60

7

70

8

80

9

90

6.Getintoadiscussionwithintheclasswiththehelpofyourinstructortovalidateyourfindings.Theauthor’scommentsonthiscanbefoundattheendofthislab.

 

FACTS:

TheLogix5000allowsyoutoallocateapercentageoftheCPUtimetoperformthebackgroundCPUfunctions(likeprogramterminalsupport,CommunicationswithHMI,Re-establishandmonitorIOconnectionsandstatus,ControlLogixmessagingetc).Bydefault,thistimeissetto10%.Whichmeansthatforevery10millisecondofcontinuoustaskexecution,amillisecondisassignedtotheCPUoverheadfunction.

 

TaskModelinControlLogix

Objective1-UnderstandingScanTimeandoverheadtimeslice

Analysis

Thedatarecordedinworksheet2canbeplottedasabove.Asweincreasetheoverheadtimesliceparameterthemaintasktimegoesonincreasing.SothereasonablevaluefortheOverHeadtimesliceparameterisintherangeof10%to35%.

Thereareapplicationswherenotonlythecontrollerhastohandlelotofcommunicationtaskbutalsoneedtoexecutesomesectionsoftheplantatadeterministicrate.Forexamplewewanttohaveanoverheadtimesliceof45%sothattheHMIdatagetsreportedatafasterrate.Thiswouldmeanwecan’texecutetheentireprogram(refertheplot)fasterthen4000microseconds.Butifwestillneedasectionoftheprogramtoexecuteatadeterministicrateweneedtoputthatpartoftheprograminaperiodictask.

TaskModelinControlLogix

Objective2-Effectsofscanrateandpriority

YourActions

7.

Letusinvestigatewhatthisprogramachieves.Notethattheroutine“Master”controlsthenestingtotheotherroutinesthatyouseebelow.

8.

DoubleClickandopenthe“Master”routine.Youwillnoticethatthisroutineexecutestheentireprograminthreesections:

Sequencing,MixingandAuxiliaryoperations.

TaskModelinControlLogix

Objective2-Effectsofscanrateandpriority

Youcanrightclickoneachofthesubroutinestocheckthecross-reference.

TaskModelinControlLogix

Objective2-Effectsofscanrateandpriority

 

WewillassumethatitisveryimportanttoexecutethesectionsMixingandSequencingfasterthen4000microseconds.

9.Toachievedeterminismwedividethisprogramintotwoperiodictasksinthenextsection.

PeriodicTasks

TaskModelinControlLogix

Objective2-Effectsofscanrateandpriority

 

TosaveontimeloadtheApplicationProgramnamedPVCCompounding_MultiProgramandmovetopoint19

10.TocreateClickontaskandrightclick,Navigateto[NewTask].Provideataskname(MixingOperation)andsayOK.

TaskModelinControlLogix

Objective2-Effectsofscanrateandpriority

11.Similarlycreateanothertaskcalledsequencing.

12.NowgotothejustcreatedtaskcalledMixing_OperationandrightclickandnavigatetoNewProgram.ProvideanametotheprogramMixer_Section1_B.NowgobacktothecreatedtaskcalledmixingoperationandcreateanotherprogramcallitMixer_Section2_B.

13.CreateaprogramcalledIO_Section_1undertheperiodictaskMixing_Operation.

14.Nowremovetheassignedroutinefromthemainprogrambyrightclickingonthemainprogramandselecting

TaskModelinControlLogix

Objective2-Effectsofscanrateandpriority

15.

Nowdragonesubroutineatatimeandputthemintorespectiveprogramsintheperiodictasks.Onceyoucompletethis,yourorganizershouldlooklikethis.

16.DeletethesubroutinecalledMaster.

TaskModelinControlLogix

Objective2-Effectsofscanrateandpriority

17.Gotothemainprogramandrightclickandgotoproperties.Nowclickontheconfigurationtab.AsianthemainroutineastheMixer1.

18.Similarlyontheassignthefirstroutinestothemaininalltheprograms.

∙Mixing_Section1_BwithMix1_B4_Seq

∙I_O_Section1withA1_Seq

19.DownLoadtheprogramandGoOnLine.

FACT:

TheLogix5550providetheabilitytocreateupto32tasks

oneContinuosand31Periodic

Aperiodictaskcanbeconfiguredtoexecuteaslowas1mSec.Eventhoughthetaskistriggeredat1mstheoperatingsystemcausessomedelaybeforegivingthecontrolover.

AttheendofeachprogramtheoperatingsystemperformsanupdateofIOwhichtakessomeextraprocessingtime.

TaskModelinControlLogix

Objective2-Effectsofscanrateandpriority

 

20.PullouttheformcalledTaskModelWorksheet3filedattheendofthislab.

21.NowrightclickonthemaintaskandnavigatetopropertiesandselecttheconfigurationTab.Similarlyopentheconfigurationtabsoftheothertwoperiodictasks.Arrangethemonthescreen.Yourscreenwilllooklikethis.

22.Setthepriorityofthemixingoperationtaskas1.Andthenchangetherateto1.5ms.

23.Monitortheeffectontheothertwotasks.RecordyourobservationsonTaskModelWorksheet3(onthenextpage).Forthevariousoptionsprintedintheformrecordyourobservations

24.Co-relateyourobservationstoyourunderstandingofthetaskmodel.

25.Engageageneraldiscussionwithyourpartnersandtheclasswiththehelpofyourinstructorontherecordedresults.

TASKMODELWORKSHEET3

MainTask

Sequencing

MixingOperations

LastScan

Priority

PeriodicRate

MaxRate

LastSan

Priority

 

PeriodicRate

MaxRate

LastScan

 

1

1.5

2

1

2

2

3.7

1

5

2

3.7

1

7

2

3.7

1

5

2

3.7

1

2

2

3.7

1

1.5

2

1.5

1

1.5

2

1.5

1

1.5

2

1.5

1

1.5

2

5

2

1.5

2

1.5

2

3

2

3

2

5

2

5

2

5

2

1.5

2

3

2

1.5

2

2

5

2

2

3

2

2

TaskModelinControlLogix

Objective2-Effectsofscanrateandpriority

Analysis

Usingperiodictaskwecanrunasectionoftheplantoraportionoftheprogramatapreconfigureddeterministicrate.

Thisaddsdeterminismandmodularityintheprogram.

TaskModelinControlLogix

Objective3-EffectofadditionalProgramonScanTime

YourActions

TosavetimepleaseloadtheprogramPVCcompoundingLab1applicationprogram

1.NowgotothecreatedtaskcalledMixingOperationandrightclickandnavigatetoNewProgram.ProvideanametotheprogramMixer_Section2_B.

Assignthefirstroutinestothemaininalltheprogram.

∙Mixing_Section2_BwithMix2_B4_Seq

 

2.Theorganizershouldappearasshownabove.

 

TaskModelinControlLogix

Objective3-EffectofadditionalProgra

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 人文社科 > 视频讲堂

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1