0
点赞
收藏
分享

微信扫一扫

施耐德SCADA系统平台WebService配置

系统平台WebService接口配置

首先编写一个WebService

施耐德SCADA系统平台WebService配置_系统平台

打开SMC 点击Wonderware-WEBSVC -> REST

在REST Parameters 配置 WebService Address 匿名访问。

施耐德SCADA系统平台WebService配置_SCADA_02

施耐德SCADA系统平台WebService配置_SCADA_03

Device Items 中添加Name  ww.post.result    Item Reference $op$ww.post.result

施耐德SCADA系统平台WebService配置_系统平台_04

在 SOAP中添加

施耐德SCADA系统平台WebService配置_施耐德_05

施耐德SCADA系统平台WebService配置_SCADA_06

在OI.WEBSVC.1 中选择PORT->SOAP 添加Device Items 如Name:mes.errormsg Item Reference:

$op$mes.proxy.errormsg

施耐德SCADA系统平台WebService配置_系统平台_07

在系统平台中创建CMNJOPCClient_AssyLine_WS1 OPCClient,选择General Server node:localhost,

Server name: OI.WEBSVC.1

施耐德SCADA系统平台WebService配置_AVEVA_08

点击Scan Group 添加WSGroup 设置Update Interval 5000 毫秒

设置Attribute mes.inputs.content  Item Reference PORT.SOAP.mes.inputs.content

施耐德SCADA系统平台WebService配置_系统平台_09

在系统平台里创建WSProxy UserDefine 类型,添加Attributes WS_Rest_Body  DataType为String类型,

I/O :CMNJOPCClient_AssyLine_WS1.WSRest.ww.post.body

施耐德SCADA系统平台WebService配置_SCADA_10

施耐德SCADA系统平台WebService配置_施耐德_11

选择一个测试站点,在Scripts 页签添加脚本如下:

WSProxy.WS_Rest_Body = "{""system"":" + """ESOP""" + ",""method"":" + """ToolChange""" + ",""content"":""" + "AssyLine1" +"|" + "000002820230-001" + """}";

WSProxy.WS_Rest_Run = true;

LogMessage(WSProxy.WS_Rest_Body);

在HMI工单管理界面添加调用

Graphic  NJ_SU_WOLIST

1)      Symbol Scripts

OnChangeOrder2

               Me.var_MESWorkOrder=strMesOrderNo;

                      Me.var_PartNo=strPartNo;

                      'start call esop for changetools

                      WSProxy.WS_Rest_Body = "{""system"":" + """ESOP""" + ",""method"":" + """ToolChange""" + ",""content"":""" + Me.var_MesLineName +"|" + strMesOrderNo + """}";

                      WSProxy.WS_Rest_Run = true;

2)      关闭工单按钮

Edit Animations

'start call esop for changetools

WSProxy.WS_Rest_Body = "{""system"":" + """ESOP""" + ",""method"":" + """GetToolTime""" + ",""content"":""" + Me.var_MesLineName +"|" + strMesOrderNo + """}";

       WSProxy.WS_Rest_Run = true;

举报

相关推荐

0 条评论