点击或拖拽改变大小

MelsecFxSerialHelper 类

三菱编程口协议的辅助方法,定义了如何读写bool数据,以及读写原始字节的数据。
The auxiliary method of Mitsubishi programming port protocol defines how to read and write bool data and read and write raw byte data.
继承层次
SystemObject
  HslCommunication.Profinet.Melsec.HelperMelsecFxSerialHelper

命名空间:  HslCommunication.Profinet.Melsec.Helper
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:11.8.2.0 (11.8.2.0)
语法
public class MelsecFxSerialHelper

MelsecFxSerialHelper 类型公开以下成员。

构造函数
  名称说明
公共方法MelsecFxSerialHelper
初始化 MelsecFxSerialHelper 类的一个新实例
Top
方法
  名称说明
公共方法静态成员ActivePlc
激活PLC的接收状态,需要再和PLC交互之前进行调用,之后就需要再调用了。
公共方法静态成员ActivePlcAsync
激活PLC的接收状态,需要再和PLC交互之前进行调用,之后就需要再调用了。
公共方法静态成员BuildReadBoolCommand
根据类型地址长度确认需要读取的指令头
公共方法静态成员BuildReadWordCommand
根据类型地址长度确认需要读取的指令头
公共方法静态成员BuildWriteBoolPacket
生成位写入的数据报文信息,该报文可直接用于发送串口给PLC
公共方法静态成员BuildWriteWordCommand
根据类型地址以及需要写入的数据来生成指令头
公共方法静态成员CheckPlcReadResponse
检查PLC返回的读取数据是否是正常的
公共方法静态成员CheckPlcWriteResponse
检查PLC返回的写入的数据是否是正常的
公共方法静态成员CheckReceiveDataComplete
检查当前从串口接收的数据是否是完整的,如果是完整的,则需要返回 True,串口数据接收立即完成,默认返回 False
Check whether the data currently received from the serial port is complete. If it is complete, you need to return True. The serial port data reception is completed immediately, and the default returns False
公共方法Equals (继承自 Object。)
公共方法静态成员ExtractActualBoolData
从PLC反馈的数据进行提炼bool数组操作
公共方法静态成员ExtractActualData
从PLC反馈的数据进行提炼操作
受保护的方法Finalize (继承自 Object。)
公共方法静态成员FxAnalysisAddress
解析数据地址成不同的三菱地址类型
公共方法GetHashCode (继承自 Object。)
公共方法GetType (继承自 Object。)
受保护的方法MemberwiseClone (继承自 Object。)
公共方法静态成员代码示例Read
根据指定的地址及长度信息从三菱PLC中读取原始的字节数据,根据PLC中实际定义的规则,可以解析出任何类的数据信息
Read the original byte data from the Mitsubishi PLC according to the specified address and length information. According to the rules actually defined in the PLC, any type of data information can be parsed
公共方法静态成员代码示例ReadAsync
根据指定的地址及长度信息从三菱PLC中读取原始的字节数据,根据PLC中实际定义的规则,可以解析出任何类的数据信息
Read the original byte data from the Mitsubishi PLC according to the specified address and length information. According to the rules actually defined in the PLC, any type of data information can be parsed
公共方法静态成员代码示例ReadBool
从三菱PLC中批量读取位软元件,返回读取结果,该读取地址最好从0,16,32...等开始读取,这样可以读取比较长的数据数组
Read bit devices in batches from Mitsubishi PLC and return the read results. The read address should preferably be read from 0, 16, 32... etc., so that a relatively long data array can be read
公共方法静态成员代码示例ReadBoolAsync
从三菱PLC中批量读取位软元件,返回读取结果,该读取地址最好从0,16,32...等开始读取,这样可以读取比较长的数据数组
Read bit devices in batches from Mitsubishi PLC and return the read results. The read address should preferably be read from 0, 16, 32... etc., so that a relatively long data array can be read
公共方法ToString (继承自 Object。)
公共方法静态成员Write(IReadWriteDevice, String, Boolean)
强制写入位数据的通断,支持的类型参考文档说明
The on-off of the forced write bit data, please refer to the document description for the supported types
公共方法静态成员代码示例Write(IReadWriteDevice, String, Byte, Boolean)
根据指定的地址向PLC写入数据,数据格式为原始的字节类型
Write data to the PLC according to the specified address, the data format is the original byte type
公共方法静态成员WriteAsync(IReadWriteDevice, String, Boolean)
强制写入位数据的通断,支持的类型参考文档说明
The on-off of the forced write bit data, please refer to the document description for the supported types
公共方法静态成员代码示例WriteAsync(IReadWriteDevice, String, Byte, Boolean)
根据指定的地址向PLC写入数据,数据格式为原始的字节类型
Write data to the PLC according to the specified address, the data format is the original byte type
Top
扩展方法
  名称说明
公共扩展器方法ToJsonString
获取当前对象的JSON格式表示的字符串。
Gets the string represented by the JSON format of the current object.
(由 HslExtension 定义。)
Top
参见