版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 【+初中语文+】第七单元课外古诗词诵读《过故人庄》课件++统编版(五四学制)六年级上册
- 吉林省长春市吉林省第二实验学校南湖校区2024-2025学年七年级上学期第二次月考数学试题(含简单答案)
- 广东省佛山市南海区九江镇儒林实验学校2024-2025学年八年级上学期12月学程调查物理试题(无答案)
- 黑龙江省哈尔滨市第三中学2024-2025学年高二上学期期中考试物理试卷(含答案)
- 医学教材 肠道传染病的护理管理与医院感染防控
- 《经典室内设计》课件
- 3.3 用电路实现比例运算
- 《北京道路分析》课件
- 《临床试验随机对照》课件
- 2024年高一上学期期末物理考点《匀变速直线运动的基本规律及推论的应用》含答案解析
- 第10课《人类社会及其发展规律》第1框《人类社会的存在与发展》同步课堂课件-【中职专用】《哲学与人生》
- 急救医疗管理系统(紫云)
- 中西文化鉴赏智慧树知到答案2024年郑州大学
- HG∕T 4693-2014 工业氟硅酸钾
- 国家开放大学本科《人文英语4》一平台机考真题及答案(第四套)
- 2024至2030年中国四川省智能制造行业市场发展现状及投资方向研究报告
- 2023九年级语文上册 第六单元 写作 学习改写教学设计 新人教版
- DL∕T 1630-2016 气体绝缘金属封闭开关设备局部放电特高频检测技术规范
- 2024年信用管理师(高级)职业鉴定理论考试题库(含答案)
- 基于mRNA-LNP技术的(细胞)免疫治疗产品开发指南
- 《玩偶之家(节选)》课件
评论
0/150
提交评论