FatekProgramHelper 方法 |
FatekProgramHelper 类型公开以下成员。
名称 | 说明 | |
---|---|---|
BuildReadBoolCommand |
创建一条读取的指令信息,需要指定一些参数
| |
BuildReadWordCommand |
创建一条读取的指令信息,需要指定一些参数
| |
BuildWriteBoolCommand |
创建一条别入bool数据的指令信息,需要指定一些参数
| |
BuildWriteByteCommand |
创建一条别入byte数据的指令信息,需要指定一些参数,按照字单位
| |
CalculateAcc |
计算指令的和校验码
| |
CheckReceiveDataComplete |
检查当前的串口的数据接收是否完整
| |
CheckResponse |
检查PLC反馈的报文是否正确,如果不正确,返回错误消息
| |
Equals | Determines whether the specified object is equal to the current object. (继承自 Object。) | |
ExtraResponse |
提取当前的结果数据信息,针对的是字单位的方式
| |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (继承自 Object。) | |
GetErrorDescriptionFromCode |
根据错误码获取到真实的文本信息
| |
GetHashCode | Serves as the default hash function. (继承自 Object。) | |
GetType | Gets the Type of the current instance. (继承自 Object。) | |
MemberwiseClone | Creates a shallow copy of the current Object. (继承自 Object。) | |
PackFatekCommand |
将Fatek的基本命令打包成可以发送PLC的电文消息
| |
Read |
批量读取PLC的字节数据,以字为单位,支持读取X,Y,M,S,D,T,C,R,RT,RC具体的地址范围需要根据PLC型号来确认,地址可以携带站号信息,例如 s=2;D100 Read PLC byte data in batches, in word units. Supports reading X, Y, M, S, D, T, C, R, RT, RC. The specific address range needs to be confirmed according to the PLC model, The address can carry station number information, such as s=2;D100 | |
ReadAsync |
批量读取PLC的字节数据,以字为单位,支持读取X,Y,M,S,D,T,C,R,RT,RC具体的地址范围需要根据PLC型号来确认,地址可以携带站号信息,例如 s=2;D100 Read PLC byte data in batches, in word units. Supports reading X, Y, M, S, D, T, C, R, RT, RC. The specific address range needs to be confirmed according to the PLC model, The address can carry station number information, such as s=2;D100 | |
ReadBool |
批量读取bool类型数据,支持的类型为X,Y,M,S,T,C,具体的地址范围取决于PLC的类型,地址可以携带站号信息,例如 s=2;M100 Read bool data in batches. The supported types are X, Y, M, S, T, C. The specific address range depends on the type of PLC, The address can carry station number information, such as s=2;M100 | |
ReadBoolAsync |
批量读取bool类型数据,支持的类型为X,Y,M,S,T,C,具体的地址范围取决于PLC的类型,地址可以携带站号信息,例如 s=2;M100 Read bool data in batches. The supported types are X, Y, M, S, T, C. The specific address range depends on the type of PLC, The address can carry station number information, such as s=2;M100 | |
ReadStatus |
读取当前PLC的状态信息,返回一个bool数组,同时包含了几种电量信息,分别为 0: RUN/STOP, 1: BAT LOW/正常, 2: Ladder checksum error/正常, 3: 使用ROM PACK/未使用,
4: WDT Timeout/正常, 5: 设定ID/未设ID, 6: 紧急停机/正常 Read the status information of the current PLC and return a bool array, which also contains several power information, 0: RUN/STOP, 1: BAT LOW/normal, 2: Ladder checksum error/normal, 3: Use ROM PACK/ Not used, 4: WDT Timeout/Normal, 5: ID set/ID not set, 6: Emergency stop/Normal | |
ReadStatusAsync |
使PLC处于STOP状态
| |
Run |
使PLC处于RUN的状态
| |
RunAsync |
使PLC处于RUN的状态
| |
Stop |
使PLC处于STOP状态
| |
StopAsync |
使PLC处于STOP状态
| |
ToString | Returns a string that represents the current object. (继承自 Object。) | |
Write(IReadWriteDevice, Byte, String, Boolean) |
批量写入bool类型的数组,支持的类型为X,Y,M,S,T,C,具体的地址范围取决于PLC的类型,地址可以携带站号信息,例如 s=2;M100 Write arrays of type bool in batches. The supported types are X, Y, M, S, T, C. The specific address range depends on the type of PLC, The address can carry station number information, such as s=2;M100 | |
Write(IReadWriteDevice, Byte, String, Byte) |
批量写入PLC的数据,以字为单位,也就是说最少2个字节信息,支持X,Y,M,S,D,T,C,R,RT,RC具体的地址范围需要根据PLC型号来确认,地址可以携带站号信息,例如 s=2;D100 The data written to the PLC in batches, in units of words, that is, at least 2 bytes of information, supporting X, Y, M, S, D, T, C, R, RT, and RC. The specific address range needs to be based on the PLC model To confirm, The address can carry station number information, such as s=2;D100 | |
WriteAsync(IReadWriteDevice, Byte, String, Boolean) |
批量写入bool类型的数组,支持的类型为X,Y,M,S,T,C,具体的地址范围取决于PLC的类型,地址可以携带站号信息,例如 s=2;M100 Write arrays of type bool in batches. The supported types are X, Y, M, S, T, C. The specific address range depends on the type of PLC, The address can carry station number information, such as s=2;M100 | |
WriteAsync(IReadWriteDevice, Byte, String, Byte) |
批量写入PLC的数据,以字为单位,也就是说最少2个字节信息,支持X,Y,M,S,D,T,C,R,RT,RC具体的地址范围需要根据PLC型号来确认,地址可以携带站号信息,例如 s=2;D100 The data written to the PLC in batches, in units of words, that is, at least 2 bytes of information, supporting X, Y, M, S, D, T, C, R, RT, and RC. The specific address range needs to be based on the PLC model To confirm, The address can carry station number information, such as s=2;D100 |
名称 | 说明 | |
---|---|---|
ToJsonString |
获取当前对象的JSON格式表示的字符串。 (由 HslExtension 定义。)Gets the string represented by the JSON format of the current object. |