点击或拖拽改变大小

OmronHostLinkCMode 类

欧姆龙的HostLink的C-Mode实现形式,地址支持携带站号信息,例如:s=2;D100
Omron's HostLink C-Mode implementation form, the address supports carrying station number information, for example: s=2;D100
继承层次
SystemObject
  HslCommunication.SerialSerialBase
    HslCommunication.SerialSerialDeviceBase
      HslCommunication.Profinet.OmronOmronHostLinkCMode

命名空间:  HslCommunication.Profinet.Omron
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:11.8.2.0 (11.8.2.0)
语法
public class OmronHostLinkCMode : SerialDeviceBase, 
	IHostLinkCMode, IReadWriteNet

OmronHostLinkCMode 类型公开以下成员。

构造函数
  名称说明
公共方法OmronHostLinkCMode
实例化一个欧姆龙PLC Fins帧协议的通讯对象
Instantiate a communication object of Omron PLC Fins frame protocol
Top
属性
  名称说明
公共属性BaudRate
当前连接串口信息的波特率
Baud rate of current connection serial port information
(继承自 SerialBase。)
公共属性代码示例ByteTransform
当前的数据变换机制,当你需要从字节数据转换类型数据的时候需要。
The current data transformation mechanism is required when you need to convert type data from byte data.
(继承自 SerialDeviceBase。)
公共属性ConnectionId
当前连接的唯一ID号,默认为长度20的guid码加随机数组成,方便列表管理,也可以自己指定
The unique ID number of the current connection. The default is a 20-digit guid code plus a random number.
(继承自 SerialDeviceBase。)
公共属性IsClearCacheBeforeRead
是否在发送数据前清空缓冲数据,默认是false
Whether to empty the buffer before sending data, the default is false
(继承自 SerialBase。)
公共属性代码示例LogNet
组件的日志工具,支持日志记录,只要实例化后,当前网络的基本信息,就以DEBUG等级进行输出
The component's logging tool supports logging. As long as the instantiation of the basic network information, the output will be output at DEBUG
(继承自 SerialBase。)
公共属性PortName
当前连接串口信息的端口号名称
The port name of the current connection serial port information
(继承自 SerialBase。)
公共属性ReceiveEmptyDataCount
获取或设置连续接收空的数据次数,在数据接收完成时有效,每个单位消耗的时间为SleepTime,配合CheckReceiveDataComplete(MemoryStream)来更好的控制完整数据接收。
Get or set the number of consecutive empty data receptions, which is valid when data reception is completed. The time consumed by each unit is SleepTime, which is better with CheckReceiveDataComplete(MemoryStream) Control complete data reception.
(继承自 SerialBase。)
公共属性ReceiveTimeout
接收数据的超时时间,默认5000ms
Timeout for receiving data, default is 5000ms
(继承自 SerialBase。)
公共属性RtsEnable
获取或设置一个值,该值指示在串行通信中是否启用请求发送 (RTS) 信号。
Gets or sets a value indicating whether the request sending (RTS) signal is enabled in serial communication.
(继承自 SerialBase。)
公共属性SleepTime
连续串口缓冲数据检测的间隔时间,默认20ms,该值越小,通信速度越快,但是越不稳定。
Continuous serial port buffer data detection interval, the default 20ms, the smaller the value, the faster the communication, but the more unstable.
(继承自 SerialBase。)
公共属性UnitNumber
PLC设备的站号信息
PLC device station number information
受保护的属性WordLength
一个字单位的数据表示的地址长度,西门子为2,三菱,欧姆龙,modbusTcp就为1,AB PLC无效
The address length represented by one word of data, Siemens is 2, Mitsubishi, Omron, modbusTcp is 1, AB PLC is invalid
(继承自 SerialDeviceBase。)
Top
方法
  名称说明
公共方法ChangePlcMode(Byte)
[商业授权] 将当前PLC的模式变更为指定的模式,0: 编程模式 1: 运行模式 2: 监视模式
[Authorization] Change the current PLC mode to the specified mode, 0: programming mode 1: running mode 2: monitoring mode
公共方法ChangePlcMode(Byte, Byte)
[商业授权] 将当前PLC的模式变更为指定的模式,0: 编程模式 1: 运行模式 2: 监视模式
[Authorization] Change the current PLC mode to the specified mode, 0: programming mode 1: running mode 2: monitoring mode
受保护的方法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
(重写 SerialBase