修改为false

This commit is contained in:
2025-08-08 08:57:00 +08:00
parent a478124379
commit 99ad20689f
5 changed files with 28 additions and 7 deletions

View File

@@ -110,4 +110,6 @@ public interface IIndustryStepService
void errorCorrection();
void start(IndustryStep industryStep);
Boolean updateNextState(IndustryStep industryStep);
}

View File

@@ -601,4 +601,17 @@ public class IndustryStepServiceImpl implements IIndustryStepService {
industryStep.setOperation(1L);
industryStepMapper.start(industryStep);
}
@Override
public Boolean updateNextState(IndustryStep industryStep) {
// TODO PLC
// 将切换道次改为false
s7PLC.writeBoolean("DB15.1.2", false);
// 判断当前切换是否转化过来成false 没有则再发
while (s7PLC.readBoolean("DB15.1.2")) {
Threads.sleep(500);
}
return !s7PLC.readBoolean("DB15.1.2");
}
}