FujiSPBHelperReadBoolAsync 方法 |
批量读取PLC的Bool数据,以位为单位,支持读取X,Y,L,M,D,TN,CN,TC,CC,R,W,例如 M100, 如果是寄存器地址,可以使用D10.12来访问第10个字的12位,地址可以携带站号信息,例如:s=2;M100
Read PLC's Bool data in batches, in units of bits, support reading X, Y, L, M, D, TN, CN, TC, CC, R, W, such as M100, if it is a register address,
you can use D10. 12 to access the 12 bits of the 10th word, the address can carry station number information, for example: s=2;M100
命名空间:
HslCommunication.Profinet.Fuji
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public static Task<OperateResult<bool[]>> ReadBoolAsync(
IReadWriteDevice device,
byte station,
string address,
ushort length
)
Public Shared Function ReadBoolAsync (
device As IReadWriteDevice,
station As Byte,
address As String,
length As UShort
) As Task(Of OperateResult(Of Boolean()))
public:
static Task<OperateResult<array<bool>^>^>^ ReadBoolAsync(
IReadWriteDevice^ device,
unsigned char station,
String^ address,
unsigned short length
)
static member ReadBoolAsync :
device : IReadWriteDevice *
station : byte *
address : string *
length : uint16 -> Task<OperateResult<bool[]>>
参数
- device
- 类型:HslCommunication.CoreIReadWriteDevice
PLC设备通信对象 - station
- 类型:SystemByte
当前的站号信息 - address
- 类型:SystemString
地址信息,举例:M100, D10.12 - length
- 类型:SystemUInt16
读取的bool长度信息
返回值
类型:
TaskOperateResultBooleanBool[]的结果对象
参见