TwinCAT 和 CoDeSys 中的指针和在线更改

发布于 2024-07-24 16:17:35 字数 117 浏览 5 评论 0原文

在 TwinCAT 2.10 和第一个程序所基于的 CoDeSys 2.3 中,指针是否可以安全地防止在线更改正在运行的 PLC 程序? 如果内存块作为在线程序更改的一部分被重新分配并且有指针指向该内存块,会发生什么?

Are pointers safe against online change of running PLC program in TwinCAT 2.10 and in CoDeSys 2.3 on which the first one is based? What happens if memory block gets reallocated as part of online program change and there are pointers pointing to that memory block?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

星星的軌跡 2024-07-31 16:17:35

TwinCAT 帮助中的 ADR(地址运算符)描述如下:

注意
在线更改后,某些地址上的数据可能会发生更改。 如果在地址上使用指针,请注意这一点。

在我看来,如果有人假装使用程序的在线修改,则指针无法永久存储。 否则,如果存储指针(例如作为某些数据结构之间的绑定),则应避免在线更改。

ADR (Address Operator) description in TwinCAT's help says:

Attention:
After an Online Change there might be changes concerning the data on certain addresses. Please regard this in case of using pointers on addresses.

It looks to me like pointers cannot be stored permanently if someone pretends to use online modification of the program. Otherwise if pointers are stored (for example as a binding between some data structures) online change should be avoided.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文