|
|
|
@ -336,11 +336,17 @@ public class DoSwappingState : IState
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public StateResult CheckChannelStatus(SwappingStateMachine machine)
|
|
|
|
|
{
|
|
|
|
|
int count = 0;
|
|
|
|
|
while (!machine.ChannelStatusOkFlag)
|
|
|
|
|
{
|
|
|
|
|
_log.Info("begin plc CheckChannelStatus");
|
|
|
|
|
Thread.Sleep(1000);
|
|
|
|
|
var channelStatus = PlcApi.ChannelStatus();
|
|
|
|
|
if (count % 10 == 0)
|
|
|
|
|
{
|
|
|
|
|
SoundTool.PlayOneSound((int)InfoEnum.SwapInfo.CarTakePhotoInfo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (channelStatus == 1000)
|
|
|
|
|
{
|
|
|
|
|
machine.ChannelStatusOkFlag = true;
|
|
|
|
@ -358,7 +364,8 @@ public class DoSwappingState : IState
|
|
|
|
|
Thread.Sleep(3000);
|
|
|
|
|
machine.VehiclesInPlace2Flag = false;
|
|
|
|
|
machine.StartSwappingFlag = false;
|
|
|
|
|
|
|
|
|
|
machine.PlcHoldFlag = false;
|
|
|
|
|
machine.ChannelStatusOkFlag = false;
|
|
|
|
|
//回归到本阶段的读锁止状态
|
|
|
|
|
return new StateResult()
|
|
|
|
|
{
|
|
|
|
|