施耐德SCADA系统平台WebService配置
  CLYEAq02EKEQ 2023年11月02日 27 0

系统平台WebService接口配置

首先编写一个WebService

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

打开SMC 点击Wonderware-WEBSVC -> REST

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

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

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

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

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

在 SOAP中添加

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

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

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

$op$mes.proxy.errormsg

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

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

Server name: OI.WEBSVC.1

施耐德SCADA系统平台WebService配置_SCADA_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配置_系统平台_10

施耐德SCADA系统平台WebService配置_SCADA_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;

【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月08日 0

暂无评论

CLYEAq02EKEQ