版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
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. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年安全保護(hù)服務(wù)項目提案報告模稿
- 成都四川成都市成華區(qū)市場監(jiān)督管理局招聘編外聘用制工作人員2人筆試歷年典型考點(頻考版試卷)附帶答案詳解
- 2024-2025學(xué)年延安市寶塔區(qū)三年級數(shù)學(xué)第一學(xué)期期末聯(lián)考試題含解析
- 有關(guān)中學(xué)校長工作述職報告3篇
- 專業(yè)求職信模板7篇
- 2025年活動策劃項目立項申請報告模板
- 2025年手提秤項目申請報告模板
- 關(guān)于個人護(hù)士述職報告范文5篇
- 話務(wù)員工作總結(jié)合集13篇
- 2024年皮毛批發(fā)銷售協(xié)議樣本版B版
- 大氣污染控制課程設(shè)計采用電除塵器和濕式脫硫技術(shù)來處理高硫無煙煤
- 國開稅收基礎(chǔ)形考任務(wù)1-4試題及答案
- 重慶市安全員A證考試題庫附答案(推薦)
- 小學(xué)中低年級學(xué)生音樂節(jié)奏感的培養(yǎng)策略研究 論文
- 小學(xué)六年級數(shù)學(xué)計算題100道(含答案)
- 一年級數(shù)學(xué)上冊《寒假作業(yè)》30套
- 沈陽來金汽車零部件股份有限公司改擴(kuò)建項目環(huán)評報告
- 鄉(xiāng)鎮(zhèn)衛(wèi)生院綜合考核基衛(wèi)部分評分表
- 江蘇省2023年生物小高考試題含答案解析
- 2021年1月北京朝陽初二(上)期末歷史試卷及答案
- 嶺南版六年級上冊美術(shù)18課考試復(fù)習(xí)資料
評論
0/150
提交評論