自动化立体仓库 - WCS系统
#
lsh
2024-09-14 f9665e573dcf115ded7ac6aaeeb58907388f961d
#
3个文件已修改
54 ■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/RgvController.java 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/thread/SiemensDevpThread.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/RgvController.java
@@ -22,12 +22,14 @@
import com.zy.core.enums.RgvModeType;
import com.zy.core.enums.RgvTaskModeType;
import com.zy.core.enums.SlaveType;
import com.zy.core.model.DevpSlave;
import com.zy.core.model.RgvSlave;
import com.zy.core.model.Task;
import com.zy.core.model.command.RgvCommand;
import com.zy.core.model.protocol.RgvProtocol;
import com.zy.core.properties.SlaveProperties;
import com.zy.core.thread.RgvThread;
import com.zy.core.thread.SiemensDevpThread;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
@@ -383,10 +385,35 @@
//    @ManagerAuth(memo = "轨道PLC状态信息")
    public R wnergyGatheringRingParamTrack(){
        List<EnergyGatheringRingParam> result = new ArrayList<>();
        EnergyGatheringRingParam energyGatheringRingParam = new EnergyGatheringRingParam();
        energyGatheringRingParam.setTrackColor("rgba(0, 230, 118, 0.5)");
        energyGatheringRingParam.setRadiationColor("rgba(0, 230, 118, 0.5)");
        result.add(energyGatheringRingParam);
        try{
            for (DevpSlave devp : slaveProperties.getDevp()) {
                SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId());
                if (devpThread.isResult()){
                    if (true){
                        EnergyGatheringRingParam energyGatheringRingParam = new EnergyGatheringRingParam();
                        energyGatheringRingParam.setTrackColor("rgba(0, 230, 118, 0.5)");
                        energyGatheringRingParam.setRadiationColor("rgba(0, 230, 118, 0.5)");
                        result.add(energyGatheringRingParam);
                    } else {
                        EnergyGatheringRingParam energyGatheringRingParam = new EnergyGatheringRingParam();
                        energyGatheringRingParam.setTrackColor("rgba(0, 230, 118, 0.5)");
                        energyGatheringRingParam.setRadiationColor("rgba(0, 230, 118, 0.5)");
                        result.add(energyGatheringRingParam);
                    }
                }
            }
            if (result.isEmpty()){
                EnergyGatheringRingParam energyGatheringRingParam = new EnergyGatheringRingParam();
                energyGatheringRingParam.setTrackColor("rgba(0, 0, 0, 81)");
                energyGatheringRingParam.setRadiationColor("rgba(0, 0, 0, 81)");
                result.add(energyGatheringRingParam);
            }
        } catch (Exception e){
            EnergyGatheringRingParam energyGatheringRingParam = new EnergyGatheringRingParam();
            energyGatheringRingParam.setTrackColor("rgba(0, 0, 0, 81)");
            energyGatheringRingParam.setRadiationColor("rgba(0, 0, 0, 81)");
            result.add(energyGatheringRingParam);
        }
        return R.ok().add(result);
    }
src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -46,6 +46,7 @@
    public boolean charge0;     //请求充电
    public boolean charge1;     //请求充电
    private short heartBeatVal = 1;
    private boolean result = false;
    public static final ArrayList<Integer> staNos1 = new ArrayList<Integer>() {{
        add(100);add(101);add(102);add(103);add(104);add(105);add(106);add(107);
        add(108);add(109);add(110);add(111);add(112);add(113);add(114);add(115);
@@ -198,7 +199,7 @@
    @Override
    public boolean connect() {
        boolean result = false;
        result = false;
        siemensS7Net = new SiemensS7Net(SiemensPLCS.S1200, slave.getIp());
        siemensS7Net.setRack(slave.getRack().byteValue());
        siemensS7Net.setSlot(slave.getSlot().byteValue());
src/main/resources/application.yml
@@ -38,16 +38,16 @@
  devp[0]:
    id: 1
    ip: 192.168.4.250
    port: 102
    port: 502
    rack: 0
    slot: 0
  # 输送线
  devp[1]:
    id: 2
    ip: 192.168.4.250
    port: 102
    rack: 0
    slot: 0
#  # 输送线
#  devp[1]:
#    id: 2
#    ip: 192.168.4.250
#    port: 102
#    rack: 0
#    slot: 0
  # RGV穿梭车1
  rgv[0]:
    id: 1