加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

ABB_800xA学习笔记182:System_800xA_Control_6.0_AC_800M_Getting_Started_22-第三章mydoors6

(2023-11-26 18:46:06)
标签:

abb

system_800xa_ac800m_

入门资料

分类: ABBDCS
继续学习第三章创建项目。
Declaring Local Variables and the Communication Variable
声明本地变量和通讯变量
1. Double-click Diagram2 to open the corresponding Diagram editor.
双击图表2,打开相应的编辑器
2. The Diagram editor is divided into three panes: the declaration pane, the code pane, and the message pane. (See Figure 14).
图表编辑器分成三个面板:声明面板,代码面板和消息面板(见图14)
ABB_800xA学习笔记182:System_800xA_Control_6.0_AC_800M_Getting_Started_22-第三章mydoors6
Figure 14. The editor for Diagram2
图14. 图表2的编辑器

3. Select the Variables tab, and place the cursor in the upper left-hand cell in the declaration pane and type Photo_Cell.
选择变量选项卡,把光标放在声明面板左上角单元格,输入Photo_Cell。
4. Move one cell to the right by pressing the tab key. Type bool in the “Data type” column. Move the cursor to next column labeled “Attributes”.
按下tab键向右移动一个单元格。在数据类型列输入bool。移动光标倒下一个标签为Attributes的单元格。
5. Choose the default setting retain (which means that the variable will keep its value at a warm restart). Press the tab key to move to the next column.
选择默认的设置(这意味着该变量在热启动时保持数值)。按下tab键移动到下一列。
6. Set the initial value to false to indicate that the doors are closed at start-up.
设置初始值为false,表明开始时们是关闭的。
7. Skip the column I/O address. The address will be automatically filled in later when connecting variables to I/O channels.
忽略IO列地址。后续链接变量到IO通道时,地址将自动填充。
8. The last column ‘Description’ is reserved for you to use freely. Your first row should now look like row 1 in Figure 15.
最后一列描述保留供你自由使用。你的第一行现在看起来像图15第一行的样子。
ABB_800xA学习笔记182:System_800xA_Control_6.0_AC_800M_Getting_Started_22-第三章mydoors6
Figure 15. Declaration of the Boolean variable Photo_Cell
图 15. 声明布尔型变量Photo_Cell
9. Declare a second variable named, DoorsOpen_Time which represents how long (duration time) the doors should remain open. Complete the declaration of DoorsOpen_Time according to row 2 in Figure 16.
声明第二个名字叫做DoorsOpen_Time的变量,代表门保持打开的时间长度(持续时间)。按照图16第二行完成DoorsOpen_Time的声明。
ABB_800xA学习笔记182:System_800xA_Control_6.0_AC_800M_Getting_Started_22-第三章mydoors6
Figure 16. Declaration of the DoorsOpen_Time variable
图 16. 声明DoorsOpen_Time变量

Note the attribute constant of the variable DoorsOpen_Time. You can either explicitly type “constant”, or scroll through the available formats using Alt-key together with the up and down arrow keys, or press CTRL+J to display the list of attributes and then select constant.
注意 DoorsOpen_Time变量的属性常量。可以显式键入“常量”,也可以使用 Alt 键和向上和向下箭头键滚动浏览可用格式,或者按 Ctrl+J 显示属性列表,然后选择常量。
10. Declare the next variable DoorsOpen_ET using a different method. Right click the code pane (grid area), and select New > Variable. In the New Variable dialog, declare the values for the variable as shown in Figure 17 and click OK.
使用一个不同的方法声明下一个变量DoorsOpen_ET。右键电机代码面板(网格区域),选择新建> 变量。在新建变量对话框,按照图17声明各数值,点击OK按钮。
ABB_800xA学习笔记182:System_800xA_Control_6.0_AC_800M_Getting_Started_22-第三章mydoors6
Figure 17. New Variable dialog
图 17. 新建变量对话框
The new variable, DoorsOpen_ET, gets inserted as a graphical object in the code pane. It also appears in the Declaration Pane as row 3.
新的变量DoorsOpen_ET,作为图形对象插入代码面板。它同时出现在声明面板第三行。
ABB_800xA学习笔记182:System_800xA_Control_6.0_AC_800M_Getting_Started_22-第三章mydoors6
Figure 18. Declaration of the DoorsOpen_ET variable
图 18. 声明DoorsOpen_ET变量
11. Declare the remaining variables using any of the two methods (starting from row 4 to row 10) in the grid according to Figure 19.
按照图19在表格中使用两种方法之一声明剩余的变量(从第4行到第10行)
ABB_800xA学习笔记182:System_800xA_Control_6.0_AC_800M_Getting_Started_22-第三章mydoors6
Figure 19. Declaration of the remaining variables
图 19. 声明剩余的变量

12. Select the Communication Variables tab in the Diagram editor, and declare the Service_Req communication variable as shown in Figure 20.
在图表编辑器选择通讯变量选项卡,如图20所示声明Service_Req通讯变量。
ABB_800xA学习笔记182:System_800xA_Control_6.0_AC_800M_Getting_Started_22-第三章mydoors6
Figure 20. Declaration of the communication variable Service_Req
图 20. 声明通讯变量Service_Req
13. Click Check ABB_800xA学习笔记182:System_800xA_Control_6.0_AC_800M_Getting_Started_22-第三章mydoors6 to check for errors
点击检查图标检查错误
14. Click Save ABB_800xA学习笔记182:System_800xA_Control_6.0_AC_800M_Getting_Started_22-第三章mydoors6 to save the variables
点击保存图标保存变量





0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有