




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 优惠寄递服务合同范例
- 不签就业合同范例
- 产业地产合同范例
- 会务公司招标合同范例
- 中标企业采购合同范例
- 内蒙古农村建房合同范例
- 借款利息合同范例6
- 上海车辆转让协议合同范例
- 不锈钢焊条合同范例
- 2025年语文a卷试题及答案六上
- QC/T 1091-2023 客车空气净化装置 (正式版)
- 2024年节水知识竞赛考试题及答案
- 2024年江苏医药职业学院单招职业适应性测试题库完整
- qc工作岗位职责
- 【体能大循环】聚焦体能循环-探索运动奥秘-幼儿园探究体能大循环有效开展策略课件
- 采购人员廉洁从业课件培训
- 2024年单招计算机试题题库及答案
- XX药业公司受试者日记卡
- 多组学数据的整合与分析
- 小学安全教育《平安校园 拒绝欺凌》刘伟【省级】优质课
- 静脉输液的不良反应及处理原则考核试题及答案
评论
0/150
提交评论