版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、Power PMAC Data StructuresJanuary 2012Power PMAC Data StructuresMain provided method of organizing Power PMAC informationBoth hardware (I/O) and software (memory) registersIncludes saved setup elements (like old I-variables)Includes unsaved control elementsIncludes read-only status elementsMostly re
2、places I & M-variable use of PMAC/Turbo PMACPre-defined by Delta TauUser cannot create own data structures/elements in Script environmentNo need to know numerical addresses of structure elementsMostly replaces “memory & I/O map” of PMAC/Turbo PMACAccessible through on-line commands, Script and C pro
3、gramsIDE has “intellisense” database of structure namesAutomatically presents possible “completions” as you typeCan select from list to finish nameF1 function key “help” provides full manual descriptionScript Environment AccessFrom both on-line commands and buffered program commandsStructure and ele
4、ment names are not case sensitiveNo need to “include” any header files for accessNo need to declare these pre-defined elementsScript environment automatically performs type-matchingNo need to worry about element data length or formatPower PMAC prevents user changes to “write-protected” elementsError
5、 returned for on-line command attemptBuffered program attempt results in “no-op” (no error reported, no abort)Power PMAC prevents out-of-range values from being assignedError returned for on-line command attemptBuffered program attempt results in “no-op” (no error reported, no abort)Classes of Data
6、Structure ElementsSaved setup elementsHave factory default values set on re-initialization ($*) command, or on power-up/reset with a fault or configuration changeLast-saved values copied from flash memory on normal power-up or resetPresent active values copied to flash memory on a save commandNon-sa
7、ved control elementsHave default values (usually 0) set on power-up, reset, re-initializationUser can set values at any time in applicationNot affected by save commandStatus elementsValues automatically set by Power PMACMost are write-protected in Script environmentSome permit user writing for speci
8、al operationsEach class of element has a separate chapter in Software ReferenceImportant Data StructuresSys.Global “system” elementsMotorx.Motor elements, indexed by Motor #Motorx.Servo.Motor servo algorithm elementsCoordx.Coordinate-system elements, indexed by CS #EncTablen.Encoder table elements,
9、indexed by entry #CompTablem.Comp table elements, indexed by table #Gate1i.DSPGATE1 Servo IC elements, by IC #Gate1i.Chanj.DSPGATE1 channel elements, by channel #Gate2i.DSPGATE2 MACRO IC elements, by IC #Gate2i.Chanj.DSPGATE2 channel elements, by channel #Gate3i.DSPGATE3 Servo IC elements, by IC #Ga
10、te3i.Chanj.DSPGATE3 channel elements, by channel #GateIoi.IOGATE I/O IC elements, by IC #Gather.Data gathering elementsMacro.MACRO ring elementsSpecifying Data Structure IndicesIndex is in square brackets, not in parenthesesIndex must be integer constant or local L-variableNo expressions, no fractio
11、nsIf calculating index value, must do this in separate program command that assigns value to L-variable, e.g.L0=Ldata.Motor;MotorL0.JogSpeed=100;Indices always start at 0Motorx. index value matches Motor number (#x)Coordx. index value matches C.S. number (&x)ASIC index value matches ASIC number (but
12、 ASIC numbering scheme different from Turbo PMAC)ASIC channel index (0 3) is one less than ASIC channel number (1 4)Constant index values can range from 0 to Sys.MaxItems - 1Variables used for index can range from L0 to L(1022 Sys.MaxItems)Specifying the Address of an ElementThe “.a” suffix added to
13、 the end of an element name specifies the “address of” the elementGenerally do not need to know the numerical value of this addressActual numerical value can vary with system type and compilationCan get numerical value by querying element name.aA “p” at the beginning of an element name specifies “po
14、inter to”These elements are set to an address valueWhen queried, Power PMAC reports back element name with “.a” suffix (if the address is that of a known element)Examples:Motor1.pDac=Gate14.Chan0.Pwm0.a/ Set motor output pointerMotor2.pDac/ Query motor output pointerGate14.Chan1.Pwm0.a/ Power PMAC r
15、esponseGate14.Chan0.Pwm0.a/ Query element address$d5700008/ Power PMAC responseC Access to Data StructuresMust include header file in C compilation build: #include Must access software elements with pshm-data structure elementC functions have pshm declared automaticallyIndependent C applications mus
16、t declare: e.g. struct SHM *pshm;Sys structure name is implicit: e.g. pshm-ServoPeriod (for Sys.ServoPeriod)Other structure names must be used: e.g. pshm-Motor1.JogSpeedMust respect variable type of each element according to C rulesElement names in C are case-sensitiveNo write-protection or out-of-r
17、ange/saturation protectionSome “internal use” elements not accessible (in lieu of write protection)For hardware elements, only “full-word” (32-bit) structure elements can be accessed from C programFull-word elements often contain multiple partial-word elementse.g. Gate1i.PwmCtrl contains Gate1i.PwmP
18、eriod and Gate1i.PwmDeadTimeMust mask (and maybe shift) to isolate “partial-word” elementScript full-word element of same name may be less than 32 bitse.g. in script, Gate1i.PwmCtrl is 24 bits (high 24 of 32)C Access to Hardware Data StructuresHardware (I/O) data structures not part of “pshm” shared memoryTwo methods of C access to hardware data structures1st ( mended) method: define you
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 貴州財(cái)經(jīng)職業(yè)學(xué)院《西方經(jīng)典戲劇鑒賞》2023-2024學(xué)年第一學(xué)期期末試卷
- 2025年江西建筑安全員-C證(專職安全員)考試題庫(kù)
- 2025江西省建筑安全員C證考試題庫(kù)
- 2025湖北省建筑安全員《C證》考試題庫(kù)及答案
- 2025山東省安全員-C證(專職安全員)考試題庫(kù)
- 廣州體育職業(yè)技術(shù)學(xué)院《物流管理信息系統(tǒng)》2023-2024學(xué)年第一學(xué)期期末試卷
- 2025黑龍江省建筑安全員知識(shí)題庫(kù)及答案
- 2025河南建筑安全員-C證(專職安全員)考試題庫(kù)
- 2025年重慶市安全員-C證考試題庫(kù)
- 中國(guó)China英文介紹
- 五年級(jí)數(shù)學(xué)(小數(shù)四則混合運(yùn)算)計(jì)算題專項(xiàng)練習(xí)及答案
- 《比特幣完整介紹》課件
- 當(dāng)食物成為撫慰:善待自己重塑大腦告別情緒性進(jìn)食
- 員工行為風(fēng)險(xiǎn)預(yù)警培訓(xùn)課件
- 水上交通行業(yè)安全培訓(xùn)
- 全域土地綜合整治規(guī)劃方案
- GB/T 26940-2023牡蠣干
- 黑龍江省哈爾濱市松北區(qū)2023-2024學(xué)年六年級(jí)上學(xué)期期末數(shù)學(xué)試題
- 鋼材深加工行業(yè)現(xiàn)狀分析報(bào)告
- 香港朗文英語(yǔ)2B期中試卷
- 慢性乙肝護(hù)理查房課件
評(píng)論
0/150
提交評(píng)論