|
|
@@ -290,7 +290,7 @@ namespace TeamAAS_VP.Core
|
|
|
SendTaskMessage($"{item.Name}{Lang.断开连接}!", MessageLevel.Alarm);
|
|
|
}
|
|
|
}
|
|
|
- //await WriteSystemParameterToPlcAsync(_configService.GetSystemConfiguration());
|
|
|
+ await WriteSystemParameterToPlcAsync(_configService.GetSystemConfiguration());
|
|
|
if (sb.Length == 0)
|
|
|
{
|
|
|
return (true, "");
|
|
|
@@ -842,18 +842,19 @@ namespace TeamAAS_VP.Core
|
|
|
{
|
|
|
var addressConfig = _configService.GetPlcAddresses();
|
|
|
var plc=_plcService.GetPlcByNumber(addressConfig.PlcNo) as OpcUaClientPLC;
|
|
|
+ if (plc == null) return;
|
|
|
Dictionary<string,object> nodeValues = new Dictionary<string, object>();
|
|
|
- nodeValues.Add(addressConfig.WorkMode.Address, systemConfiguration.WorkMode);
|
|
|
- nodeValues.Add(addressConfig.PickPointNum.Address, systemConfiguration.PickPointNum);
|
|
|
- nodeValues.Add(addressConfig.CameraShotCount.Address, systemConfiguration.CameraShotCount);
|
|
|
- nodeValues.Add(addressConfig.UpperCameraPickShotCount.Address, systemConfiguration.UpperCameraPickShotCount);
|
|
|
- nodeValues.Add(addressConfig.UpperCameraPlaceShotCount.Address, systemConfiguration.UpperCameraPlaceShotCount);
|
|
|
- nodeValues.Add(addressConfig.UpperCameraLockAssembleCount.Address, systemConfiguration.UpperCameraLockAssembleCount);
|
|
|
- nodeValues.Add(addressConfig.PickFixedPositionProductCameraCount.Address, systemConfiguration.PickFixedPositionProductCameraCount);
|
|
|
- nodeValues.Add(addressConfig.LockFixedPositionProductCameraCount.Address, systemConfiguration.LockFixedPositionProductCameraCount);
|
|
|
- nodeValues.Add(addressConfig.FixedCameraDetectLockAssembleCount.Address, systemConfiguration.FixedCameraDetectLockAssembleCount);
|
|
|
-
|
|
|
- await plc.WriteNodesAsync(nodeValues);
|
|
|
+ nodeValues.Add(addressConfig.WorkMode.Address, (Int16)systemConfiguration.WorkMode);
|
|
|
+ nodeValues.Add(addressConfig.PickPointNum.Address, (Int16)systemConfiguration.PickPointNum);
|
|
|
+ nodeValues.Add(addressConfig.CameraShotCount.Address, (Int16)systemConfiguration.CameraShotCount);
|
|
|
+ nodeValues.Add(addressConfig.UpperCameraPickShotCount.Address, (Int16)systemConfiguration.UpperCameraPickShotCount);
|
|
|
+ nodeValues.Add(addressConfig.UpperCameraPlaceShotCount.Address, (Int16)systemConfiguration.UpperCameraPlaceShotCount);
|
|
|
+ nodeValues.Add(addressConfig.UpperCameraLockAssembleCount.Address, (Int16)systemConfiguration.UpperCameraLockAssembleCount);
|
|
|
+ nodeValues.Add(addressConfig.PickFixedPositionProductCameraCount.Address, (Int16)systemConfiguration.PickFixedPositionProductCameraCount);
|
|
|
+ nodeValues.Add(addressConfig.LockFixedPositionProductCameraCount.Address, (Int16)systemConfiguration.LockFixedPositionProductCameraCount);
|
|
|
+ nodeValues.Add(addressConfig.FixedCameraDetectLockAssembleCount.Address, (Int16)systemConfiguration.FixedCameraDetectLockAssembleCount);
|
|
|
+
|
|
|
+ var res= await plc.WriteNodesAsync(nodeValues);
|
|
|
}
|
|
|
|
|
|
#endregion
|