逐梦论坛's Archiver

shillan 发表于 2013-11-6 09:41

WINCC连接Siemens PLC的常用方式

[p=30, 2, left][size=3][color=#000000][font=SimSun]说明:[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]a.[font=SimSun]文档并未列出所有的[/font]WINCC[font=SimSun]连接[/font]Siemens[font=SimSun]品牌[/font]PLC[font=SimSun]的所有方法,只是列举了一些常用的方法。[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]b.[font=SimSun]在各种连接方式中的参数设置可能会略有不同,在此列出的步骤和参数只是一套可以连通的设置方法。[/font][/color][/size] [/p][p=30, 2, left][b][size=3][color=#000000][font=SimSun]一.[/font]WINCC[font=SimSun]使用[/font]CP5611[font=SimSun]通讯卡通过[/font]MPI[font=SimSun]连接[/font]PLC[/color][/size][/b] [/p][p=30, 2, left][b][size=3][color=#000000][font=SimSun]前提条件[/font][/color][/size][/b] [/p][p=30, 2, left][b][size=3][color=#000000]I) [font=SimSun]通过[/font]CP5611[font=SimSun]实现[/font]PLC[font=SimSun]系统与[/font]WINCC6.0[font=SimSun]通讯的前提条件是在安装有[/font]WINCC[font=SimSun]的计算机上安装[/font]CP5611[font=SimSun]通讯板卡。[/font][/color][/size][/b] [/p][p=30, 2, left][b][size=3][color=#000000]II) [font=SimSun]使用[/font]STEP7[font=SimSun]编程软件能够通过[/font]MPI[font=SimSun]正常连接[/font]PLC。
[/color][/size][/b][/p][p=30, 2, left][b][size=3][color=#000000]1[font=SimSun].[/font]STEP 7 [font=SimSun]硬件组态[/font][/color][/size][/b] [/p][p=30, 2, left][size=3][color=#000000]STEP7[font=SimSun]设置[/font]MPI[font=SimSun]通讯,具体步骤不在此详述,可参考如下图[/font]1.1[font=SimSun]示:[/font][/color][/size] [/p][p=30, 2, center][img=436,336]http://cache.automation.siemens.com/dnl/TE/TE1MTM4MwAA_71787681_FAQ/images_1.1.png[/img]
图1.1 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]注意:[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]新建一个[/font]MPI[font=SimSun]网络用来通讯,设置[/font]MPI[font=SimSun]网络的地址和波特率,且记住,在随后的设置中需要匹配。[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]2[font=SimSun].安装[/font]CP5611[font=SimSun]通讯板卡[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]安装[/font]CP5611[font=SimSun],并安装驱动程序,具体[/font]CP5611[font=SimSun]的安装过程和注意事项可参考如下链接[/font]:[/color][/size] [/p][p=30, 2, left][url=http://support.automation.siemens.com/CN/view/zh/26707026]http://support.automation.siemens.com/CN/view/zh/26707026[/url] [/p][p=30, 2, left][size=3][color=#000000]3[font=SimSun].添加驱动程序和系统参数设置[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]打开[/font]WINCC[font=SimSun]工程在[/font]Tag Management-->SIMATIC S7 PROTOCOL SUITE->MPI[/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]右键单击[/font]MPI[font=SimSun],在弹出菜单中点击[/font]System Parameter[font=SimSun],弹出[/font]System Parameter-MPI[font=SimSun]对话框,选择[/font]Unit[font=SimSun]标签,查看[/font]Logic device name[font=SimSun](逻辑设备名称)。默认安装后,逻辑设备名为[/font]MPI[/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]如图[/font]1.3[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, center][img]http://cache.automation.siemens.com/dnl/TE/TEyNDAxOQAA_71787681_FAQ/images_1.2.png[/img]
图1.2


[/p][p=30, 2, center][img=334,324]http://cache.automation.siemens.com/dnl/zE/zE2NTM0NQAA_71787681_FAQ/images_1.3.png[/img]
图1.3
[/p][p=30, 2, left][size=3][color=#000000]4[font=SimSun].设置[/font]Set PG/PC Interface[/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]进入操作系统下的控制面板,双击[/font]Set PG/PC Interface[font=SimSun]图标。在[/font]Access Point of the Application:[font=SimSun]的下拉列表中选择[/font]MPI (WINCC)[font=SimSun],如图[/font]1.4[font=SimSun]所示,而后在[/font]Interface Parameter Assignment Used:[font=SimSun]的列表中,点击[/font]CP5611(MPI)[font=SimSun],而后在[/font]Access Point of the Application:[font=SimSun]的下拉列表中显示:[/font]MPI (WINCC)CP5611(MPI)[font=SimSun],如图[/font]1.5[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, center][img=296,288]http://cache.automation.siemens.com/dnl/zE/zE0MTMyMQAA_71787681_FAQ/images_1.4.png[/img]
图1.4

[/p][p=30, 2, center][img=287,277]http://cache.automation.siemens.com/dnl/zE/zEyOTY4OQAA_71787681_FAQ/images_1.5.png[/img]
图1.5 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]设置[/font]CP5611[font=SimSun]的通讯参数[/font],[font=SimSun]点击[/font]Properties[font=SimSun]…按钮,弹出[/font]Properties-CP5611(MPI)[font=SimSun]属性对话框,设置参数,如图[/font]1.6[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]重要的参数如下所示:[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]Address:[/color][/size] [/p][p=30, 2, left][size=3][color=#000000]CP5611[font=SimSun]的地址([/font]MPI[font=SimSun]地址必须唯一,建议设置为[/font]0[font=SimSun])[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]Transmission Rate:[/color][/size] [/p][p=30, 2, left][size=3][color=#000000]MPI[font=SimSun]网络的传输速率(默认为[/font]187.5Kbps[font=SimSun])您可以修改,但必须和实际连接[/font]PLC[font=SimSun]的[/font]MPI[font=SimSun]端口的传输速率相同[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]Highest Station Address:[/color][/size] [/p][p=30, 2, left][size=3][color=#000000]MPI[font=SimSun]网络的最高站地址(必须和[/font]PLC[font=SimSun]的[/font]MPI[font=SimSun]网络参数设置相同)[/font][/color][/size] [/p][p=30, 2, center][img=311,277]http://cache.automation.siemens.com/dnl/zE/zE1OTU4NwAA_71787681_FAQ/images_1.6.png[/img]
图1.6 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]诊断[/font]MPI[font=SimSun]网络,点击[/font]Diagnostic[font=SimSun]…按钮,进入诊断对话框。如下图所示:[/font]Test[font=SimSun]按钮点击后,显示[/font]OK[font=SimSun]表示[/font]CP5611[font=SimSun]工作正常。点击[/font]Read[font=SimSun]按钮后,将显示所有接入[/font]MPI[font=SimSun]网络中的设备的站地址,如果只能读到自己的站地址,此时,请查看[/font]MPI[font=SimSun]网络和硬件连接设置,只有成功读取到[/font]CPU[font=SimSun]的站点地址,才能进行以下的步骤,否则,不可能建立通讯。[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][b]5[font=SimSun].添加通道与连接设置[/font][/b][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]添加驱动连接,设置参数。打开[/font]WINCC[font=SimSun]工程在[/font]Tag Management-->SIMATIC S7 PROTOCOL SUITE->MPI[font=SimSun],右键单击[/font]MPI[font=SimSun],在下拉菜单中,点击[/font]New Driver Connection[font=SimSun],如图[/font]1.7[font=SimSun]所示,在弹出的[/font]Connection properties[font=SimSun]对话框中点击[/font]Properties[font=SimSun]按钮,弹出[/font]Connection Parameter-MPI[font=SimSun]属性对话框,如图[/font]1.8[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, center][img=280,264]http://cache.automation.siemens.com/dnl/zE/zE2MDM2MwAA_71787681_FAQ/images_1.7.png[/img]
图1.7
[/p][p=30, 2, center][img=288,295]http://cache.automation.siemens.com/dnl/jU/jUxNDE5NTUA_71787681_FAQ/images_1.8.png[/img]
图1.8 [/p][p=30, 2, center]
[img=297,289]http://cache.automation.siemens.com/dnl/TU/TU4NjA1AAAA_71787681_FAQ/images_1.9.png[/img]
图1.9 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]重要的参数如下所示:[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]Station Address[font=SimSun]:[/font]MPI[font=SimSun]端口地址[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]Rack Number[font=SimSun]:[/font]CPU[font=SimSun]所处机架号,除特殊复杂使用的情况下,一般填入[/font]0[/color][/size] [/p][p=30, 2, left][size=3][color=#000000]Slot Number[font=SimSun]:[/font]CPU[font=SimSun]所处的槽号[/font][/color][/size][size=3][color=#000000]
[/color][/size] [/p][p=30, 2, left][size=3][color=#000000]
[/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]注意:如果您是[/font]S7-300[font=SimSun]的[/font]PLC[font=SimSun],那么该参数为[/font]2[font=SimSun],如果是[/font]S7-400[font=SimSun]的[/font]PLC[font=SimSun],那么要根据[/font]STEP7[font=SimSun]项目中的[/font]Hardware[font=SimSun]软件查看[/font]PLC[font=SimSun]插在第几号槽内,不能根据经验和物理安装位置来随便填写,可能的参数为[/font]2[font=SimSun]、[/font]3[font=SimSun]、[/font]4[font=SimSun](主要是依据电源的大小来决定)否则通讯不能建立。[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]
[/color][/size] [/p][p=30, 2, left][size=3][color=#000000][b]6[font=SimSun].连接测试与通讯诊断[/font][/b][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]通过[/font]WINCC[font=SimSun]工具中的通道诊断程序[/font]WinCC Channel Diagnosis[font=SimSun]即可测试通讯是否建立。注意:此时[/font]PLC[font=SimSun]必须处于运行状态,老版本的[/font]PLC[font=SimSun]必须处于[/font]RUN-P[font=SimSun]或者[/font]RUN[font=SimSun]状态,[/font]WINCC[font=SimSun]必须激活运行,根据图[/font]1.9[font=SimSun]所示的位置,进入通道诊断工具,检测通讯是否成功建立。如图[/font]1.10[font=SimSun]所示,绿色的“√”表示通讯已经成功建立。[/font][/color][/size] [/p][p=30, 2, center][img=286,282]http://cache.automation.siemens.com/dnl/zE/zExNTU0NwAA_71787681_FAQ/images_1.10.png[/img]
图1.10

[size=3][color=#000000][font=SimSun]
[img=312,251]http://cache.automation.siemens.com/dnl/TE/TEzMTI1NwAA_71787681_FAQ/images_1.11.png[/img]
图[/font]1.11[/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]至此[/font]WINCC[font=SimSun]使用[/font]CP5611[font=SimSun]通讯卡通过[/font]MPI[font=SimSun]连接[/font]PLC[font=SimSun]的过程完毕。[/font][/color][/size] [/p]
[p=30, 2, left][size=3][color=#000000]
[/color][/size] [/p][p=30, 2, left][b][size=3][color=#000000][font=SimSun]二.[/font]WINCC[font=SimSun]使用[/font]CP5611[font=SimSun]通讯卡通过[/font]PROFIBUS[font=SimSun]连接[/font]PLC[/color][/size][/b] [/p][p=30, 2, left][b][size=3][color=#000000][font=SimSun]前提条件[/font][/color][/size][/b] [/p][p=30, 2, left][b][size=3][color=#000000]I) [font=SimSun]通过[/font]CP5611[font=SimSun]实现[/font]PLC[font=SimSun]系统与[/font]WINCC6.0[font=SimSun]通讯的前提条件是在安装有[/font]WINCC[font=SimSun]的计算机上安装[/font]CP5611[font=SimSun]通讯板卡[/font].[/color][/size][/b] [/p][p=30, 2, left][b][size=3][color=#000000]II) [font=SimSun]将所要连接的[/font]PLC[font=SimSun]的端口设置为[/font]PROFIBUS[font=SimSun]通讯协议,对于[/font]MPI/DP[font=SimSun]类型的端口尤其重要。[/font][/color][/size][/b] [/p][p=30, 2, left][size=3][color=#000000][b]1[font=SimSun].[/font]STEP 7 [font=SimSun]硬件组态[/font][/b][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]使用[/font]STEP 7[font=SimSun]软件组态[/font]PLC[font=SimSun]的硬件信息,将相应的板卡在[/font]Hardware[font=SimSun]进行硬件组态,选择你将要连接[/font]WINCC[font=SimSun]的对应端口,如果其类型为[/font]MPI/DP[font=SimSun],则需要将端口指定为[/font]PROFIBUS[font=SimSun],如下图[/font]2.1[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, center]
[img=380,328]http://cache.automation.siemens.com/dnl/TI/TI2MDM5AAAA_71787681_FAQ/images_2.1.png[/img]
图2.1 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]点击上图所示的[/font]Properties[font=SimSun]…按钮,如下图所示:[/font][/color][/size] [/p][p=30, 2, center]
[img=399,321]http://cache.automation.siemens.com/dnl/zU/zUxNDkxMQAA_71787681_FAQ/images_2.2.png[/img]
图2.2 [/p][p=30, 2, left][size=3][color=#000000]       A[font=SimSun].设置该[/font]PROFIBUS[font=SimSun]端口的地址为[/font]2[/color][/size] [/p][p=30, 2, left][size=3][color=#000000]       B[font=SimSun].点击[/font]New[font=SimSun]按钮,在[/font]Subnet[font=SimSun]下新建一个[/font]PROFIBUS[font=SimSun]网络,在弹出的对话框中设置参数,如图[/font]2.2[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]其中重要参数如下:[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]Highest PROFIBUS Address[font=SimSun]:[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]    指整个[/font]PROFIBUS[font=SimSun]网络中的最高的站点地址,默认为[/font]126[font=SimSun],可作修改。[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]Transmission Rate[font=SimSun]:[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]       PROFIBUS[font=SimSun]网络的通讯速率,整个网络中所有站点的通讯波特率应当一致。[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]Profile[font=SimSun]:[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]    具体的传输协议的设置,这里我们使用[/font]DP[font=SimSun]。[/font][/color][/size] [/p][p=30, 2, center][img=385,301]http://cache.automation.siemens.com/dnl/TE/TE4NjI5AAAA_71787681_FAQ/images_2.3.png[/img]
图2.3 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]其他设置可根据您项目的具体情况进行设置。[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][b]2[font=SimSun].安装[/font]CP5611[font=SimSun]通讯板卡[/font][/b][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]安装[/font]CP5611[font=SimSun],并安装驱动程序,具体[/font]CP5611[font=SimSun]的安装过程和注意事项可参考如下链接[/font]:[/color][/size] [/p][p=30, 2, left][url=http://support.automation.siemens.com/CN/view/zh/26707026]http://support.automation.siemens.com/CN/view/zh/26707026[/url]  [/p][p=30, 2, left][size=3][color=#000000][b]3[font=SimSun].添加驱动程序和设置系统参数[/font][/b][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]打开[/font]WINCC[font=SimSun]工程在[/font]Tag Management-->SIMATIC S7 PROTOCOL SUITE->PROFIBUS[/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]右键单击[/font]PROFIBUS[font=SimSun],在弹出菜单中点击[/font]System Parameter[font=SimSun],如图[/font]2.4[font=SimSun]所示,弹出[/font]System Parameter- PROFIBUS[font=SimSun]对话框,选择[/font]Unit[font=SimSun]标签,查看[/font]Logic device name[font=SimSun](逻辑设备名称)。默认安装后,逻辑设备名为[/font]CP_L2_1:[font=SimSun],如图[/font]2.5[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, center][img]http://cache.automation.siemens.com/dnl/zE/zEyMTI4MQAA_71787681_FAQ/images_2.4.png[/img]

图2.4

[/p][p=30, 2, center][img=296,289]http://cache.automation.siemens.com/dnl/zE/zE1NjM0MQAA_71787681_FAQ/images_2.5.png[/img]
图2.5 [/p][p=30, 2, left][size=3][color=#000000][b]4[font=SimSun].设置[/font]Set PG/PC Interface[/b][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]进入[/font]Windows[font=SimSun]操作系统下的控制面板,双击[/font]Set PG/PC Interface[font=SimSun]图标,在[/font]Access Point of the Application:[font=SimSun]的下拉列表中选择[/font]CP_L2_1: [font=SimSun]如图[/font]2.6[font=SimSun]所示,而后在[/font]Interface Parameter Assignment Used:[font=SimSun]的列表中,点击[/font]CP5611(PROFIBUS)[font=SimSun],而后在[/font]Access Point of the Application:[font=SimSun]的下拉列表中显示:[/font]CP_L2_1:CP5611(PROFIBUS)[font=SimSun],如图[/font]2.7[font=SimSun]所示。[/font][/color][/size] [/p][p=30, 2, center][img=286,272]http://cache.automation.siemens.com/dnl/TE/TEzNzA0NQAA_71787681_FAQ/images_2.6.png[/img]
图2.6

[/p][p=30, 2, center][img=289,285]http://cache.automation.siemens.com/dnl/TE/TE0NzE3MwAA_71787681_FAQ/images_2.7.png[/img]
图2.7 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]设置[/font]CP5611[font=SimSun]的通讯参数[/font],[font=SimSun]点击[/font]Properties[font=SimSun]…按钮,弹出[/font]Properties-CP5611(PROFIBUS)[/color][/size] [size=3][color=#000000][font=SimSun]参数。如图[/font]2.8[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]重要的参数如下所示:[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]Address:[/color][/size] [/p][p=30, 2, left][size=3][color=#000000]      CP5611[font=SimSun]的[/font]PROFIBUS[font=SimSun]地址[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]Transmission Rate:[/color][/size] [/p][p=30, 2, left][size=3][color=#000000]      PROFIBUS[font=SimSun]网络的传输速率(您可以修改,但必须和实际连接[/font]PLC[font=SimSun]的[/font]PROFIBUS[font=SimSun]端口的传输速率相同)[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]Highest Station Address:[/color][/size] [/p][p=30, 2, left][size=3][color=#000000]      PROFIBUS[font=SimSun]网络的最高站地址(必须和[/font]PLC[font=SimSun]的[/font]PROFIBUS[font=SimSun]网络参数设置相同)[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]Profile:[/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]设置具体通讯协议,这里使用[/font]DP[/color][/size] [/p][p=30, 2, center][img=281,359]http://cache.automation.siemens.com/dnl/TQ/TQ5MjM1AAAA_71787681_FAQ/images_2.8.png[/img]
图2.8 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]诊断[/font]PROFIBUS[font=SimSun]网络,点击[/font]Diagnostic[font=SimSun]…按钮,进入诊断对话框。如下图所示:[/font]Test[font=SimSun]按钮点击后,显示[/font]OK[font=SimSun]表示[/font]CP5611[font=SimSun]工作正常。点击[/font]Read[font=SimSun]按钮后,将显示所有接入[/font]PROFIBUS[font=SimSun]网络中的设备的站地址,如果只能读到自己的站地址,此时,请查看[/font]PROFIBUS[font=SimSun]网络和硬件连接设置,只有成功读取到[/font]CPU[font=SimSun]的站点地址,才能进行以下的步骤,否则,不可能建立通讯,如图[/font]2.9[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, center][img=318,350]http://cache.automation.siemens.com/dnl/TE/TEyMDA0MQAA_71787681_FAQ/images_2.9.png[/img]
图2.9 [/p][p=30, 2, left][size=3][color=#000000][b]5[font=SimSun].添加通道与连接设置[/font][/b][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]添加驱动连接,设置参数。打开[/font]WINCC[font=SimSun]工程在[/font]Tag Management-->SIMATIC S7 PROTOCOL SUITE->PROFIBUS[font=SimSun],右键单击[/font]PROFIBUS[font=SimSun],在下拉菜单中,点击[/font]New Driver Connection[font=SimSun],如图[/font]2.10[font=SimSun]所示,在弹出的[/font]Connection properties[font=SimSun]对话框中点击[/font]Properties[font=SimSun]按钮,弹出[/font]Connection Parameter-PROFIBUS[font=SimSun]属性对话框,填入参数,如图[/font]2.11[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, center][img=253,278]http://cache.automation.siemens.com/dnl/zE/zE0OTkyMQAA_71787681_FAQ/images_2.10.png[/img]

图2.10

[/p][p=30, 2, center][img=343,347]http://cache.automation.siemens.com/dnl/TE/TE1MzIzAAAA_71787681_FAQ/images_2.11.png[/img]
图2.11 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]重要的参数如下所示:[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]Station Address[font=SimSun]:(通讯模块的[/font]IP[font=SimSun]地址)[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]Rack Number[font=SimSun]:[/font]CPU[font=SimSun]所处机架号,除特殊复杂使用的情况下,一般填入[/font]0[/color][/size] [/p][p=30, 2, left][size=3][color=#000000]Slot Number[font=SimSun]:[/font]CPU[font=SimSun]所处的槽号[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]注意:如果您是[/font]S7-300[font=SimSun]的[/font]PLC[font=SimSun],那么该参数为[/font]2[font=SimSun],如果是[/font]S7-400[font=SimSun]的[/font]PLC[font=SimSun],那么要根据[/font]STEP7[font=SimSun]项目中的[/font]Hardware[font=SimSun]软件查看[/font]PLC[font=SimSun]插在第几号槽内,不能根据经验和物理安装位置来随便填写,可能的参数为[/font]2[font=SimSun]、[/font]3[font=SimSun]、[/font]4[font=SimSun](主要是依据电源的大小来决定)否则通讯不能建立。[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][b]6[font=SimSun].连接测试与通讯诊断[/font][/b][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]通过[/font]WINCC[font=SimSun]工具中的通道诊断程序[/font]WinCC Channel Diagnosis[font=SimSun]即可测试通讯是否建立。注意:此时[/font]PLC[font=SimSun]必须处于运行状态,老版本的[/font]PLC[font=SimSun]必须处于[/font]RUN-P[font=SimSun]或者[/font]RUN[font=SimSun]状态,[/font]WINCC[font=SimSun]必须激活运行,根据图[/font]2.12[font=SimSun]所示的位置,进入通道诊断工具,检测通讯是否成功建立。如图[/font]2.13[font=SimSun]所示,绿色的“√”表示通讯已经成功建立。[/font][/color][/size] [/p][p=30, 2, center][img=396,342]http://cache.automation.siemens.com/dnl/TE/TE2NTE2NQAA_71787681_FAQ/images_2.12.png[/img]
图2.12
[/p][p=30, 2, center][img=432,300]http://cache.automation.siemens.com/dnl/TE/TEzMzk3OQAA_71787681_FAQ/images_2.13.png[/img]
图2.13 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]至此[/font]WINCC[font=SimSun]使用[/font]CP5611[font=SimSun]通讯卡通过[/font]PROFIBUS[font=SimSun]连接[/font]PLC[font=SimSun]的过程完毕。[/font][/color][/size] [/p]
[size=3][color=#000000][b][font=SimSun]三.[/font]WINCC[font=SimSun]使用普通网卡通过[/font]TCP/IP[font=SimSun]连接[/font]PLC[/b][/color][/size]
[b][size=3][color=#000000][font=SimSun]前提条件[/font][/color][/size][/b] [p=30, 2, left][size=3][color=#000000][b][font=SimSun]通过以太网实现[/font]PLC[font=SimSun]系统与[/font]WINCC6.0[font=SimSun]通讯的前提条件是[/font]PLC[font=SimSun]系统配备以太网模块或者使用带有[/font]PN[font=SimSun]接口的[/font]PLC[font=SimSun],以太网模块列表如下表所示:[b][size=10.5pt][font=Arial] [/font][/size][/b][/font][/b][/color][/size] [/p]
[table]
[tr][td=1,1,163][p=30, 2, center][b][size=10.5pt]PLC[/size][/b][b][font=SimSun][size=10.5pt]系列[/size][/font][/b][/p][/td][td=1,1,405][p=30, 2, center][b][font=SimSun][size=10.5pt]以太网通讯模块[/size][/font][/b][/p][/td][/tr]
[tr][td=1,1,163][p=30, 2, center][b][size=10.5pt]S7-300[/size][/b][/p][/td][td=1,1,405][p=30, 2, center][b][size=10.5pt]CP343-1/CP343-1 Lean/CP343-1 Advanced-IT[/size][/b][/p][/td][/tr]
[tr][td=1,1,163][p=30, 2, center][b][size=10.5pt]S7-400[/size][/b][/p][/td][td=1,1,405][p=30, 2, center][b][size=10.5pt]CP443-1/CP443-1 Advanced-IT[/size][/b][/p][/td][/tr]
[/table][p=30, 2, left][size=3][color=#000000][font=SimSun]注:只有支持[/font]ISO[font=SimSun]通讯协议的模块才支持([/font]Industrial Ethernet[font=SimSun]工业以太网)通讯,具体情况可察看[/font]STEP7[font=SimSun]中的模块信息。本文档下列步骤应用[/font]CPU 315-2PN/DP[font=SimSun]型号的[/font]PLC[font=SimSun],使用普通以太网卡连接。[/font][/color][/size] [/p][p=30, 2, left][b][size=3][color=#000000][font=SimSun]组态过程[/font][/color][/size][/b] [/p][p=30, 2, left][size=3][color=#000000][b]1[font=SimSun].[/font]STEP7[font=SimSun]硬件组态[/font][/b][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]使用[/font]STEP7[font=SimSun]编程软件对[/font]PLC[font=SimSun]系统进行软件组态,在[/font]Hardware[font=SimSun]界面内插入实际的[/font]PLC[font=SimSun]硬件,如下图[/font]3.1[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, center][img=436,280]http://cache.automation.siemens.com/dnl/TM/TM0MzM1MwAA_71787681_FAQ/images_3.1.png[/img]
图3.1 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]在[/font]PN-IO[font=SimSun]槽双击弹出[/font]PN-IO[font=SimSun]属性对话框,如图[/font]3.2[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, center][img=420,330]http://cache.automation.siemens.com/dnl/TE/TEyMjg3AAAA_71787681_FAQ/images_3.2.png[/img]
图3.2 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]点击图[/font]3.2[font=SimSun]属性对话框,弹出网络参数设置对话框,如图[/font]3.3[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, center][img=452,362]http://cache.automation.siemens.com/dnl/TE/TEyODQ1MwAA_71787681_FAQ/images_3.3.png[/img]
图3.3 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]点击[/font]New[font=SimSun]按钮,新建一个工业以太网络,输入该[/font]PN[font=SimSun]模块的[/font]IP address(IP[font=SimSun]地址[/font])[font=SimSun]和[/font]Subnet mask([font=SimSun]子网掩码[/font])[font=SimSun],在简单使用的情况下,不启用网关。[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]当您使用的是[/font]CPU+[font=SimSun]以太网模块通讯时,双击以太网模块,会自动弹出以太网模块的属性信息,设置以太网通讯模块的[/font]IP[font=SimSun]地址和子网掩码。方法与[/font]PN-IO[font=SimSun]的属性设置相同,如下图所示:注意如果要使用[/font]TCP/IP[font=SimSun]通讯方式,必须启动[/font]IP Protocol being used[font=SimSun],设置[/font]IP[font=SimSun]地址与子网掩码,如图[/font]3.4[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, center][img=448,280]http://cache.automation.siemens.com/dnl/TE/TEzNTk5OQAA_71787681_FAQ/images_3.4.png[/img]
图3.4 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]将组态下载到[/font]CPU[font=SimSun],则[/font]PLC[font=SimSun]方面设置完成。对于第一次使用以太网通讯,必须保证首先使用[/font]MPI[font=SimSun]或者[/font]PROFIBUS[font=SimSun]的通讯方式,将设置好参数的组态下载到目标[/font]PLC[font=SimSun],此后即可通过以太网的方式进行程序监控和项目下载。[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][b]2[font=SimSun].设置[/font]IP[font=SimSun]地址与通讯检测[/font][/b][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]设置安装有[/font]WINCC[font=SimSun]计算机的[/font]windows[font=SimSun]操作系统的[/font]TCP/IP[font=SimSun]参数,将[/font]WINCC[font=SimSun]组态计算机的[/font]IP[font=SimSun]地址设置成为和[/font]PLC[font=SimSun]以太网通讯模块或者[/font]PN-IO[font=SimSun]的[/font]IP[font=SimSun]地址保证是一个网段,注意子网掩码的设置,如图[/font]3.5[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, center]
[img=385,288]http://cache.automation.siemens.com/dnl/TI/TI5NTA3AAAA_71787681_FAQ/images_3.5.png[/img]
图3.5 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]通过在程序[/font][font=SimSun]运行中键入[/font]CMD[font=SimSun]进入[/font]DOS[font=SimSun]界面,使用网络命令[/font]PING[font=SimSun]测试以太网通讯是否建立,[/font]PING[font=SimSun]的命令如下:[/font]ping [font=SimSun]目标[/font]IP[font=SimSun]地址[/font] –[font=SimSun]参数[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]如下图[/font]3.6[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, center][img=423,282]http://cache.automation.siemens.com/dnl/TE/TEzNzcxMwAA_71787681_FAQ/images_3.6.png[/img]
图3.6 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]此例中,[/font]PN-IO[font=SimSun]的[/font]IP[font=SimSun]地址为[/font]192.168.0.100 [font=SimSun]子网掩码:[/font]255.255.255.0[font=SimSun];组态计算机的[/font]IP[font=SimSun]地址为[/font]192.168.0.244 [font=SimSun]子网掩码:[/font]255.255.255.0[font=SimSun],此处显示表示以太网通讯已经建立,并且状态良好。[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]注意:如果此处不能[/font]Ping[font=SimSun]通[/font]PLC[font=SimSun]的[/font]PN[font=SimSun]端口或者以太网模块,则通讯不可能建立,后面的步骤就不用进行了,若要通讯成功,必须保证实际的物理以太网通讯保持正常。[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][b]3[font=SimSun].添加驱动程序和设置系统参数[/font][/b][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]打开[/font]WINCC[font=SimSun]工程在[/font]Tag Management-->SIMATIC S7 PROTOCOL SUITE->TCP/IP[/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]右键单击[/font]TCP/IP[font=SimSun],在弹出菜单中点击[/font]System Parameter[font=SimSun],,如图[/font]3.7[font=SimSun]所示,弹出[/font]System Parameter- TCP/IP[font=SimSun]对话框,选择[/font]Unit[font=SimSun]标签,查看[/font]Logic device name[font=SimSun](逻辑设备名称)。默认安装后,逻辑设备名为[/font]CP-TCPIP[font=SimSun],如图[/font]3.8[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, center][img=264,292]http://cache.automation.siemens.com/dnl/TM/TMyMjI3AAAA_71787681_FAQ/images_3.7.png[/img]

图3.7

[/p][p=30, 2, center][img=289,306]http://cache.automation.siemens.com/dnl/zE/zE1NzQ5NQAA_71787681_FAQ/images_3.8.png[/img]
图3.8 [/p][p=30, 2, left][size=3][color=#000000][b]4[font=SimSun].设置[/font]Set PG/PC Interface[/b][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]通讯接口设置,进入操作系统控制面板,双击[/font]Set PG/PC Interface[font=SimSun],在默认安装后,在应用程序访问点是没有[/font]CP-TCPIP[font=SimSun]的,所以需要手动添加这个应用程序访问点,如下图[/font]3.9[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, center]
[img=290,328]http://cache.automation.siemens.com/dnl/TE/TExNTQ5NwAA_71787681_FAQ/images_3.9.png[/img]
图3.9 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]当选中[/font]<Add/Delete>[font=SimSun]后,会弹出一个对话框,如下图[/font]3.10[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, center][img=268,307]http://cache.automation.siemens.com/dnl/zU/zUzODg3AAAA_71787681_FAQ/images_3.10.png[/img]
图3.10 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]点击[/font]Add[font=SimSun]按钮,应用程序访问点将被添加到访问点列表中,如下图[/font]3.11[font=SimSun]所示[/font][/color][/size] [/p][p=30, 2, center][img=271,316]http://cache.automation.siemens.com/dnl/zE/zE0NjUyNQAA_71787681_FAQ/images_3.11.png[/img]
图3.11 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]在如图[/font]3.11[font=SimSun]的情况下,在[/font]Interface Parameter Assignment Used[font=SimSun]:选择[/font]TCP/IP->[font=SimSun]实际网卡的名称,设置完成后如图[/font]3.12[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]注意:[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]a.[font=SimSun]您的网卡不同,显示会有不同,请确保所选条目为您正在使用的普通以太网卡的名称。[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]b.[font=SimSun]这里使用的应用程序访问名称为[/font]CP-TCPIP[font=SimSun],因为在[/font]WINCC[font=SimSun]安装成功后,[/font]CP-TCPIP[font=SimSun]是[/font]TCP/IP[font=SimSun]驱动程序下默认的名称,所以在[/font]Set PG/PC Interface[font=SimSun]下我们添加此名称的访问点,您同样可以使用其他名称,但必须保证,必须同时修改,并保持完全一致,这样通讯同样可以实现。[/font][/color][/size] [/p][p=30, 2, center][img=297,326]http://cache.automation.siemens.com/dnl/zE/zE0MTkwOQAA_71787681_FAQ/images_3.12.png[/img]
图3.12 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]点击[/font]Diagnostics[font=SimSun]按钮后,可以对该网卡进行诊断,确保其正常工作,如图[/font]3.13[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, center][img=295,391]http://cache.automation.siemens.com/dnl/TY/TYyNjYxAAAA_71787681_FAQ/images_3.13.png[/img]
图3.13 [/p][p=30, 2, left][size=3][color=#000000][b]5[font=SimSun].添加通道与连接设置[/font][/b][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]添加驱动连接,设置参数。打开[/font]WINCC[font=SimSun]工程在[/font]Tag Management-->SIMATIC S7 PROTOCOL SUITE->TCP/IP[font=SimSun],右键单击[/font]TCPIP[font=SimSun],在下拉菜单中,点击[/font]New Driver Connection[font=SimSun],如图[/font]3.14[font=SimSun]所示,在弹出的[/font]Connection properties[font=SimSun]对话框中点击[/font]Properties[font=SimSun]按钮,弹出[/font]Connection Parameter- TCP/IP[font=SimSun]属性对话框,填入参数,如图[/font]3.15[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, center][img]http://cache.automation.siemens.com/dnl/zE/zEyNTY2OQAA_71787681_FAQ/images_3.14.png[/img]
图3.14 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]在弹出的对话框中输入[/font]STEP7[font=SimSun]中已经设置的[/font]PN-IO[font=SimSun]或者以太网模块的的[/font]IP[font=SimSun]地址和机架号和槽号。[/font][/color][/size] [/p][p=30, 2, center][img=323,325]http://cache.automation.siemens.com/dnl/TE/TEzNDU1OQAA_71787681_FAQ/images_3.15.png[/img]
图3.15 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]在弹出的[/font]Connection properties[font=SimSun]中点击[/font]Properties[font=SimSun]按钮,在弹出的[/font]Connection Parameter[font=SimSun]中输入参数:[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]IP Address[font=SimSun]:(通讯模块的[/font]IP[font=SimSun]地址)[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]Rack Number[font=SimSun]:[/font]CPU[font=SimSun]所处机架号,除特殊复杂使用的情况下,一般填入[/font]0[/color][/size] [/p][p=30, 2, left][size=3][color=#000000]Slot Number[font=SimSun]:[/font]CPU[font=SimSun]所处的槽号[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]注意:如果您是[/font]S7-300[font=SimSun]的[/font]PLC[font=SimSun],那么[/font]Slot Number[font=SimSun]的参数为[/font]2[font=SimSun],如果是[/font]S7-400[font=SimSun]的[/font]PLC[font=SimSun],那么要根据[/font]STEP7[font=SimSun]项目中的[/font]Hardware[font=SimSun]软件查看[/font]PLC[font=SimSun]插在第几号槽内,不能根据经验和物理安装位置来随便填写,可能的参数为[/font]2[font=SimSun]、[/font]3[font=SimSun]、[/font]4[font=SimSun](主要是依据电源的大小来决定)否则通讯不能建立。[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][b]6[font=SimSun].连接测试与通讯诊断[/font][/b][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]通过[/font]WINCC[font=SimSun]工具中的通道诊断程序[/font]WinCC Channel Diagnosis[font=SimSun]即可测试通讯是否建立。注意:此时[/font]PLC[font=SimSun]必须处于运行状态,老版本的[/font]PLC[font=SimSun]必须处于[/font]RUN-P[font=SimSun]或者[/font]RUN[font=SimSun]状态,[/font]WINCC[font=SimSun]必须激活运行,根据图[/font]3.16[font=SimSun]所示的位置,进入通道诊断工具,检测通讯是否成功建立。如图[/font]3.17[font=SimSun]所示,绿色的“√”表示通讯已经成功建立。[/font][/color][/size] [/p][p=30, 2, center][img=396,266]http://cache.automation.siemens.com/dnl/zE/zE0NDUxMQAA_71787681_FAQ/images_3.16.png[/img]
图3.16

[/p][p=30, 2, center][img=450,289]http://cache.automation.siemens.com/dnl/zE/zEzNzU1NQAA_71787681_FAQ/images_3.17.png[/img]
图3.17 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]至此[/font]WINCC[font=SimSun]使用普通以太网卡通过[/font]TCP/IP[font=SimSun]连接[/font]PLC[font=SimSun]的过程完毕。[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][b][font=SimSun]
四.[/font]WINCC[font=SimSun]使用普通网卡通过[/font]Industrial Ethernet[font=SimSun]连接[/font]PLC[/b][/color][/size] [/p][p=30, 2, left][b][size=3][color=#000000][font=SimSun]前提条件[/font][/color][/size][/b] [/p][p=30, 2, left][b][size=3][color=#000000][font=SimSun]通过[/font]Industrial Ethernet[font=SimSun]工业以太网实现[/font]PLC[font=SimSun]系统与[/font]WINCC6.0[font=SimSun]通讯的前提条件是[/font]PLC[font=SimSun]系统配备以太网模块或者使用带有[/font]PN[font=SimSun]接口的[/font]PLC[font=SimSun],以太网模块列表如下表所示:[/font][/color][/size][/b] [/p][p=30, 2, left][b][size=10.5pt][font=Arial] [/font][/size][/b] [/p]
[table]
[tr][td=1,1,163][p=30, 2, center][b][size=10.5pt]PLC[/size][/b][b][font=SimSun][size=10.5pt]系列[/size][/font][/b][/p][/td][td=1,1,405][p=30, 2, center][b][font=SimSun][size=10.5pt]以太网通讯模块[/size][/font][/b][/p][/td][/tr]
[tr][td=1,1,163][p=30, 2, center][b][size=10.5pt]S7-300[/size][/b][/p][/td][td=1,1,405][p=30, 2, center][b][size=10.5pt]CP343-1/CP343-1 Advanced-IT[/size][/b][/p][/td][/tr]
[tr][td=1,1,163][p=30, 2, center][b][size=10.5pt]S7-400[/size][/b][/p][/td][td=1,1,405][p=30, 2, center][b][size=10.5pt]CP443-1/CP443-1 Advanced-IT[/size][/b][/p][/td][/tr]
[/table]
[p=30, 2, left][size=3][color=#000000][font=SimSun]注:只有支持[/font]ISO[font=SimSun]通讯协议的模块才支持([/font]Industrial Ethernet[font=SimSun]工业以太网)通讯,具体情况可察看[/font]STEP7[font=SimSun]中的模块信息。最简单的判断以太网模块是否支持[/font]Industrial Ethernet[font=SimSun]通讯的方式是,在[/font]STEP7[font=SimSun]的硬件组态[/font]Hardware[font=SimSun]中是否具有[/font]MAC[font=SimSun]参数的填写的输入框,如下图[/font]4.1[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, center][img=488,374]http://cache.automation.siemens.com/dnl/TY/TYwMjY3AAAA_71787681_FAQ/images_4.1.png[/img]
图4.1 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]参考[/font]STEP 7[font=SimSun]软件中的产品硬件信息来判断以太网模块是否支持[/font]Industrial Ethernet[font=SimSun]工业以太网通讯,如下图[/font]4.2[font=SimSun]所示:[/font][/color][/size]   [/p][p=30, 2, center][img=290,276]http://cache.automation.siemens.com/dnl/zE/zE1MTk2OQAA_71787681_FAQ/images_4.2.png[/img]
图4.2
[/p][p=30, 2, left][size=3][color=#000000][font=SimSun]在通讯设置以前请确认模块支持[/font]Industrial Ethernet ISO[font=SimSun]通讯,而后进行如下设置:[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]本文档下列步骤应用[/font]CP443-1[font=SimSun]型号的以太网通讯模块,使用普通以太网卡连接。[/font][/color][/size] [/p][p=30, 2, left][b][size=3][color=#000000][font=SimSun]组态过程[/font][/color][/size][/b] [/p][p=30, 2, left][size=3][color=#000000][b]1[font=SimSun].[/font]STEP7[font=SimSun]硬件组态[/font][/b][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]使用[/font]STEP7[font=SimSun]编程软件对[/font]PLC[font=SimSun]系统进行软件组态,在[/font]Hardware[font=SimSun]界面内插入实际的[/font]PLC[font=SimSun]硬件,在本例中使用了两块[/font]CP443-1[font=SimSun]通讯模块,[/font]WINCC[font=SimSun]使用[/font]CP443-1(1)[font=SimSun]和[/font]PLC[font=SimSun]进行通讯[/font],[font=SimSun]如下图[/font]4.3[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, center][img=419,298]http://cache.automation.siemens.com/dnl/TI/TI1MzI0MQAA_71787681_FAQ/images_4.3.png[/img]
图4.3 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]在[/font]CP343-1(1)[font=SimSun]通讯模块上双击,会弹出[/font]Properties-CP443-1[font=SimSun]的属性对话框,在对话框中点击[/font]Properties[font=SimSun]…按钮,弹出属性对话框,激活“[/font]Set MAC address/use ISO Protocol[font=SimSun]”,在[/font]MAC address[font=SimSun]下设置通讯板卡的[/font]MAC[font=SimSun]地址,如图[/font]4.4[font=SimSun]所示,该地址可以在物理通讯板卡端口处标签上查看。[/font][/color][/size] [/p][p=30, 2, center][size=3][color=#000000][font=SimSun]
[img=441,317]http://cache.automation.siemens.com/dnl/TM/TMxMzQ1NwAA_71787681_FAQ/images_4.4.png[/img]
图[/font]4.4[/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]点击[/font]New[font=SimSun]按钮,[b]新建[/b]一个工业以太网络,在弹出的对话框都使用默认设置,[b]该步骤一定要做,否则无法建立通讯。[/b][/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]将组态编译,下载到[/font]CPU[font=SimSun],则[/font]PLC[font=SimSun]方面设置完成。对于第一次使用工业以太网通讯,必须保证首先使用[/font]MPI[font=SimSun]或者[/font]PROFIBUS[font=SimSun]的通讯方式,将设置好参数的组态下载到目标[/font]PLC[font=SimSun],此后即可通过工业以太网的方式进行程序监控和项目下载。[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]2[font=SimSun].添加驱动程序和设置系统参数[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]打开[/font]WINCC[font=SimSun]工程在[/font]Tag Management-->SIMATIC S7 PROTOCOL SUITE->Industrial Ethernet[font=SimSun],右键单击[/font]Industrial Ethernet[font=SimSun],在弹出菜单中点击[/font]System Parameter[font=SimSun],如图[/font]4.5[font=SimSun]所示,弹出[/font]System Parameter- Industrial Ethernet[font=SimSun]对话框,选择[/font]Unit[font=SimSun]标签,查看[/font]Logic device name[font=SimSun](逻辑设备名称)。默认安装后,逻辑设备名为[/font]CP_H1_1:[font=SimSun]如图[/font]4[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, center][img]http://cache.automation.siemens.com/dnl/TI/TI2MDg4MwAA_71787681_FAQ/images_4.5.png[/img]

图4.5
[/p][p=30, 2, center][img=309,333]http://cache.automation.siemens.com/dnl/zI/zIzNDk1MwAA_71787681_FAQ/images_4.6.png[/img]
图4.6 [/p][p=30, 2, left][size=3][color=#000000]3[font=SimSun].设置[/font]Set PG/PC Interface[/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]通讯接口设置,进入操作系统控制面板,双击[/font]Set PG/PC Interface[font=SimSun],在下拉菜单中选择[/font]CP_H1_1[font=SimSun]:如图[/font]4.7[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, center][img=288,342]http://cache.automation.siemens.com/dnl/zI/zI1MTk2OQAA_71787681_FAQ/images_4.7.png[/img]
图4.7 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]在如图[/font]4.7[font=SimSun]所示的情况下,在[/font]Interface Parameter Assignment Used[font=SimSun]:选择[/font]ISO Ind Ethernet->[font=SimSun]实际网卡的名称。[/font][/color][/size] [/p][p=30, 2, center][img=295,303]http://cache.automation.siemens.com/dnl/TU/TUxNjU2OQAA_71787681_FAQ/images_4.8.png[/img]
图4.8 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]注意:[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]您的网卡不同,显示会有不同,请确保所选条目为您正在使用的普通以太网卡的名称。[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]点击[/font]Diagnostics[font=SimSun]按钮后,可以对该网卡进行诊断,确保其正常工作,如图[/font]4.9[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, center][img=296,321]http://cache.automation.siemens.com/dnl/TI/TIyNzY2NQAA_71787681_FAQ/images_4.9.png[/img]
图4.9 [/p][p=30, 2, left][size=3][color=#000000]4[font=SimSun].添加通道与连接设置[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]添加驱动连接,设置参数。打开[/font]WINCC[font=SimSun]工程在[/font]Tag Management-->SIMATIC S7 PROTOCOL SUITE->Industrial Ethernet[font=SimSun],右键单击[/font]Industrial Ethernet[font=SimSun],在下拉菜单中,点击[/font]New Driver Connection[font=SimSun],如图[/font]4.10[font=SimSun]所示,在弹出的[/font]Connection properties[font=SimSun]对话框中点击[/font]Properties[font=SimSun]按钮,弹出[/font]Connection Parameter- Industrial Ethernet[font=SimSun]属性对话框,填入参数。[/font][/color][/size] [/p][p=30, 2, center][img=274,272]http://cache.automation.siemens.com/dnl/jI/jIyNTE1AAAA_71787681_FAQ/images_4.10.png[/img]

图4.10 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]在弹出的对话框中输入[/font]STEP7[font=SimSun]中已经设置的[/font]CP443-1[font=SimSun]通讯模块的[/font]MAC[font=SimSun]地址和机架号和槽号,如图[/font]4.11[font=SimSun]所示:[/font][/color][/size] [/p][p=30, 2, center]
[img=327,348]http://cache.automation.siemens.com/dnl/zI/zI0Nzk1MwAA_71787681_FAQ/images_4.11.png[/img]
图4.11 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]在弹出的[/font]Connection Properties[font=SimSun]中点击[/font]Properties[font=SimSun]按钮,在弹出的[/font]Connection Parameter[font=SimSun]中输入参数:[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]Ethernet Address[font=SimSun]:(通讯模块的[/font]MAC[font=SimSun]地址)[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000]Rack Number[font=SimSun]:[/font]CPU[font=SimSun]所处机架号,除特殊复杂使用的情况下,一般填入[/font]0[/color][/size] [/p][p=30, 2, left][size=3][color=#000000]Slot Number[font=SimSun]:[/font]CPU[font=SimSun]所处的槽号[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]注意:如果您是[/font]S7-300[font=SimSun]的[/font]PLC[font=SimSun],那么[/font]Slot Number[font=SimSun]的参数为[/font]2[font=SimSun],如果是[/font]S7-400[font=SimSun]的[/font]PLC[font=SimSun],那么要根据[/font]STEP7[font=SimSun]项目中的[/font]Hardware[font=SimSun]软件查看[/font]PLC[font=SimSun]插在第几号槽内,不能根据经验和物理安装位置来随便填写,可能的参数为[/font]2[font=SimSun]、[/font]3[font=SimSun]、[/font]4[font=SimSun](主要是依据电源的大小来决定)否则通讯不能建立。[/font][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][b]5[font=SimSun].连接测试与通讯诊断[/font][/b][/color][/size] [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]通过[/font]WINCC[font=SimSun]工具中的通道诊断程序[/font]WinCC Channel Diagnosis[font=SimSun]即可测试通讯是否建立。注意:此时[/font]PLC[font=SimSun]必须处于运行状态,老版本的[/font]PLC[font=SimSun]必须处于[/font]RUN-P[font=SimSun]或者[/font]RUN[font=SimSun]状态,[/font]WINCC[font=SimSun]必须激活运行,根据图[/font]1.9[font=SimSun]所示的位置,进入通道诊断工具,检测通讯是否成功建立。如图[/font]4.13[font=SimSun]所示,绿色的“√”表示通讯已经成功建立。[/font][/color][/size] [/p][p=30, 2, center][img=440,304]http://cache.automation.siemens.com/dnl/TM/TM0Mzc3MwAA_71787681_FAQ/images_4.12.png[/img]
图4.12
[/p][p=30, 2, center][img=464,288]http://cache.automation.siemens.com/dnl/TM/TMyMTU1NwAA_71787681_FAQ/images_4.13.png[/img]
图4.13 [/p][p=30, 2, left][size=3][color=#000000][font=SimSun]至此[/font]WINCC[font=SimSun]使用普通以太网卡通过[/font]Industrial Ethernet[font=SimSun]连接[/font]PLC[font=SimSun]的过程完毕。[/font][/color][/size] [/p][p=30, 2, left][b][color=#000000]关键词[/color][/b]
[color=#000000]WinCC[/color][color=#000000][font=SimSun][size=10.5pt],[/size][/font][size=10.5pt]PLC[/size][font=SimSun][size=10.5pt],通讯,[/size][/font][size=10.5pt]MPI[/size][font=SimSun][size=10.5pt]协议,[/size][/font][size=10.5pt]Profibus[/size][font=SimSun][size=10.5pt]协议,[/size][/font][size=10.5pt]Ethernet[/size][/color] [font=arial][size=2][color=#0000ff][/color][/size][/font][/p]

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.