点击或拖拽改变大小

SiemensWebApiConnectServerAsync 方法

根据设置好的用户名和密码信息,登录远程的PLC,返回是否登录成功!在读写之前,必须成功调用当前的方法,获取到token,否则无法进行通信。
According to the set user name and password information, log in to the remote PLC, and return whether the login is successful! Before reading and writing, the current method must be successfully called to obtain the token, otherwise communication cannot be carried out.

命名空间:  HslCommunication.Profinet.Siemens
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法
public Task<OperateResult> ConnectServerAsync()

返回值

类型:TaskOperateResult
是否连接成功
参见