| | |
| | | /// <param name="startByte">偏移量地址 vb2001</param> |
| | | /// /// <param name="varType">值类型</param> |
| | | /// <returns></returns> |
| | | public static int ReadDpj(int startByte, S7.Net.VarType varType) |
| | | public static int ReadDpj(string ip,int startByte, S7.Net.VarType varType) |
| | | { |
| | | string ip = "10.68.9.15"; short port = 102; |
| | | // string ip = "10.68.9.15"; |
| | | short port = 102; |
| | | lock (_lockdpj) |
| | | { |
| | | try |
| | |
| | | /// <param name="startByte">偏移量地址</param> |
| | | /// <param name="value">写入值 byte类型只能0 1</param> |
| | | /// <returns></returns> |
| | | public static bool WriteDpj(int startByte, byte value) |
| | | public static bool WriteDpj(string ip,int startByte, byte value) |
| | | { |
| | | bool result = false; |
| | | string ip = "10.68.9.15"; short port = 102; |
| | | // string ip = "10.68.9.15"; |
| | | short port = 102; |
| | | lock (_lockdpj) |
| | | { |
| | | try |