Пример #1
0
 public static void UpdateProductInLoadingStatus(PlcMaster master, ProductStatus productStatus)
 {
     byte[] dummy = { };
     if (master == null)
     {
         return;
     }
     if (master.connected)
     {
         master.WriteSingleRegister(1, 1, master.LoadingStateStartAddress, ModbusTcpHelper.WordArrayToByteArray(new[] { Convert.ToInt32(productStatus) }, 1), ref dummy);
     }
 }
Пример #2
0
 public static void SetVirtualIndexer(PlcMaster master, VirtualIndexerStates virtualIndexer)
 {
     byte[] dummy = { };
     if (master == null)
     {
         return;
     }
     if (master.connected)
     {
         master.WriteSingleRegister(4, 1, master.VirtualIndexerStartAddress, ModbusTcpHelper.WordArrayToByteArray(new[] { Convert.ToInt32(virtualIndexer) }, 1), ref dummy);
     }
 }
Пример #3
0
 public static void SetUniqueIdentityLength(PlcMaster master, int length)
 {
     byte[] dummy = { };
     if (master == null)
     {
         return;
     }
     if (master.connected)
     {
         master.WriteSingleRegister(5, 1, master.UniqueIdentityLengthAddress, ModbusTcpHelper.WordArrayToByteArray(new[] { length }, 1), ref dummy);
     }
 }
Пример #4
0
 public static void SetTraceabilityStates(PlcMaster master, TraceabilityStates traceability)
 {
     byte[] dummy = { };
     if (master == null)
     {
         return;
     }
     if (master.connected)
     {
         master.WriteSingleRegister(3, 1, master.TraceabilityStateStartAddress, ModbusTcpHelper.WordArrayToByteArray(new[] { Convert.ToInt32(traceability) }, 1), ref dummy);
     }
 }