Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Codesys 有一个很好的 (IMO) 功能,当在线时,与变量声明相邻的注释会显示在表格视图中,这使得其他人更容易理解原始程序员的意图。
如果有某种方法可以为数组的各个元素添加类似的注释以指示特定含义,那就太好了。有谁知道这是否可以实现?
我认为不可能以这种方式评论数组。也许多行注释会有所帮助?
在变量声明中:
PROGRAM MAIN VAR TestArray : ARRAY[1..10] OF BOOL; (*Test array 1: Run 2: Error 3: Starting allowed 4: Etc. *) END_VAR
然后在在线视图中(至少是基于 codesys 的 TwinCAT 3),当鼠标悬停在图标上时,它将显示所有行: