




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
本科畢業設計(論文)外文文獻翻譯學院:物理與電子工程學院專業:電子信息工程姓名:學號:外文出處:S7-200新版英文手冊CreatingaProgramforthePositionModule附件:1.外文資料翻譯譯文;2.外文原文。
附件1:外文資料翻譯譯文創建位控模塊程序1、位模塊的特性1.1位模塊可提供單貯軸、開環移動控制所需的功能和性能①提供高速控制,從每秒12個脈沖至每秒200,000個脈沖②支持急停(S曲線)或線性的加速,減速功能③提供可組態的測量系統,既可以使用工程單位(如英寸或厘米)也可以使用脈沖數④提供可組態的螺距誤差補償⑤支持絕對、相對和手動的位控方式⑥提供連續操作⑦提供多達25組的移動包絡,每組最多可有四種速度⑧提供4種不同的參考點尋找模式,每種模式都可對起始的尋找方向和最終的接近方向進行選擇⑨提供可拆卸的現場接線端子便于安裝和拆卸。1.2位模塊編程STEP7-MicroNVIN為位控模塊的組態和編程提供便捷的工具。遵循以下步驟即可:①組態位控模塊。STEP7-MicroNVIN提供一個位控向導,可生成組態/包絡和位控指令。②測試位控模塊的操作。STEP7-MicroNVIN提供一個EM253位控面板,用以測試位控模塊的輸入、輸出接線組態以及移動路徑的執行。③創建S7-200的執行程序。位控向導自動生成位控指令。可以將這些指令插入你的程序中:要使能位控模塊,插入一個POSx_CTRL指令。用SM0.0(始終接通)以確保這條指令在每個循環周期中都得到執行。要將電機移動到一個指定位置,使用一條POSx_GOTO或使用一條POSx_RUN指令。POSx_GOT指令使電機移動到在程序中輸入的指定位置。POSx_RUN指令則使電機按照在位控向導中所組態的路線移動。要使用絕對坐標進行移動,必須為應用建立零坐標位置。使用一條POSx_RSEEK或一條POSx_LDPOS指令建立零位置。位控向導生成的其它指令為典型應用提供功能,對于特定的應用來說,這些指令是可以選的。④編譯您的程序并將系統塊、數據塊和程序塊下載到S7-200中。2、組態位控模塊要進行位移控制必須為位控模塊創建組態/包絡表。位控向導引導您一步一步完成整個組態過程,非常便捷。使用位控向導可離線創建組態/包絡表。您可以在不連接S7-200CPU及位控模塊的情況下進行組態。要運行位控向導,必須對項目進行編譯并選擇符號尋找方式。啟動位控向導,可以點擊瀏覽條中的工具圖標,然后雙擊位控向導圖標,或者選擇菜單命令Toos>MotionControlwizard2.1輸入位控模塊的位置您必須輸入模塊類型和位置以便定義模塊參數并為您的應用定義移動包絡。位控向導可自動讀取智能模塊的位置,從而簡化這個任務。您只需點擊模塊按鈕。對于硬件版本1.2之前的S7-200CPU,智能模塊必須安裝在緊鄰CPU的位置以便使用位控向導對模塊進行組態。2.2選擇測量類型您必須選擇測量系統,以便在整個組態使用。您可以選擇使用工程單位或脈沖。如果您選擇脈沖則不必再定義其它信息。如果選擇工程單位,您必須輸入以下數據:使電機轉一周所需的脈沖數(參考電機或驅動的參數),測量的基本單位(如英寸、英尺、米或厘米),以及電機轉一周所引起的位移量(或“單位”)。STEP7-Micro/WIN提供一個EM253控制面板,對已組態的位控模塊,通過該面板可修改每周的單位數。如果您在以后改變了測量系統,必須刪除整個組態,包括位控向導生成的所有指令。您必須輸入與新的測量系統一致的選項。2.3輸入點動參數點動命令用于將工作以手動方式移動到指定位置。使用位控向導,可以指定以下拖動參數值:①JOG_SPEED:JOGSPEED(電機的拖動速度)是點動命令有效時能夠得到的最大速度。②JOG_INCREMENT:是瞬間的點動命令能夠將工件移動的距離。2.4輸入加速和減速時間作為位控模塊組態的一部分,您必須設置加速和減速時間。加速時間和減速時間的缺省設置都是1秒。通常,電機可在小于1秒的時間內工作。您要以毫秒為單位設定:①ACCEL_TIME:電機從SS_SPEED速度加速到MAX_SPEED速度所需的時間。缺省值=1000ms②DECEL_TIME:電機從MAX_SPEED速度減速到SS_SPEED速度所需的時間。缺省值=1000ms.2.5輸入急停時間急停時間通過減小移動包絡中加速和減速部分急停(改變率)來平滑移動控制。減少急停能夠改善位置追蹤的性能。急停時間也被稱為“S曲線包絡”。急停只能用于簡單的單步包絡這種補償同樣的作用于加速曲線和減速曲線的開始和結束部分。急停補償不能夠用于介于零速SS_SPEED速度之間的初始段和結束段中。內可以輸入一個時間值(JERK_TIME)來指定急停補償。這一時間是加速度的改變從零到最大所需的時間,由參數MAX_SPEED、SS_SPEED和ACCEL_TIME或與之相應的DECEL_TIME來定義,與只是簡單的相加ACCEL_TIME和DECEL_TIME相比,一個較長的急停時間由于能夠對整個循環時間只有一個較小的相加,從而可以產生平滑的操作。零值代表沒有補償。(缺省=0ms)2.6組態RP尋找順序您可以為位控模塊組態參考點尋找的順序為一個簡化了的缺省的RP尋找順序。您可以為RP搜尋順序作以下選擇:①RP尋找模式0:不執行RP尋找順序②RP尋找模式1:RP位于RPS輸入有效區接近工作區的一邊開始的位置上。③RP尋找模式2:RP位于RPS輸入有效區的中央。④RP尋找模式3:RP位于RPS輸入有效區之外。RP_Z_CNT指定了在RPS失效之后應接受多少個ZP(零脈沖)輸入⑤RP尋找模式4:RP通常位于RPS輸入的有效區內。RP_Z_CNT指定在RPS激活后應接受多少個ZP(零脈沖)輸入。2.7組態位控模塊的移動包絡一個包絡是一個預先定義的移動描述,它包括一個或多個速度,影響著運動從起點到終點。即使不定義包絡也可以使用模塊,位控向導為您提供一個指令子程序(POSx_GOTO),可用于移動位控。①包絡數:您最多可選擇25個包絡②命令字節的地址:您必須為位控模塊輸入一個輸出(Q)區地址作為命令字節。③組態/包絡表的地址:您必須為組態/包絡表輸入起始的儲存區域地址,以儲存位控模塊的組態數據以及所有包絡的數據。位控模塊的組態數據需要92個字節的V儲存區,每一個包絡需要34個字節的V儲存區。例如,帶有一個包絡的位控模塊其組態/包絡表需占用的V區數量是126字節。位控向導能夠向您建議一個大小合適的未經使用的V儲存區地址。2.8定義移動包絡位控向導提供移動包絡定義,在這里,您可以為您的應用定義每一個移動包絡。對每一個包絡,您可以選擇操作模式并為每個包絡的各部定義指標。位控向導中可以為每個包絡定義一個符號名,其作法是在您定義包絡時為其輸入的一個符號名即可。當您完成包絡的組態后,可以儲存組態并將參數打印出來。①選擇包絡的操作模式:您要按照操作模式對包絡進行組態,是絕對位置還是相對位置,是單一速度的連續轉動還是以上兩種速度連續轉動。②創建包絡的步:一個步是一個包絡移動的一個固定距離,包括加速和減速時間內的距離。每個包絡最多可有4個步。您要為每個步指定目標速度和結束位置。如果不止一步,只需點擊新一步標簽(NewStep)并輸入包絡中每一步的信息。點擊步驟畫圖標簽(PlotStep),您能夠看到由位控向導計算,以圖形方式表達出來的步。這樣,您就能夠很容易的隨時瀏覽并編輯每一個步。2.9完成對位控模塊的組態當您完成對位控模塊的組態時,只需點擊完成(Finsh),然后位控向導會執行以下任務:①將模塊的組態和包絡表插入到您的S7-200程序的數據中。②為位控參數生成一個全局符號表③在項目的程序中增加位控指令子程序,您可以在應用中使用這些指令要修改任何組態或包絡信息,您可以再次運行位控向導。3、由位控向導生成的位控模塊位控向導能夠根據位控模塊的位置和您對模塊的組態生成唯一的指令子程序,從而使位控模塊的控制變得非常容易。每條位控指令都有一個前綴“POSx_”這里X哈斯模塊位置。由于每個位控指令是一個子程序,11條位控指令使用11個子程序。3.1位控指令使用指南您必須確保在同時只有一條位控指令是激活的。您可以在一個中斷程序中執行POSx_RUN和POSx_GOTO。但是,當模塊正忙于處理其它指令時,千萬不要試圖在中斷程序中啟動指令。如果您在一個中斷程序中啟動一條指令,您可以使用POSx_CTRL指令的輸出來監控位控模塊是如何完成運動的。位控向導按照您所選的測量系統自動組態速度參數(Speed和C_Speed)和位置參數(Pos或C_Pos)的數值。對于脈沖,這些參數是雙整數,對于工程單位,這些參數是您所選的參數的實數值。例如:選厘米(cm)為單位,位控參數單位則存為以厘米為單位的一個是數值,速度參數則選擇一個每秒若干厘米的實數值(cm/sec.)。以下是特定的運動控制任務所需的位控指令:①在您的用戶程序中插入POSx_CTRL,并以SM0.0為條件使之每個循環都執行。②要指定到一個絕對位置,您必須首先使用POSx_RSEEK或POSx_LDPOS指令建立零位置。③要移動到某個特定位置,根據您程序在的輸入,使用POSx_GOTO指令。④要運行您在位控向導中所組態的運動包絡,使用POSx_RUN指令。其它位置指令是可選的3.2POSx_CTRL指令POSx_CTRL指令在S7_200的每次轉換為RUN模式時自動向位控模塊發出指令,裝載組態/包絡表,從而實現位控模塊的使能和初始化。這條指令在您的項目中只使用一次,并且要確保您的用戶程序在每一循環中調用該指令。使用SM0.0(通用)作為EN參數的輸入。EN參數必須為接通狀態以確保其它位控指令發送命令給位控模塊。如果EN參數為斷開狀態。位控模塊放棄所有正在進行當中的模塊。POSx_CTRL指令的輸出參數提供位控模塊當前的狀態。當位控模塊完成指令后,參數Done接通。參數Error包含指令的執行結果。參數C-Pos是模塊的當前位置。基于測量的單位,該值可以是一個脈沖數(雙整數)或者工程單位數(實數)。參數C_Speed提供模塊的當前速度。如果您組態的模塊的測量系統是脈沖,C_Speed是一個每秒脈沖數的長整數。如果您組態測量系統工程單位。C_Speed是一個每秒若干個所選工程單位數的實數。參數C_Dir指示電機的當前方向。3.3POSx_MAN指令POSx_MAN指令(手動模式)將位控模塊置于手動模式。這種模式下,電機可以以不同的速度沿正向或反向點動。當POSx_MAN指令使能時,只能運行POSx_CTRL和POSx_DIS指令。RUN、JOG_P或JOG_N的輸入你只能同時使能一個。使能RUN(RUN/Stop)參數則命令位控模塊指定方向(參數Dir)加速到指定速度(參數Speed)。你可以在電機運行時改變速度值,但參數Dir必須保持恒定。禁止參數RUN則命令位控模塊減速至電機停止。使能參數JOG_P(點動正轉)或JOG_N(點動反轉)命令位控模塊沿正向或反向點動。如果JOG_P或JOG_N有效的時間短于0.5秒,位控模塊則輸出脈沖運動到JOG_INCREMENT所指定的距離。如果JOG_P或JOG_N的有效時間等于或長于0.5秒,位控模塊則開始加速到JOG_SPEED所指定的速度。3.4POSx_GOTO指令指令POSx_GOTO命令位控模塊走到指定位置。接通EN位使能該指令。確保EN位始終保持接通直到Done位指示指令完成。接通參數START向位控模塊發送一個GOTO命令。當參數START接通且位控模塊不忙時,每一循環都會向位控模塊發生一條GOTO命令。要確保只發送一條GOTO命令,使用邊沿檢測來觸發START參數。參數POS包含一個表示運動位置(對于絕對運動)或運動距離(對于相對運動)的值。基于所選的測量系統,該值可以是一個脈沖數(雙整數)或工程單位數(實數)。參數Speed決定了運動的最大速度。基于測量單位,該值可以是每秒脈沖數(雙整數)或每秒工程單位數(實數)。3.5POSx_LDOFF指令POSx_LDOFF指令(裝載參考點偏移量)建立一個新的零位置,它與參考點位置不在同一處。執行這條指令之前,必須首先決定參考點的位置,還要把機器移動到起始位置,當該指令發送LDOFF命令時,位控模塊計算起始位置(當前位置)與參考點之間的偏移量。然后,模塊將計算所得的偏移量存為參數RP_OFFSET的值并將當前位置設為0。這樣就將起始位置設為零位置。如果出現故障,電機找不到它的位置了(如,掉電或被手動重新定位),可以使用POSx_RSEEK指令自動地重建零位置。接通EN位可使能該指令。確保EN位保持接通直至Done位指示該指令完成。接通參數START則向位控模塊發送一條LDOFF指令。每一循環周期,只要參數START接通且位控模塊不忙,該指令向位控模塊發送一條LDOFF命令。要確保該指令只發送一次,使用邊沿檢測以脈沖觸發參數START接通。3.6POSx_LDPOS指令POSx_LDPOS指令(裝載位置)改變位控模塊的當前位置。你也可以使用這條指令為絕對命令建立一個新的零位置。接通EN位使能該指令。確保EN位始終保持接通直到Done位指示指令完成。接通參數START向位控模塊發送一個LDPOS命令。每一循環周期,參數START接通且位控模塊不忙時,該指令向位控模塊發送一條LDPOS命令。要確保只發送一條該命令,使用邊沿檢測來觸發START參數接通。參數New_Pos提供一個新值替換位控模塊在絕對運動中報告并使用的當前位置值。基于測量單位,該值可以是一個脈沖數(雙整數)或工程單位數(實數)。模塊完成該指令時,參數Done接通。3.7POSx_DIS指令POSx_DIS指令可接通或斷開位控模塊的DIS輸出。您可以使用DIS輸出來使能或禁止,電機控制器。如果您要使用位控模塊上的DIS輸出,那么,這條指令可以在每一循環周期內調用,或者只在您需要改變DIS輸出時調用。EN位接通時使能該指令,參數DIS_ON控制位控模塊的DIS輸出。3.8POSx_CLR指令POSx_CLR指令(觸發CLR輸出)命令位控模塊在CLR輸出上生成一個50ms的脈沖。接通EN位使能該指令。確保EN位始終保持接通直到Done位指示指令完成。接通參數START向位控模塊發送一個CLR命令。每一循環周期,參數START接通且位控模塊不忙時,該指令向位控模塊發送一條CLR命令。要確保只發送一條該命令,使用邊沿檢測來觸發START參數接通。模塊完成該指令時,參數Done接通。3.9POSx_CFG指令POSx_CFG指令(重新裝載組態)命令位控模塊從組態/包絡表指針所指定的地方讀取組態。位控模塊將新的組態與現有的組態進行比較并執行所有需要的設置改變或重新計算。接通EN位使能該指令。確保EN位始終保持接通直到Done位指示指令完成。接通參數START向位控模塊發送一個CFG命令。每一循環周期,參數START接通且位控模塊不忙時,該指令向位控模塊發送一條CFG命令。要確保只發送一條該命令,使用邊沿檢測來觸發START參數接通。模塊完成該指令時,參數Done接通。附件2:外文原文CreatingaProgramforthePositionModule1、FeaturesofthePositionModule1.1ThePositionmoduleprovidesthefunctionalityandperformancethatyouneedforsingle-axis,open-looppositioncontrol:①Provideshigh-speedcontrol,witharangefrom12pulsespersecondupto200,000pulsespersecond②Supportsbothjerk(Scurve)orlinearaccelerationanddeceleration③Providesaconfigurablemeasuringsystemthatallowsyoutoenterdataeitherasengineeringunits(suchasinchesorcentimeters)orasanumberofpulses④Providesconfigurablebacklashcompensation⑤Supportsabsolute,relative,andmanualmethodsofpositioncontrol⑥Providescontinuousoperation⑦Providesupto25motionprofiles,withupto4speedchangesperprofile⑧Providesfourdifferentreference-pointseekmodes,withachoiceofthestartingseekdirectionandthefinalapproachdirectionforeachsequence⑨Providesremovablefieldwiringconnectorsforeasy1.2ProgrammingthePositionModuleSTEP7–Micro/WINprovideseasy-to-usetoolsforconfiguringandprogrammingthePositionmodule.Simplyfollowthesesteps:①ConfigurethePositionmodule.STEP7–Micro/WINprovidesaPositionControlwizardforcreatingtheconfiguration/profiletableandthepositioninstructions.②TesttheoperationofthePositionModule.STEP7–Micro/WINprovidesanEM253controlpanelfortestingthewiringoftheinputsandoutputs,theconfigurationofthePositionmodule,andtheoperationofthemotionprofiles.Seepage274forinformationabouttheEM253controlpanel.③CreatetheprogramtobeexecutedbytheS7-200.ThePositionControlwizardautomaticallycreatesthepositioninstructionsthatyouinsertintoyourprogram.Insertthefollowinginstructionsintoyourprogram:–ToenablethePositionmodule,insertaPOSx_CTRLinstruction.UseSM0.0(AlwaysOn)toensurethatthisinstructionisexecutedeveryscan.–Tomovethemotortoaspecificlocation,useaPOSx_GOTOoraPOSx_RUNinstruction.ThePOSx_GOTOinstructionmovetoalocationspecifiedbytheinputsfromyourprogram.ThePOSx_RUNinstructionexecutesthemotionprofilesyouconfiguredwiththePositionControlwizard.–Touseabsolutecoordinatesforyourmotion,youmustestablishthezeropositionforyourapplication.UsetheaPOSx_RSEEKoraPOSx_LDPOSinstructiontoestablishthezeroposition.–TheotherinstructionsthatarecreatedbythePositionControlwizardprovidefunctionalityfortypicalapplicationsandareoptionalforyourspecificapplication.④Compileyourprogramanddownloadthesystemblock,datablock,andprogramblocktotheS7-200.2、ConfiguringthePositionModuleYoumustcreateaconfiguration/profiletableforthePositionmoduleinorderforthemoduletocontrolyourmotionapplication.ThePositionControlwizardmakestheconfigurationprocessquickandeasybyleadingyoustep-by-stepthroughtheconfigurationprocess.ThePositionControlwizardalsoallowsyoutocreatetheconfiguration/profiletableoffline.YoucancreatetheconfigurationwithoutbeingconnectedtoanS7-200CPUwithaPositionmoduleinstalled.TorunthePositionControlwizard,yourprojectmusthavebeencompiledandsettosymbolicaddressingmode.TostartthePositionControlwizard,eitherclicktheToolsiconinthenavigationbarandthendouble-clickthePositionControlWizardicon,orselecttheTools>PositionControlWizard2.1EnteringtheLocationofthePositionModuleYoumustdefinetheparametersforyourmoduleandthesetofmotionprofilesforyourapplicationbyenteringthemoduletypeandlocation.ThePositionControlwizardsimplifiesthistaskbyautomaticallyreadingthepositionoftheintelligentmodule.YouonlyhavetoclicktheReadModulesbutton.ForanS7-200CPUwithfirmwarepriortoversion1.2,youmustinstalltheintelligentmodulenexttotheCPUinorderforthePositionControlwizardtoconfigurethemodule.2.2SelectingtheTypeofMeasurementYoumustselectthemeasurementsystemtobeusedthroughouttheconfiguration.Youcanselecttouseeitherengineeringunitsorpulses.Ifyouselectpulses,youdonothavetospecifyanyotherinformation.Ifyouselectengineeringunits,youmustenterthefollowingdata:thenumberofpulsesrequiredtoproduceonerevolutionofthemotor(refertothedatasheetforyourmotorordrive),thebaseunitofmeasurement(suchasinch,foot,millimeter,orcentimeter),andtheamountofmotion(or“units”)providedbyonerevolutionofthemotor.STEP7–Micro/WINprovidesanEM253ControlPanelthatallowsyoutomodifythenumberofunitsperrevolutionafterthePositionmodulehasbeenconfigured.Ifyouchangethemeasurementsystemlater,youmustdeletetheentireconfigurationincludinganyinstructionsgeneratedbythePositionControlwizard.Youmustthenenteryourselectionsconsistentwiththenewmeasurementsystem.2.3EnteringtheJogParametersTheJogcommandisusedtomanuallymovethetooltoadesiredlocation.UsingthePositionControlwizard,youspecifythefollowingJogparametersvalues:①JOG_SPEED:TheJOG_SPEED(Jogspeedforthemotor)isthemaximumspeedthatcanbeobtainedwhiletheJOGcommandremainsactive.②JOG_INCREMENT:DistancethatthetoolismovedbyamomentaryJOGcommand.2.4EnteringtheAccelerationandDecelerationTimesAspartoftheconfigurationforthePositionmodule,yousettheaccelerationanddecelerationtimes.Thedefaultsettingforboththeaccelerationtimeandthedecelerationtimeis1second.Typically,motorscanworkwithlessthan1second.Youspecifythefollowingtimesinmilliseconds:①ACCEL_TIME:TimerequiredforthemotortoacceleratefromSS_SPEEDtoMAX_SPEED.Default=1000ms②DECEL_TIME:TimerequiredforthemotortodeceleratefromMAX_SPEEDtoSS_SPEED.Default=1000ms2.5EnteringtheJerkTimeJerkcompensationprovidessmootherpositioncontrolbyreducingthejerk(rateofchange)inaccelerationanddecelerationpartsofthemotionprofile.SeeFigure9-9.Reducingjerkimprovespositiontrackingperformance.Jerkcompensationisalsoknownas“Scurveprofiling.”Jerkcompensationcanonlybeappliedtosimpleone-stepprofiles.Thiscompensationisappliedequallytothebeginningandendingportionsofboththeaccelerationanddecelerationcurve.JerkcompensationisnotappliedtotheinitialandfinalstepbetweenzerospeedandSS_SPEED.Youspecifythejerkcompensationbyenteringatimevalue(JERK_TIME).ThisisthetimerequiredforaccelerationtochangefromzerotothemaximumaccelerationdefinedbyMAX_SPEED,SS_SPEED,andACCEL_TIME,orequivalentlyforDECEL_TIME.AlongerjerktimeyieldssmootheroperationwithasmallerincreaseintotalcycletimethanwouldbeobtainedbysimplyincreasingtheACCEL_TIMEandDECEL_TIME.Avalueofzeroindicatesthatnocompensationshouldbeapplied.(Default=0ms)2.6ConfiguringtheRPSeekSequenceYoucanconfigurethesequencethatthePositionmoduleusestosearchforthereferencepoint.YoucanselectthefollowingoptionsfortheRPsearchsequence:①RPSeekmode0:DoesnotperformaRPseeksequence②RPSeekmode1:TheRPiswheretheRPSinputgoesactiveontheapproachfromtheworkzoneside.(Default)③RPSeekmode2:TheRPiscenteredwithintheactiveregionoftheRPSinput.④RPSeekmode3:TheRPislocatedoutsidetheactiveregionoftheRPSinput.RP_Z_CNTspecifieshowmanyZP(ZeroPulse)inputcountsshouldbereceivedaftertheRPSbecomesinactive.⑤RPSeekmode4:TheRPisgenerallywithintheactiveregionoftheRPSinput.RP_Z_CNTspecifieshowmanyZP(ZeroPulse)inputcountsshouldbereceivedaftertheRPSbecomesactive.2.7ConfiguringtheMotionProfilesforthePositionModuleAprofileisapre-definedmotiondescriptionconsistingofoneormorespeedsofmovementthateffectamovementfromastartingpointtoanendingpoint.Youdonothavetodefineaprofileinordertousethemodule.ThePositionControlwizardprovidesaninstructionsubroutine(POSx_GOTO)foryoutousetocontrolmoves.①Numberofprofiles:Youcanselectuptoamaximumof25profiles.②Addressforthecommandbyte:Youmustentertheoutput(Q)memoryaddressofthecommandbyteforthePositionmodule.③Addressfortheconfiguration/profiletable:Youmustenterthestartingmemoryaddressfortheconfiguration/profiletablethatstorestheconfigurationdataforthePositionmoduleandthedataforalloftheprofiles.TheconfigurationdataforthePositionmodulerequires92bytesofVmemory,andeachprofilerequires34bytesofVmemory.Forexample,theamountofmemoryrequiredfortheconfiguration/profiletableforaPositionmodulewithoneprofileis126bytesofVmemory.ThePositionControlwizardcansuggestanunusedVmemoryblockaddressofthecorrectsize.2.8DefiningtheMotionProfileThePositionControlwizardprovidesaMotionProfileDefinitionwhereyoudefineeachmotionprofileforyourapplication.Foreachprofile,youselecttheoperatingmodeanddefinethespecificsofeachindividualstepfortheprofile.ThePositionControlwizardalsoallowsyoutodefineasymbolicnameforeachprofilebysimplyenteringthesymbolnameasyoudefinetheprofile.Afteryouhavefinishedconfiguringtheprofile,youcansavetoconfigurationandprintacopyoftheparameters.①SelectingtheModeofOperationfortheProfileYouconfiguretheprofileaccordingthethemodeofoperation,eitheranabsoluteposition,arelativeposition,asingle-speedcontinuousrotation,oratwo-speedcontinuousrotation.②CreatingtheStepsfortheProfileAstepisafixeddistancethatatoolmoves,includingthedistancecoveredduringaccelerationanddecelerationtimes.Eachprofilecanhaveupto4individualsteps.Youspecifythetargetspeedandendingpositionforeachstep.Ifyouhavemorethanonestep,simplyclicktheNewStepbuttonandentertheinformationforeachstepoftheprofile.however,thereareotherpossiblecombinations.BysimplyclickingthePlotStepbutton,youcanviewagraphicalrepresentationofthestep,ascalculatedbythePositionControlwizard.Thisallowsyoutoeasilyandinteractivelyreviewandediteachstep.2.9FinishingtheConfigurationforthePositionModuleAfteryouhaveconfiguredtheoperationofthePositionmodule,yousimplyclickFinish,andthePositionControlwizardperformsthefollowingtasks:①InsertsthemoduleconfigurationandprofiletableintothedatablockforyourS7-200program②Createsaglobalsymboltableforthemotionparameters③AddsthemotioninstructionsubroutinesintotheprojectprogramblockforyoutouseinyourApplicationYoucanrunthePositionControlwizardagaininordertomodifyanyconfigurationorprofileinformation.3、PositionInstructionsCreatedbythePositionControlWizardThePositionControlwizardmakescontrollingthePositionmoduleeasierbycreatinguniqueinstructionsubroutinesbasedonthepositionofthemoduleandconfigurationoptionsyouselected.Eachpositioninstructionisprefixedwitha”POSx_”wherexisthemodulelocation.Becauseeachpositioninstructionisasubroutine,the11positioninstructionsuse11subroutines.3.1GuidelinesforUsingthePositionInstructionsYoumustensurethatonlyonepositioninstructionisactiveatatime.YoucanexecutethePOSx_RUNandPOSx_GOTOfromaninterruptroutine.However,itisveryimportantthatyoudonotattempttostartaninstructioninaninterruptroutineifthemoduleisbusyprocessinganothercommand.Ifyoustartaninstructioninaninterruptroutine,thenyoucanusetheoutputsofthePOSx_CTRLinstructiontomonitorwhenthePositionmodulehascompletedthemovement.ThePositionControlwizardautomaticallyconfiguresthevaluesforthespeedparameters(SpeedandC_Speed)andthepositionparameters(PosorC_Pos)accordingtothemeasurementsystemthatyouselected.Forpulses,theseparametersareDINTvalues.Forengineeringunits,theparametersareREALvaluesforthetypeofunitthatyouselected.Forexample:selectingcentimeters(cm)storesthepositionparametersasREALvaluesincentimetersandstoresthespeedparametersasREALvaluesincentimeterspersecond(cm/sec).Thefollowingpositioninstructionsarerequiredforspecificpositioncontroltasks:①InsertthePOSx_CTRLinstructioninyourprogramandusetheSM0.0contacttoexecuteiteveryscan.②Tospecifymotiontoanabsoluteposition,youmustfirstuseeitheranPOSx_RSEEKoraPOSx_LDPOSinstructiontoestablishthezeroposition.③Tomovetoaspecificlocation,basedoninputsfromyourprogram,usethePOSx_GOTOinstruction.④TorunthemotionprofilesyouconfiguredwiththePositionControlwizard,usethePOSx_RUNinstruction.Theotherpositioninstructionsareoptiona3.2POSx_CTRLInstructionThePOSx_CTRLinstruction(Control)enablesandinitializesthePositionmodulebyautomaticallycommandingthePositionmoduletoloadtheconfiguration/profiletableeachtimetheS7-200changestoRUNmode.Usethisinstructiononlyonceinyourproject,andensurethatyourprogramcallsthisinstructioneveryscan.UseSM0.0(AlwaysOn)astheinputfortheENparameter.TheENparametermustbeontoenabletheotherpositioninstructionstosendcommandstothePositionmodule.IftheENparameterturnsoff,thenthePositionmoduleabortsanycommandthatisinprogress.TheoutputparametersofthePOSx_CTRLinstructionprovidethecurrentstatusofthePositionmodule.TheDoneparameterturnsonwhenthePositionmodulecompletesanyinstruction.TheErrorparametercontainstheresultofthisinstruction.TheC_Posparameteristhecurrentpositionofthemodule.Basedoftheunitsofmeasurement,thevalueiseitheranumberofpulses(DINT)orthenumberofengineeringunits(REAL).TheC_Speedparameterprovidesthecurrentspeedofthemodule.IfyouconfiguredthemeasurementsystemforthePositionmoduleforpulses,C_SpeedisaDINTvaluecontainingthenumberofpulses/second.Ifyouconfiguredthemeasurementsystemforengineeringunits,C_SpeedisaREALvaluecontainingtheselectedengineeringunits/second(REAL).TheC_Dirparameterindicatesthecurrentdirectionofthemotor.3.3POSx_MANInstructionThePOSx_MANinstruction(ManualMode)putsthePositionmoduleintomanualmode.Thisallowsthemotortoberunatdifferentspeedsortobejoggedinapositiveornegativedirection.WhilethePOSx_MANinstructionisenabled,onlythePOSx_CTRLandPOSx_DISinstructionsareallowed.YoucanenableonlyoneoftheRUN,JOG_P,orJOG_Ninputsatatime.EnablingtheRUN(Run/Stop)parametercommandstothePositionmoduletoacceleratetothespecifiedspeed(Speedparameter)anddirection(Dirparameter).YoucanchangethevaluefortheSpeedparameterwhilethemotorisrunning,buttheDirparametermustremainconstant.DisablingtheRUNparametercommandsthePositionmoduletodecelerateuntilthemotorcomestoastop.EnablingtheJOG_P(JogPositiveRotation)ortheJOG_N(JogNegativeRotation)parametercommandsthePositionmoduletojogineitherapositiveornegativedirection.IftheJOG_PorJOG_Nparameterremainsenabledforlessthan0.5seconds,thePositionmoduleissuespulsestotravelthedistancespecifiedinJOG_INCREMENT.IftheJOG_PorJOG_Nparameterremainsenabledfor0.5secondsorlonger,themotionmodulebeginstoacceleratetothespecifiedJOG_SPEED.3.4POSx_GOTOInstructionThePOSx_GOTOinstructioncommandsthePositionModuletogotoadesiredlocation.TurningontheENbitenablestheinstruction.EnsurethattheENbitstaysonuntiltheDONEbitsignalsthattheexecutionoftheinstructionhascompleted.TurningontheSTARTparametersendsaGOTOcommandtothePositionmodule.ForeachscanwhentheSTARTparameterisonandthePositionmoduleisnotcurrentlybusy,theinstructionsendsaGOTOcommandtothePositionmodule.ToensurethatonlyoneGOTOcommandissent,useanedgedetectionelementtopulsetheSTARTparameteron.ThePosparametercontainsavaluethatsignifieseitherthelocationtomove(foranabsolutemove)orthedistancetomove(forarelativemove).Basedoftheunitsofmeasurementselected,thevalueiseitheranumberofpulses(DINT)ortheengineeringunits(REAL).TheSpeedparameterdeterminesthemaximumspeedforthismovement.Basedoftheunitsofmeasurement,thevalueiseitheranumberofpulses/second(DINT)ortheengineeringunits/second(REAL).3.5POSx_LDOFFInstructionThePOSx_LDOFFinstruction(LoadReferencePointOffset)establishesanewzeropositionthatisatadifferentlocationfromthereferencepointposition.Beforeexecutingthisinstruction,youmustfirstdeterminethepositionofthereferencepoint.Youmustalsomovethemachinetothestartingposition.WhentheinstructionsendstheLDOFFcommand,thePositionmodulecomputestheoffsetbetweenthestartingposition(thecurrentposition)andthereferencepointposition.ThePositionmodulethenstoresthecomputedoffsettotheRP_OFFSETparameterandsetsthecurrentpositionto0.Thisestablishesthestartingpositionasthezeroposition.Intheeventthatthemotorlosestrackofitsposition(suchasonlossofpowerorifthemotorisrepositionedmanually),youcanusethePOSx_RSEEKinstructiontore-establishthezeropositionautomatically.TurningontheENbitenablestheinstruction.EnsurethattheENbitstaysonuntiltheDonebitsignalsthattheexecutionoftheinstructionhascompleted.TurningontheSTARTparametersendsaLDOFFcommandtothePositionmodule.ForeachscanwhentheSTARTparameterisonandthePositionmoduleisnotcurrentlybusy,theinstructionsendsaLDOFFcommandtothePositionmodule.Toensurethatonlyonecommandissent,useanedgedetectionelementtopulsetheSTARTparameteron.TheDoneparameterturnsonwhenthemodulecompletesthisinstruction.3.6POSx_LDPOSInstructionThePOSx_LDPOSinstruction(LoadPosition)changesthecurrentpositionvalueinthePositionmoduletoanewvalue.Youcanalsousethisinstructiontoestablishanewzeropositionforanyabsolutemovecommand.TurningontheENbitenablestheinstruction.EnsurethattheENbitstaysonuntiltheDonebitsignalsthattheexecutionoftheinstructionhascompleted.TurningontheSTARTparametersendsaLDPOScommandtothePositionmodule.ForeachscanwhentheSTARTparameterisonandthePositionmoduleisnotcurrentlybusy,theinstructionsendsaLDPOScommandtothePositionmodule.Toensurethatonlyonecommandissent,useanedgedetectionelementtopulsetheSTARTparameteron.TheNew_PosparameterprovidesthenewvaluetoreplacethecurrentpositionvaluethatthePositionmodulereportsandusesforabsolutemoves.Basedoftheunitsofmeasurement,thevalueiseitheranumberofpulses(DINT)ortheengineeringunits(REAL).TheDoneparameterturnsonwhenthemodulecompletesthisinstruction.3.7POSx_DISInstructionThePOSx_DISinstructionturnstheDISoutputofthePositionmoduleonoroff.ThisallowsyoutousetheDISoutputfordisablingorenablingamotorcontroller.IfyouusetheDISoutputonthePositionmodule,thenthisinstructioncanbecalledeveryscanoronlywhenyouneedtochangethevalueoftheDISoutput.WhentheENbitturnsontoenabletheinstruction,theDIS_ONparametercontrolstheDISoutputofthePositionmodule.3.8POSx_CLRInstructionThePOSx_CLRinstruction(PulsetheCLROutput)commandsthePositionmoduletogeneratea50-mspulseontheCLRoutput.TurningontheENbitenablestheinstruction.EnsurethattheENbitstaysonuntiltheDonebitsignalsthattheexecutionoftheinstructionhascompleted.TurningontheSTARTparametersendsaCLRcommandtothePositionmodule.ForeachscanwhentheSTARTparameterisonandthePositionmoduleisnotcurrentlybusy,theinstructionsendsaCLRcommandtothePositionmodule.Toensurethatonlyonecommandissent,useanedgedetectionelementtopulsetheSTARTparameteron.TheDoneparameterturnsonwhenthemodulecompletesthisinstruction.3.9POSx_CFGInstructionThePOSx_CFGinstruction(ReloadConfiguration)commandsthe
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 鋼化玻璃采購合同
- 屋面綠化箱涵施工合同
- 商鋪轉讓租賃合同書
- 工程分包木工合同
- 制作安裝承包合同
- 建房施工安全合同書
- 建筑工程拆除分包勞務合同
- 擴大勞務分包規定合同
- 彩鋼瓦施工合同協議書
- 土工材料采購合同
- 第七章總體分布的擬合優度檢驗
- 哈爾濱工業大學教師崗位分級設置與聘任管理辦法
- 法院送達地址確認書(訴訟類范本)
- 技師承諾不涉黃協議書
- 中國骨科大手術靜脈血栓栓塞癥預防指南
- 資源環境與可持續發展PPT完整全套教學課件
- 2022年南陽市國企招聘考試真題及答案
- 《檔案管理概論》(肖秋惠編著)課后思考題及答案(參考)
- 西方經濟學(上下冊)PPT全套教學課件
- 新型(花籃螺栓)工字鋼懸挑梁腳手架講解
- 2023年高考地理一輪復習(新人教版) 第2部分第5章 課時63 中國國家發展戰略舉例
評論
0/150
提交評論