ABB_800xA学习笔记186:System_800xA_Control_6.0_AC_800M_Getting_Started_26-第三章mydoors10

标签:
abbsystem_800xa_ac800m入门教程 |
分类: ABBDCS |
继续学习第三章
Testing MyDoors Project
测试MyDoors项目
Before downloading the application
to a controller and going online, it is
often necessary to
first test the application in an offline mode and confirm that
everything is working properly. This mode is called the
Test Mode and means basically
that Control Builder will compile and execute the
code locally in the PC as if it
was downloaded to an AC 800M
controller.
在将应用下载到控制器并在线之前,经常需要在离线模式做第一次测试,确认一切工作正常。此模式调用测试模式,基本上意味着
Control Builder 将在 PC 中本地编译和执行代码,就像将其下载到 AC 800M
控制器一样。
The
test mode is an easy way to try out the application many times.
However, external
communication will be disabled during the test mode, thus reading
and writing
variables connected to IO units cannot be validated in test
mode.
测试模式是多次使用应用程序的简单方法。然而,测试模式下外部通讯禁用,也即,在测试模式下无法对IO模板的读写。
The
communication variable cannot be tested in Test Mode.
测试模式下不能测试通讯变量。
Before running the diagram in Test
mode, there is an option to enable the Difference Report window.
However, the Difference Report function is not important for this
example since it does not generate a report in Test
mode. For details
on how to enable this function, see Difference Report on page 107.
This example assumes that the Difference Report has the default
setting (not enabled).
测试模式下运行图表,有一个选项可以启用差异报告功能。然而,差异报告功能对这个例子不重要,不会再测试模式下生成此报告。关于如何启用此功能的细节,见107页差异报告。此列子假定差异报告有默认设置(不启用)。
1. In Project Explorer, click Test
Mode . The
Test Mode Analysis window opens.
在项目浏览器,点击测试模式。打开测试模式诊断窗口。
2. Click Cold Restart All
点击安全部冷启动
3. Click Continue
点击继续
4. Double-click Diagram2 to display the
editor
双击图表2显示编辑器
5. Open Motors_Doors page. All variables in
Diagram2 are listed in the upper pane and the diagram appears in
the lower pane, see Figure 30.
打开Motors_Doors
page页面,图表2的所有的变量在上面板列出,图表出现在下面板,见图30.
Figure 30. The Diagram editor in
Test mode
图 30. 测试模式下的图表编辑器
Analyzing the Code During Diagram
Executions
在图表执行阶段分析代码
As you can see, test mode helps you
test and analyze your project without yet having any hardware
configured in the Project Explorer tree. You can change the
variable values and study the diagram response.
如你所见,测试模式帮助你测试和分析你的项目,无需在项目浏览器树有实际的硬件配置。你可以改变变量数值,研究图表反应。
While analyzing the variable
conditions, the following instructions will ask you to right-click
a variable and change its value. The variable values can be
right-clicked from either the parameter list or directly in the
code pane.
在分许变量时,以下说明将要求你右键点击变量并修改数值。可以从参数列表中右键单击变量值,也可以直接在代码窗格中单击变量值。
Figure 31. Changing the current
value on a variable from the Parameter list, or in the code
pane.
图 31. 从参数列表修改当前变量数值,或者在代码面板
1. Right-click
Photo_Cell and select On in the context menu.
Note that the motors change to True
(start) and the number of openings since last service increases by
one, as does the number of customers.
右键点击 Photo_Cell,在关联菜单选择On
注意电机修改为TRue(启动),从上次维修后的打开次数增加1,如同客户数量。
2. Right-click Photo_Cell and select Off in
context menu.
Simulating that no customer is activating the
photocell. Note how the clock starts and counts up to five seconds
at which point the motors are set to False (stop) and the doors
close.
右键点击 Photo_Cell,在关联菜单选择Off
模拟没有客户来到光电管。注意时钟如何启动和计数的,最多5秒,此时电机设置为False(停止),门关闭。
3. Right-click Photo_Cell and select On, then
QUICKLY select Off again.
Simulating that a customer has activated the
photocell. Both the number of openings is increased and customers
increase.
右键点击Photo_Cell,选择On,然后快速选择Off
模拟一个客户来到光电管,打开次数增加,客户数量增加。
4. Wait until the doors close. Right-click
Photo_Cell and QUICKLY select On, Off, On, Off, On,
Off.
等待直到门关闭,右键点击Photo_Cell,快速选择On,Off,On,Off
Simulating that three customers are passing the
photocell one by one. Notice that the clock starts when the first
customer passes the photocell and resets to 0 when the next
customer passes. Consequently, the opening time is extended for a
new period of 5 seconds, and so on. Note also that the number of
times the doors open only increases by one, whereas the number of
customers is increased by three. You should have three openings of
the doors and five customers registered.
模拟3各客户依次通过光电管。注意当地一个客户经过光电管,时钟启动,下一个客户经过重置为0。因此,打开时间延长了5秒等等。注意门打开的次数只增加了1次,而客户数量增加了3个。你应该记录3次开门和5个客户。
5. In the variables list, right-click
Reset_Counter and select On, then select Off again. Reset the
customer counter.
在变量列表,右键点击Reset_Counter,选择On,然后再择Off。重置客户计数器。
6. Activate the photocell so the number of
openings (Openings_Freq) passes Openings_Total. Service_Req will
then become True.
激活光电管,打开次数(Openings_Freq) 超过 Openings_Total。Service_Req将变成True。
7. Right-click Serviced and select On, then select
Off again.
Study the reaction of the counters and flags.
Note that the variable Openings_Freq resets.
右键点击Serviced,选择On,然后再选择Off
研究计数器和标志位的反应。注意变量Openings_Freq复位。
8. Close Diagram editor.
关闭图表编辑器
9. From Control Builder Menu bar, select Tools
> Stop Test Mode.
从Control
Builder菜单栏,选择工具>停止测试模式
第三章内容到此结束。