迪文科技论坛

 找回密码
 立即注册
搜索
查看: 2702|回复: 0

Application instructions : VP&SP

[复制链接]

82

主题

150

回帖

2605

积分

超级版主

Rank: 8Rank: 8

积分
2605
发表于 2020-2-17 13:06:54 | 显示全部楼层 |阅读模式
VP and SP Distribution
VP
Most Interface Objects must be assigned to a Variable Pointer (VP). A VP is an address on the RAM space. Each
VP points to a 2-byte (1 word) value.


Since there are no restrictions on address assignment, conflicts may show up on a project. For example, usually,
you should not assign two Text Displays with Text Lengths greater than 2bytes to subsequent VPs, because their data
will overwrite each other:.

To avoid this problem, always keep in mind how many VPs an Interface Object takes, space them properly.

While unintended address overlapping is a project error, it’s sometimes desirable to
have overlapping VPs. Multiple Display Variables may be assigned to the same VP, for
example, to display the same value in different locations or formats.

To improve scalability and avoid unintended data overlapping, we recommend planning your project’s address
allocation beforehand, so that you can reserve addresses between Objects, and give them plenty of space to
expand:



Info :
The value stored on a VP is called VPC (Value Pointer Content). It is also denoted as *VP.


SP
A Stack Pointer (SP) is a VP used to store the parameters of a Display Variable, so that they can be modified
by the user at run-time.


Each project requires a different strategy for addressing rules, but here are some examples:
• All Objects will have even VPs. for example :
For integer data.(VPs 0x0##0 (0x01000, 0x1001, 0x1002,... etc.),
For long integer data.(VPs 0x0##0 (0x01000, 0x1002, 0x1004, ...etc.),
This depends on the actual value occupied by the control.

SPs 0x5##0 (0x5100,0x5110, 0x5120, etc.);0x10 addresses should be spaced.
By using addressing rules, you can greatly reduce mapping issues and reworks when scaling up or down your
projects.



Info:
If the SP of a Display Variable is set to the default value (-1 or 0xFFFF), the parameters
of this Display Variable are fixed, and can only be changed by modifying the project. If
you set the PP to a valid RAM address, the parameters are modifiable, and are initialized
along the rest of the RAM.

Caution:
The SP cannot be reused unless it is a display control that is completely duplicated at the same coordinate position on other pages.







本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|迪文科技论坛 ( 京ICP备05033781号-1 )

GMT+8, 2024-10-19 04:32 , Processed in 0.060741 second(s), 22 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表