| | |
| | | /// <param name="DbNumber">DB区指定值</param> |
| | | /// <param name="PosType">字符类型</param> |
| | | /// <param name="Pos">偏移量/地址</param> |
| | | /// <param name="Length">长度(字符串)</param> |
| | | /// <returns></returns> |
| | | public (IoTClient.Result, dynamic value) GetPlcDBValue(PLCDataTypeEnum PosType, string DbNumber, string Pos) |
| | | public (IoTClient.Result, dynamic value) GetPlcDBValue(PLCDataTypeEnum PosType, string DbNumber, string Pos, int? Length = 0) |
| | | { |
| | | lock (OLock) |
| | | { |
| | |
| | | result = _client.ReadDouble(address); |
| | | break; |
| | | case PLCDataTypeEnum.String: |
| | | result = _client.ReadString(address); |
| | | result = _client.ReadString(address, Convert.ToUInt16(Length)); |
| | | break; |
| | | default: |
| | | result = new IoTClient.Result<object>(); |