wuyouming666
2024-01-11 5400d8b310ce6fe6919594a096f3a87307a66e61
Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
15个文件已修改
8个文件已添加
1449 ■■■■ 已修改文件
CanadaMes-ui/src/api/home.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/lang/locales/en-US.json 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/lang/locales/zh-CN.json 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/layout/index.vue 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/views/home/index.vue 89 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java 241 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter1Review.java 213 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java 78 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/PlcsignReview.java 124 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/entity/Out_slice.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/entity/device/PlcBitInfo.java 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/entity/device/PlcBitObject.java 113 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/entity/device/PlcParameterInfo.java 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/entity/device/PlcParameterObject.java 149 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/service/North_Glass_Buffer1Service.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/service/OutSliceServive.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/resources/JsonFile/PlcParameter.json 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/resources/JsonFile/PlcSign.json 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/api/home.js
@@ -238,3 +238,10 @@
    })
}
export function FrameStateUpdate(frameno,framestate) {
    return request({
        url: '/home/FrameStateUpdate?frameno=' + frameno+'&framestate='+framestate,
        method: 'post',
        data:""
    })
}
CanadaMes-ui/src/lang/locales/en-US.json
@@ -341,6 +341,9 @@
  "EXTERIQR OUT AND BYPASS TO THE RIGHT":"EXTERIQR OUT AND BYPASS TO THE RIGHT",
  "Complete Task":"Complete Task",
  "Outed":"Outed",
  "Queue State":"Queue State",
  "Sorting State":"Sorting State",
  "Confirm State":"Confirm State",
    "ServoManualone": {
      "A01 所在格子": "A01 Current Grid",
      "数量": "Quantity",
CanadaMes-ui/src/lang/locales/zh-CN.json
@@ -330,6 +330,9 @@
  "EXTERIQR OUT AND BYPASS TO THE RIGHT":"EXTERIQR OUT AND BYPASS TO THE RIGHT",
  "Complete Task":"完成任务",
  "Outed":"已出笼",
  "Queue State":"队列状态",
  "Sorting State":"排序状态",
  "Confirm State":"确认状态",
  "langparameter": {
    "conveyor Velocity(Auto FAST)": "D01-D06 皮带输送自动快速",
    "conveyor Velocity(Auto SLOW)": "D01-D06 皮带输送自动慢速",
CanadaMes-ui/src/layout/index.vue
@@ -103,19 +103,19 @@
      </el-table>
    </el-dialog>
    <el-dialog :visible.sync="dialogFormCountDown" :title="$t('Approximately resettable time')" top="5vh">
            <div :style="'font-size: ' + PromptSize + 'px;text-align: center;'">
                <!-- {{ this.CountDowns }} -->
                {{ this.CountDowns }}
            </div>
        </el-dialog>
    <el-dialog :visible.sync="dialogFormVisible3">
      <div :style="'font-size: ' + PromptSize + 'px;text-align: center;'">
        <!-- {{ this.CountDowns }} -->
        {{ this.CountDowns }}
      </div>
    </el-dialog>
    <!-- <el-dialog :visible.sync="dialogFormVisible3">
      <el-button :class="{ 'blue-button': receivedData === 1 }" @click="toggleButtonValue(1)">{{
        $t('A01Abort/ResumeTasks') }}</el-button>
      <el-button :class="{ 'blue-button': receivedData2 === 1 }" @click="toggleButtonValue(2)">{{
        $t('A02Abort/ResumeTasks') }}</el-button>
    </el-dialog>
    </el-dialog> -->
  </el-container>
</template>
@@ -161,7 +161,7 @@
      CountDowns: "0",
      EmergencyStop: false,
      PromptSize: 250,
      dialogFormCountDown:false
      dialogFormCountDown: false
    }
  },
@@ -274,7 +274,6 @@
            }
            //复位倒计时
            console.log(obj.countdown);
            if (obj.countdown != null) {
              if ((obj.countdown[0] == true && this.CountDowns == 0) || this.EmergencyStop == true) {
                this.CountDown();
@@ -292,13 +291,12 @@
          if (obj.Abort) {
            if (obj.Abort[0].length > 0) {
              this.receivedData = obj.Abort[0][0];
              this.receivedData2 = obj.Abort[0][1];
              this.dialogFormVisible3 = true;
              // this.dialogFormVisible3 = true;
            }
          }
          this.$forceUpdate();
@@ -328,7 +326,6 @@
              this.PromptSize = 500;
              this.CountDowns = count;
              count--;
              this.dialogFormCountDown = true;
            }
            else {
              this.PromptSize = 200;
@@ -339,10 +336,13 @@
              }
            }
          }
        },
        1000
      );
      if (this.reset == false) {
        this.dialogFormCountDown = true;
      }
    },
    logout: function () {
      removeToken()
CanadaMes-ui/src/views/home/index.vue
@@ -245,13 +245,13 @@
            </div>
            <div>
                <el-table :data="this.tasklist1" border style="width: 100%">
                    <el-table-column :width="180" prop="glassId" :label="$t('Outfeed glass barcode')"></el-table-column>
                    <el-table-column :width="130" prop="cage" :label="$t('Cage No')"></el-table-column>
                    <el-table-column :width="130" prop="cell" :label="$t('Slot No')"></el-table-column>
                    <el-table-column :width="130" prop="orderId" :label="$t('Order No')"></el-table-column>
                    <el-table-column :min-width="180" prop="glassId" :label="$t('Outfeed glass barcode')"></el-table-column>
                    <el-table-column :min-width="130" prop="cage" :label="$t('Cage No')"></el-table-column>
                    <el-table-column :min-width="130" prop="cell" :label="$t('Slot No')"></el-table-column>
                    <el-table-column :min-width="130" prop="orderId" :label="$t('Order No')"></el-table-column>
                    <el-table-column prop="orderId" :label="$t('List No')"></el-table-column>
                    <el-table-column prop="orderId" :label="$t('Box No')"></el-table-column>
                    <el-table-column :width="130" prop="lengthWidth" :label="$t('Dim')">
                    <el-table-column :min-width="150" prop="lengthWidth" :label="$t('Dim')">
                        <template slot-scope='scope'>
                            {{ scope.row.glasswidthmm }}*{{ scope.row.glassheightmm }}
                        </template>
@@ -265,13 +265,13 @@
                    </el-table-column>
                </el-table>
                <el-table :data="this.tasklist2" border style="width: 100%">
                    <el-table-column :width="180" prop="glassId" :label="$t('Infeed glass barcode')"></el-table-column>
                    <el-table-column :width="130" prop="cage" :label="$t('Cage No')"></el-table-column>
                    <el-table-column :width="130" prop="cell" :label="$t('Slot No')"></el-table-column>
                    <el-table-column :width="130" prop="orderId" :label="$t('Order No')"></el-table-column>
                    <el-table-column :min-width="180" prop="glassId" :label="$t('Infeed glass barcode')"></el-table-column>
                    <el-table-column :min-width="130" prop="cage" :label="$t('Cage No')"></el-table-column>
                    <el-table-column :min-width="130" prop="cell" :label="$t('Slot No')"></el-table-column>
                    <el-table-column :min-width="130" prop="orderId" :label="$t('Order No')"></el-table-column>
                    <el-table-column prop="orderId" :label="$t('List No')"></el-table-column>
                    <el-table-column prop="orderId" :label="$t('Box No')"></el-table-column>
                    <el-table-column :width="130" prop="lengthWidth" :label="$t('Dim')">
                    <el-table-column :min-width="150" prop="lengthWidth" :label="$t('Dim')">
                        <template slot-scope='scope'>
                            {{ scope.row.glasswidthmm }}*{{ scope.row.glassheightmm }}
                        </template>
@@ -444,10 +444,10 @@
                <el-table-column :min-width="50" prop="cell" :label="$t('Slot No')"></el-table-column>
                <el-table-column :min-width="55" prop="tier" :label="$t('The Side')"></el-table-column>
                <el-table-column :min-width="145" prop="glassId" :label="$t('Barcode')"></el-table-column>
                <el-table-column :min-width="100" prop="orderId" :label="$t('Order No')"></el-table-column>
                <el-table-column :min-width="80" prop="orderId" :label="$t('Order No')"></el-table-column>
                <el-table-column :min-width="80" prop="listId" :label="$t('List No')"></el-table-column>
                <el-table-column :min-width="100" prop="boxId" :label="$t('Box No')"></el-table-column>
                <el-table-column :min-width="90" prop="state" :label="$t('Glass State')">
                <el-table-column :min-width="50" prop="boxId" :label="$t('Box No')"></el-table-column>
                <el-table-column :min-width="80" prop="state" :label="$t('Glass State')">
                    <template slot-scope='scope'>
                        {{
                            scope.row.state == 1 ? $t('Normal') : scope.row.state == 2 ? $t('Entering') : scope.row.state == 3 ?
@@ -460,6 +460,12 @@
                        {{ scope.row.glassWidthMm }}{{ scope.row.glassWidthMm > 0 ? "*" : "" }}{{ scope.row.glassHeightMm }}
                    </template>
                </el-table-column>
                <el-table-column :min-width="80" prop="lengthWidth" :label="$t('State')">
                    <template slot-scope='scope'>
                        {{ scope.row.disabled == 0 ? $t('Enable') : $t('Disable') }}
                    </template>
                </el-table-column>
                <el-table-column :min-width="250" :label="$t('Operate')">
                    <template slot-scope='scope'>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
@@ -470,7 +476,7 @@
                            @click="outglass(scope.row.glassId, scope.row.state)">{{ $t('Out') }}</el-button>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            @click="UpdateDisabled(scope.row.cage, scope.row.cell, scope.row.disabled == 0 ? 1 : 0)">
                            {{ scope.row.disabled == 0 ? $t('Enable') : $t('Disable') }}</el-button>
                            {{ scope.row.disabled == 0 ? $t('Disable') : $t('Enable') }}</el-button>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            :disabled="scope.row.glassId != null ? true : false"
                            @click="insertglass(scope.row.cage, scope.row.cell, scope.row.tier)">{{ $t('Add')
@@ -510,8 +516,11 @@
            <el-form :model="form" label-width="100px" style="padding-right: 30px">
                <div style="display: flex;justify-content: space-around;">
                    <label for="">{{ $t('Upper film position') }}</label>
                    <div>
                        {{ $t('Confirm State') }}:{{ this.isConfirm == true ? $t('Not Allow') : $t('Allow') }}
                    <el-button type="primary" @click="isConfirmState()">
                        {{ this.isConfirm == true ? "Allow" : "Not Allow" }}</el-button>
                        {{ this.isConfirm == true ? $t('Allow') : $t('Not Allow') }}</el-button>
                    </div>
                    <label for="">{{ $t('Scan Code Point') }}</label>
                </div>
                <div style="display: flex;justify-content: space-around;height: 40px;">
@@ -637,18 +646,31 @@
        </el-dialog>
        <el-dialog :visible.sync="dialogFormVisible6" :title="$t('Outing Queue')" top="5vh">
            <el-button type="primary" @click="isAllowQueueState()" :disabled="!this.isAllowReordering">{{ this.isAllowQueue
            {{  $t('Queue State') }}:
            {{ this.isAllowQueue
                == true ? $t('Start') : $t('Stop')
            }}
            <el-button type="primary" @click="isAllowQueueState()" :disabled="!this.isAllowReordering">{{ this.isAllowQueue
                == true ? $t('Stop') : $t('Start')
            }}</el-button>
            <el-button type="primary" @click="isAllowReorderings()" :disabled="this.isAllowQueue">{{
            {{  $t('Sorting State') }}:
            {{
                this.isAllowReordering == true ? $t('Not Allow') : $t('Allow')
            }}
            <el-button type="primary" @click="isAllowReorderings()" :disabled="this.isAllowQueue">{{
                this.isAllowReordering == true ? $t('Allow') : $t('Not Allow')
            }}</el-button>
            <el-input style="width:15%;" :placeholder="$t('Enter the Frame No')" v-model="framebarcode"></el-input>
            <el-button type="primary" @click="AddOutSliceS()">{{ $t('Add') }}</el-button>
            <label style="background-color:yellow;font-size: 23px;" for="">{{ isQueueWarning== true ? $t('The cage is disabled') : "" }}</label>
            <!-- <span style="background-color:yellow;">
                {{ isQueueWarning== true ? $t('The cage is disabled') : $t('The cage is disabled') }}
            </span> -->
            <el-table :data="this.OutSlice" :height="700" :span-method="objectSpanMethod" border :cell-style="cellStyle"
                style="width: 100%;overflow: auto;font-size: 18px;">
                <el-table-column :min-width="175" prop="glassId" :label="$t('Barcode')"></el-table-column>
                <el-table-column :min-width="100" prop="orderId" :label="$t('Order No')"></el-table-column>
                <el-table-column :min-width="70" prop="orderId" :label="$t('Order No')"></el-table-column>
                <el-table-column :min-width="70" prop="listId" :label="$t('List No')"></el-table-column>
                <el-table-column :min-width="70" prop="boxId" :label="$t('Box No')"></el-table-column>
                <el-table-column :min-width="100" prop="glasswidthmm" :label="$t('Length')"></el-table-column>
@@ -670,12 +692,10 @@
                </el-table-column>
                <el-table-column :min-width="300" prop="position" :label="$t('Position')" style="font-size: 20px;">
                    <template slot-scope='scope'>
                        <!-- {{ scope.row.position == 1 ? "<>▄▄▄" : "▋" }} -->
                        <div
                            :style="'width:' + (scope.row.position == 1 ? '300' : '100') + 'px;height:' + (scope.row.position == 1 ? '100' : '200') + 'px;background-Color:gray;margin:0 auto;'">
                            <!-- <div :style="'width:100px;height:300px;background-Color:red;'"></div> -->
                        </div>
                        <!-- {{ scope.row.position == 1 ? "<div></div>" : "<div></div>" }} -->
                    </template>
                </el-table-column>
                <el-table-column prop="position" :label="$t('Flipped')" :min-width="200">
@@ -685,9 +705,7 @@
                    </template>
                </el-table-column>
                <el-table-column prop="barcode" :label="$t('Frame No')"></el-table-column>
                <el-table-column :width="200" :label="$t('Operate')">
                <el-table-column :width="240" :label="$t('Operate')">
                    <template slot-scope='scope'>
                        <el-button type="text" size="small" @click="getTopMove(scope.row, scope.$index)"
                            style="font-size: 15px;"
@@ -706,6 +724,10 @@
                        </el-button>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" :disabled="isAllowQueue"
                            @click="deleteproductionqueueglass(scope.row.barcode)">{{ $t('Delete') }}</el-button>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" :disabled="isAllowQueue"
                            @click="FrameStateUpdate(scope.row.barcode,scope.row.framestate)">{{
                            scope.row.framestate == 0 ? $t('Stop') : $t('Start') }}</el-button>
                    </template>
                </el-table-column>
            </el-table>
@@ -762,7 +784,7 @@
    home, home2, InsertOrder, Addglassid, UpdateTask, SelectAlarmmgInfo, SelectCageInfo, DeleteByGlassID, OutByGlassID, Loadcarlist,
    SelectPassword, SelectGlassByGlassID, Disabled, Inglassid, SelectGlass, InsertQueueGlassId, UpdateQueueState, DeleteQueueGlass, SelectGlassNo,
    SelectAluminumFrameInfoById, DeleteProductionQueueGlass, AddOutSliceS, isAllowQueues, isConfirmStates, SelectPermissionByUserName, currentUsername, CompleteQueue,
    isAllowReorderings
    isAllowReorderings, FrameStateUpdate
} from "../../api/home";
@@ -852,7 +874,8 @@
            D01RequestState: false,
            EmergencyStop: false,
            PromptSize: 250,
            reset: false
            reset: false,
            isQueueWarning: false
        };
    },
    created() {
@@ -933,6 +956,8 @@
                    //是否允许出片
                    this.isAllowQueue = obj.isAllowQueue[0];
                    //当前出片格子是否被禁用
                    this.isQueueWarning = obj.isQueueWarning[0];
                    //是否允许出片队列调序
                    this.isAllowReordering = obj.isAllowReordering[0];
                    //出片队列
@@ -1796,6 +1821,18 @@
                1000
            );
        },
        FrameStateUpdate(frameno,framestate){
            if(framestate == 1){
                framestate=0;
            }else{
                framestate=1;
            }
            FrameStateUpdate(frameno,framestate).then(res=>{
                if(res.data.message == 200){
                    this.$message.success("Operation successful");
                }
            });
        }
    }
}
springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java
@@ -17,9 +17,10 @@
  private SpianMapper spianMapper;
  private SpianService spianService;
  int aaa;
  @Override
  public void run() {
    while (this != null) {
      try {
@@ -29,135 +30,143 @@
        e.printStackTrace();
      }
      if (S7control.getinstance().CheckConnected() == true) {
      spianService = WebSocketServer.applicationContext.getBean(SpianService.class);
      spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class);
      jdbcConnections = WebSocketServer.applicationContext.getBean(JdbcConnections.class);
      // 根据玻璃id获取订单号,单独数据源
      // try {
      // north_glass_buffer1 glass = jdbcConnections.selectGlass(112);
      // // System.out.println(glass.getOrderId());
      // } catch (SQLException e) {
      // // TODO Auto-generated catch block
      // e.printStackTrace();
      // }
      //spianService.selectAll("X12345610402GV");
       // 出片任务////////////////////////////////
      List<Short> outlist = S7control.getinstance().ReadWord("DB106.20", 1); // 出片车状态
      List<Short> outlist1 = S7control.getinstance().ReadWord("DB105.18", 1); // 出片任务是否启动
      // StringBuilder writedstrIdOut = new StringBuilder();
      // 获取已下发的出片id
      byte[] writedglassidbytesOut = S7control.getinstance().ReadByte("DB105.30", 14);
      String writedstrIdOut = new String(writedglassidbytesOut);
        spianService = WebSocketServer.applicationContext.getBean(SpianService.class);
        spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class);
        jdbcConnections = WebSocketServer.applicationContext.getBean(JdbcConnections.class);
        // 根据玻璃id获取订单号,单独数据源
        // try {
        // north_glass_buffer1 glass = jdbcConnections.selectGlass(112);
        // // System.out.println(glass.getOrderId());
        // } catch (SQLException e) {
        // // TODO Auto-generated catch block
        // e.printStackTrace();
        // }
        // spianService.selectAll("X12345610402GV");
        // 出片任务////////////////////////////////
        List<Short> outlist = S7control.getinstance().ReadWord("DB106.20", 1); // 出片车状态
        List<Short> outlist1 = S7control.getinstance().ReadWord("DB105.18", 1); // 出片任务是否启动
        // StringBuilder writedstrIdOut = new StringBuilder();
        // 获取已下发的出片id
        byte[] writedglassidbytesOut = S7control.getinstance().ReadByte("DB105.30", 14);
        String writedstrIdOut = new String(writedglassidbytesOut);
      boolean outstate = false;// 出片车空闲判断
      boolean outstate1 = false;// 出片车任务是否启动
      if (outlist != null && outlist1 != null) {
        boolean outstate = false;// 出片车空闲判断
        boolean outstate1 = false;// 出片车任务是否启动
        if (outlist != null && outlist1 != null) {
        outstate = outlist.contains((short) 0);// 出片车空闲判断 当出片车空闲时为true
        outstate1 = outlist1.contains((short) 1);// 出片车任务是否启动 当出片车任务启动时为true
          outstate = outlist.contains((short) 0);// 出片车空闲判断 当出片车空闲时为true
          outstate1 = outlist1.contains((short) 1);// 出片车任务是否启动 当出片车任务启动时为true
        // 判断当前是否有未执行的任务
        int outnum = spianMapper.SelectOutSliceshu();
        // 当没有任务执行并且出片车空闲时
        if (outnum == 0 && outstate == true && Plchome.isAllowQueue == true) {
          // 判断铝框出片队列表是否有待出片的玻璃
          String outglassid = spianMapper.SelectOutSlice();
          if (outglassid != null) {
          // 判断当前是否有未执行的任务
          int outnum = spianMapper.SelectOutSliceshu();
          int cageoutsum = spianMapper.Selectcageout(3);
          // 当没有任务执行并且出片车空闲时
          if (outnum == 0 && outstate == true && Plchome.isAllowQueue == true && cageoutsum == 0) {
            // 判断铝框出片队列表是否有待出片的玻璃
            String outglassid = spianMapper.SelectOutSlice();
            // 当有待出片的玻璃时
            if (outglassid != null) {
              // 获取该玻璃是否被禁用
              int glassdisabled = spianMapper.SelectCageGlassState(outglassid);
              //未禁用下发任务
              if (glassdisabled == 0) {
                spianService.selectout2(outglassid);
                Plchome.isQueueWarning = false;
                outstate = false;
              } else { //禁用更改状态弹出提示
                Plchome.isQueueWarning = true;
              }
            spianService.selectout2(outglassid);
            outstate = false;
            }
          }
          if (outstate == true) {// 当出片车空闲时,且出片启动为1时,任务启动改为0
            if (outstate1 == true) {
              S7control.getinstance().WriteWord("DB105.18", (short) 0);// 出片任务启动改为0
            }
          }
        }
        if (outstate == true) {// 当出片车空闲时,且出片启动为1时,任务启动改为0
          if (outstate1 == true) {
            S7control.getinstance().WriteWord("DB105.18", (short) 0);// 出片任务启动改为0
        ///////////// 进片任务
        List<Short> datas1List = S7control.getinstance().ReadWord("DB106.24", 1);// 获取prc进片请求数据
        List<Short> datas1ListState = S7control.getinstance().ReadWord("DB106.8", 1);// 获取进片车状态
        List<Short> datas1ListState2 = S7control.getinstance().ReadWord("DB105.16", 1);// 获取进片车任务是否启动
        boolean B01backs = spianService.listbool("DB106.60");// b01汇报
        boolean B02backs = spianService.listbool("DB106.62");// b02汇报
        StringBuilder B01glassid = spianService.queGlassid("DB103.184", 14);// BO1的玻璃id
        StringBuilder B02glassid = spianService.queGlassid("DB103.212", 14);// B02的玻璃id
        // 当进片小车完成任务时
        if (B01backs == true) {
          // 当B01小车汇报完成时更改玻璃状态 为1
          spianService.overtask(B01glassid.toString());// 完成任务
          S7control.getinstance().WriteWord("DB106.60", (short) 0);// 恢复B01小车应答改为0
          boolean yingda = spianService.listbool("DB106.60");// b01汇报
          System.out.println("汇报时B01|第" + aaa + "次" + B01glassid + "应答" + yingda);
          aaa += 1;
        }
        // 当出片小车完成任务时
        if (B02backs == true) {
          // 当B02小车汇报完成时更改玻璃状态为0
          spianService.overtask(B02glassid.toString());// 完成任务
          S7control.getinstance().WriteWord("DB106.62", (short) 0);// 恢复B02小车应答改为0
          System.out.println("汇报时B02|" + B02glassid);
          boolean yingda = spianService.listbool("DB106.62");// b02汇报
          System.out.println("汇报时B02|第" + aaa + "次" + B02glassid + "应答" + yingda);
        }
        // 获取DO1数据
        StringBuilder queueid1 = spianService.queGlassid("DB106.26", 14);// 获取请求的id跟DO1同时清
        // 获取DO2数据
        StringBuilder queueid2 = spianService.queGlassid("DB103.58", 14);
        int questate = spianMapper.Selectquecount(queueid1.toString());// 判断扫码位是否有玻璃已确认
        // queueid1.toString().isEmpty()
        north_glass_buffer1 glass1 = spianMapper.selectGlass(queueid1.toString());// D01的玻璃信息
        north_glass_buffer1 glass2 = spianMapper.selectGlass(queueid2.toString());// D02玻璃信息
        // 当扫码位玻璃id为空时 宽度为0
        if (queueid1 != null && questate == 0) {
          // 写入D01的数据到上片队列表
          if (glass1 == null) { // 当没有值时传空
            spianMapper.Updatequeue(null, null, null, null, 0, null, null, null, null, 1);
          } else {
            spianMapper.Updatequeue(queueid1.toString(), glass1.getordernumber(), glass1.getlistnumber(),
                glass1.getboxnumber(), 0, glass1.getglasslengthmm().toString(), glass1.getglassheightmm().toString(),
                glass1.getglasslength().toString(), glass1.getglassheight().toString(), 1);
          }
        }
      }
      /////////////进片任务
      List<Short> datas1List = S7control.getinstance().ReadWord("DB106.24", 1);// 获取prc进片请求数据
      List<Short> datas1ListState = S7control.getinstance().ReadWord("DB106.8", 1);// 获取进片车状态
      List<Short> datas1ListState2 = S7control.getinstance().ReadWord("DB105.16", 1);// 获取进片车任务是否启动
        if (queueid2 != null) {
          // 写入D02的数据到上片队列表
          if (glass2 == null) {
            spianMapper.Updatequeue(null, null, null, null, 0, null, null, null, null, 2);
          } else {
            spianMapper.Updatequeue(queueid2.toString(), glass2.getordernumber(), glass2.getlistnumber(),
                glass2.getboxnumber(), 0, glass2.getglasslengthmm().toString(), glass2.getglassheightmm().toString(),
                glass2.getglasslength().toString(), glass2.getglassheight().toString(), 2);
            spianMapper.overqueue2(queueid2.toString(), 0, 1);// 更改扫码位任务表的状态为0
            S7control.getinstance().WriteWord("DB105.16", (short) 0);// 关闭任务启动
          }
      boolean B01backs = spianService.listbool("DB106.60");// b01汇报
      boolean B02backs = spianService.listbool("DB106.62");// b02汇报
      StringBuilder B01glassid = spianService.queGlassid("DB103.184", 14);// BO1的玻璃id
      StringBuilder B02glassid = spianService.queGlassid("DB103.212", 14);// B02的玻璃id
      // 当进片小车完成任务时
      if (B01backs == true) {
        // 当B01小车汇报完成时更改玻璃状态 为1
        spianService.overtask(B01glassid.toString());// 完成任务
        S7control.getinstance().WriteWord("DB106.60", (short) 0);// 恢复B01小车应答改为0
        boolean yingda = spianService.listbool("DB106.60");// b01汇报
        System.out.println("汇报时B01|第"+aaa+"次"+ B01glassid+"应答"+yingda);
        aaa+=1;
      }
      // 当出片小车完成任务时
      if (B02backs == true) {
        // 当B02小车汇报完成时更改玻璃状态为0
        spianService.overtask(B02glassid.toString());// 完成任务
        S7control.getinstance().WriteWord("DB106.62", (short) 0);// 恢复B02小车应答改为0
        System.out.println("汇报时B02|" + B02glassid);
        boolean yingda = spianService.listbool("DB106.62");// b02汇报
        System.out.println("汇报时B02|第"+aaa+"次"+ B02glassid+"应答"+yingda);
      }
      // 获取DO1数据
      StringBuilder queueid1 = spianService.queGlassid("DB106.26", 14);// 获取请求的id跟DO1同时清
      // 获取DO2数据
      StringBuilder queueid2 = spianService.queGlassid("DB103.58", 14);
      int questate = spianMapper.Selectquecount(queueid1.toString());// 判断扫码位是否有玻璃已确认
      // queueid1.toString().isEmpty()
      north_glass_buffer1 glass1 = spianMapper.selectGlass(queueid1.toString());// D01的玻璃信息
      north_glass_buffer1 glass2 = spianMapper.selectGlass(queueid2.toString());// D02玻璃信息
      // 当扫码位玻璃id为空时 宽度为0
      if (queueid1 != null && questate == 0) {
        // 写入D01的数据到上片队列表
        if (glass1 == null) { // 当没有值时传空
          spianMapper.Updatequeue(null, null, null, null, 0, null, null, null, null, 1);
        } else {
          spianMapper.Updatequeue(queueid1.toString(), glass1.getordernumber(), glass1.getlistnumber(),
          glass1.getboxnumber(), 0, glass1.getglasslengthmm().toString(), glass1.getglassheightmm().toString(),
          glass1.getglasslength().toString(), glass1.getglassheight().toString(), 1);
        }
      }
      if (queueid2 != null) {
        // 写入D02的数据到上片队列表
        if (glass2 == null) {
          spianMapper.Updatequeue(null, null, null, null, 0, null, null, null, null, 2);
        } else {
          spianMapper.Updatequeue(queueid2.toString(), glass2.getordernumber(), glass2.getlistnumber(),
          glass2.getboxnumber(), 0, glass2.getglasslengthmm().toString(), glass2.getglassheightmm().toString(),
          glass2.getglasslength().toString(), glass2.getglassheight().toString(), 2);
          spianMapper.overqueue2(queueid2.toString(), 0, 1);// 更改扫码位任务表的状态为0
          S7control.getinstance().WriteWord("DB105.16", (short) 0);// 关闭任务启动
        }
        // if (outstate == true) { // 出片车状态空闲时
        // Integer state = spianMapper.Selectoutstate();
        // String orderid = spianMapper.SelectOrderout();
        // if (orderid != null && state == 0) {
        // spianService.selectout(orderid);
        // }
        // }
        // 查询数据库
        // 推送到前端
      }
      // if (outstate == true) { // 出片车状态空闲时
      // Integer state = spianMapper.Selectoutstate();
      // String orderid = spianMapper.SelectOrderout();
      // if (orderid != null && state == 0) {
      // spianService.selectout(orderid);
      // }
      // }
      // 查询数据库
      // 推送到前端
    }
  }
}
}
springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter1Review.java
New file
@@ -0,0 +1,213 @@
package com.example.springboot.component;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import org.apache.commons.io.FileUtils;
import org.apache.tomcat.jni.Lock;
import org.springframework.beans.factory.annotation.Autowired;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.ReentrantLock;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
import com.example.springboot.entity.device.PlcParameterObject;
import com.example.springboot.entity.device.PlcParameterInfo;
public class PlcParameter1Review extends Thread {
  @Autowired
  private ResourceLoader resourceLoader;
  private volatile static PlcParameter1Review instance = null;
  private PlcParameter1Review() {
    init();
  }
  // 单例模式 线程安全
  public static PlcParameter1Review getInstance() {
    if (instance == null) {
      synchronized (PlcParameter1Review.class) {
        if (instance == null) {
          instance = new PlcParameter1Review();
        }
      }
    }
    return instance;
  }
  PlcParameterObject plcParameterObject = new PlcParameterObject();//该DB区数据实例
  private void init() {
    try {
      String jsonfilename=  PlcParameter1Review.class.getResource("/JsonFile/PlcParameter.json").getFile();
      FileReader fileReader = new FileReader(jsonfilename);
      BufferedReader bufferedReader = new BufferedReader(fileReader);
      StringBuilder content = new StringBuilder();
      String line;
      while ((line = bufferedReader.readLine()) != null) {
        content.append(line);
      }
      bufferedReader.close();
      fileReader.close();
      JSONObject jsonfileobj = new JSONObject(content.toString());
      JSONArray jsonArray = jsonfileobj.getJSONArray("parameteInfor");
       plcParameterObject.setPlcAddressBegin(jsonfileobj.getStr("plcAddressBegin"));//设置起始位地址
       plcParameterObject.setPlcAddressLength(Integer.valueOf(jsonfileobj.getStr("plcAddressLenght")));//设置地址长度
      for (int i = 0; i < jsonArray.size(); i++) {
        JSONObject parameterObj = jsonArray.getJSONObject(i);
        PlcParameterInfo plcParameterInfo = new PlcParameterInfo(jsonfileobj.getStr("plcAddressBegin")); //参数实例
        String codeid=parameterObj.getStr("codeId");
        plcParameterInfo.setCodeId(codeid);
        plcParameterInfo.setAddressIndex(Integer.valueOf(parameterObj.getStr("addressIndex")));
        plcParameterInfo.setRatio(Integer.valueOf(parameterObj.getStr("ratio")));
        plcParameterInfo.setAddressLength(Integer.valueOf(parameterObj.getStr("addressLenght")));
        plcParameterInfo.setUnit(parameterObj.getStr("unit"));
        plcParameterObject.addPlcParameter(plcParameterInfo);
      }
      System.out.println("");
    } catch (IOException e) {
      e.printStackTrace();
    }
  }
  @Override
  public void run() {
    while (this != null) {
      try {
        Thread.sleep(1000);
      } catch (InterruptedException e) {
        e.printStackTrace();
      }
      byte[] getplcvlues=S7control.getinstance().ReadByte(plcParameterObject.getPlcAddressBegin(),plcParameterObject.getPlcAddressLength());
      plcParameterObject.setPlcParameterList(getplcvlues);
       int index=plcParameterObject.getPlcParameter("conveyorVelocity(AutoFAST)").getAddressIndex();
      S7control.getinstance().WriteWord(plcParameterObject.getPlcParameter("conveyorVelocity(AutoFAST)").getAddress(index), (short)100);
      List<String> addresses = new ArrayList<>();
      addresses.add("conveyorVelocity(AutoFAST)");
      addresses.add("conveyorVelocity(AutoSLOW)");
      addresses.add("conveyorVelocity(Manual)");
      addresses.add("A01A02TURNJOGVelocity");
      addresses.add("A01A02TRAVELJOGVelocity");
      plcParameterObject.getPlcParameterValues(addresses);
      JSONObject jsonObject = new JSONObject();
      jsonObject.append("params", plcParameterObject.getPlcParameterValues(addresses));
      jsonObject.append("fanzhuan", plcParameterObject.getPlcParameter("conveyorVelocity(AutoFAST)").getValue());
      jsonObject.append("xiaoche", plcParameterObject.getPlcParameter("").getValue());
      WebSocketServer sendwServer = WebSocketServer.sessionMap.get("Parameter1");
      if (sendwServer != null) {
        sendwServer.sendMessage(jsonObject.toString());
      }
      WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("Parameter1");
      if (webSocketServer != null) {
        List<String> messages = webSocketServer.getMessages();
        List<String> waddresses1 = new ArrayList<>();
        waddresses1.add("DB100.0");
        waddresses1.add("DB100.2");
        waddresses1.add("DB100.4");
        waddresses1.add("DB100.6");
        waddresses1.add("DB100.26");
        waddresses1.add("DB100.28");
        waddresses1.add("DB100.30");
        waddresses1.add("DB100.32");
        waddresses1.add("DB100.34");
        waddresses1.add("DB100.36");
        waddresses1.add("DB100.38");
        waddresses1.add("DB100.40");
        String addressList2 = "DB100.8";
        String addressList3 = "DB100.12";
        if (!messages.isEmpty()) {
          // 将最后一个消息转换为 short 类型的列表
          String lastMessage = messages.get(messages.size() - 1);
          // System.out.println("lastMessage:" + lastMessage);
          JSONArray messageArray = new JSONArray(lastMessage);
          // 整合第 1 到 3 个数组并去掉 null 元素
          List<Short> mergedList = new ArrayList<>();
          for (int i = 0; i < 3; i++) {
            JSONArray sublist = messageArray.getJSONArray(i);
            for (int j = 0; j < sublist.size(); j++) {
              Object value = sublist.get(j);
              if (value != null && !value.toString().equals("null")) {
                try {
                  String cleanedValue = value.toString().replaceAll("[^0-9-]", "");
                  short sValue = Short.parseShort(cleanedValue.trim());
                  mergedList.add(sValue);
                } catch (NumberFormatException e) {
                  // 如果无法解析为 short 类型,则忽略该部分
                  System.err.println("Could not parse value: " + value);
                }
              }
            }
          }
          // 写入第一个地址
          if (messageArray.getJSONArray(3).size() > 0) {
            Object value = messageArray.getJSONArray(3).get(0);
            if (value != null && !value.toString().equals("null")) {
              try {
                String cleanedValue = value.toString().replaceAll("[^0-9-]", "");
                short sValue = Short.parseShort(cleanedValue.trim());
                S7control.getinstance().WriteWord(addressList2, Arrays.asList(sValue));
                System.out
                    .println("messageValue:" + Arrays.asList(sValue) + " written to PLC at address " + addressList2);
              } catch (NumberFormatException e) {
                // 如果无法解析为 short 类型,则忽略该部分
                System.err.println("Could not parse value: " + value);
              }
            }
          }
          // 写入第二个地址
          if (messageArray.getJSONArray(4).size() > 0) {
            Object value = messageArray.getJSONArray(4).get(0);
            if (value != null && !value.toString().equals("null")) {
              try {
                String cleanedValue = value.toString().replaceAll("[^0-9-]", "");
                short sValue = Short.parseShort(cleanedValue.trim());
                S7control.getinstance().WriteWord(addressList3, Arrays.asList(sValue));
                System.out
                    .println("messageValue:" + Arrays.asList(sValue) + " written to PLC at address " + addressList3);
              } catch (NumberFormatException e) {
                // 如果无法解析为 short 类型,则忽略该部分
                System.err.println("Could not parse value: " + value);
              }
            }
          }
          // 写入第三个地址
          if (!mergedList.isEmpty()) {
            S7control.getinstance().WriteWord(waddresses1, mergedList);
            System.out.println("messageValue:" + mergedList + " written to PLC at address " + waddresses1);
          }
          // 清空消息列表
          webSocketServer.clearMessages();
        }
      }
    }
  }
}
springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java
@@ -28,7 +28,7 @@
    FileInputStream fileInputStream;
    try {
      // 从文件中读取字节数据存入 fileInputStream
      fileInputStream = new FileInputStream("D:/canadames/Alarm.json");
      fileInputStream = new FileInputStream("D:/code/canadames/Alarm.json");
      // 读取 fileInputStream 中字节并将其解码为字符
      InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "utf-8");
      // 提高读取效率,在 BufferedReader 内包装 InputStreamReader
springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
@@ -31,6 +31,8 @@
    // 出片队列是否允许出片
    public static Boolean isAllowQueue = true;
    public static Boolean isAllowReordering = true;
    //出片队列警告
    public static Boolean isQueueWarning=false;
    // 铝框id
    public static String FrameNo = "";
    // 是否需要手动确认玻璃
@@ -104,20 +106,22 @@
            jsonObject.append("listoutslice", listoutslice);
            // 获取当前出片队列出片状态
            jsonObject.append("isAllowQueue", Plchome.isAllowQueue);
            //获取出片队列警告状态
            jsonObject.append("isQueueWarning", Plchome.isQueueWarning);
            // 获取当前出片队列调序状态
            jsonObject.append("isAllowReordering", Plchome.isAllowReordering);
            // 是否需要人工确认上片玻璃
            jsonObject.append("isConfirm", isConfirm);
            String framenos="X21763329601FB";
                if (!framenos.equals(Plchome.FrameNo)) {
                    Plchome.FrameNo = framenos;
                    try {
                        north_Glass_Buffer1Service.AddOutSliceS(Plchome.FrameNo);
                    } catch (SQLException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }
                }
            // String framenos="X21763329601FB";
            //     if (!framenos.equals(Plchome.FrameNo)) {
            //         Plchome.FrameNo = framenos;
            //         try {
            //             north_Glass_Buffer1Service.AddOutSliceS(Plchome.FrameNo);
            //         } catch (SQLException e) {
            //             // TODO Auto-generated catch block
            //             e.printStackTrace();
            //         }
            //     }
            if (S7control.getinstance().CheckConnected() == true) {
                // 读去Plc进片车与出片车位置W
                List<String> addressList = new ArrayList<String>();
@@ -147,7 +151,7 @@
                // 获取铝框idDB106.DBW64,添加到出片队列
                String frameno = spianService.queGlassid("DB103.270", 14).toString();
                // String frameno="X12345611002GV";
                frameno="X21763329601FB";
                // frameno="X21763329601FB";
                if (!frameno.equals(Plchome.FrameNo)) {
                    Plchome.FrameNo = frameno;
                    try {
@@ -180,36 +184,38 @@
                // 是否急停
                List<Boolean> emergencystops = S7control.getinstance().ReadBits("DB104.5.1", 1);
                for (Boolean emergencystop : emergencystops) {
                    jsonObject.append("emergencystop", emergencystop);
                    jsonObject.
                    append("emergencystop", emergencystop);
                }
                // 终止继续按钮
                List<String> niuanaddressList3 = Arrays.asList(config.getProperty("Parameter2.stop").split(","));
                List<Boolean> anniuread = S7control.getinstance().readBits(niuanaddressList3);
                // Boolean[] value4 = { false, false};
                // List<Boolean> anniuread = new ArrayList<>(Arrays.asList(value4));
                Boolean[] value5 = { true };
                List<Boolean> resets = new ArrayList<>(Arrays.asList(value5));
                short[] anniuparams = new short[anniuread.size()];
                for (int i = 0; i < anniuread.size(); i++) {
                    boolean value = anniuread.get(i);
                    anniuparams[i] = value ? (short) 1 : (short) 0;
                }
                // // 终止继续按钮
                // List<String> niuanaddressList3 = Arrays.asList(config.getProperty("Parameter2.stop").split(","));
                // List<Boolean> anniuread = S7control.getinstance().readBits(niuanaddressList3);
                // // Boolean[] value4 = { false, false};
                // // List<Boolean> anniuread = new ArrayList<>(Arrays.asList(value4));
                // Boolean[] value5 = { true };
                // List<Boolean> resets = new ArrayList<>(Arrays.asList(value5));
                // short[] anniuparams = new short[anniuread.size()];
                // for (int i = 0; i < anniuread.size(); i++) {
                //     boolean value = anniuread.get(i);
                //     anniuparams[i] = value ? (short) 1 : (short) 0;
                // }
                short[] resets2 = new short[resets.size()];
                for (int i = 0; i < resets.size(); i++) {
                    boolean value = resets.get(i);
                    resets2[i] = value ? (short) 1 : (short) 0;
                }
                // short[] resets2 = new short[resets.size()];
                // for (int i = 0; i < resets.size(); i++) {
                //     boolean value = resets.get(i);
                //     resets2[i] = value ? (short) 1 : (short) 0;
                // }
                for (short number : resets2) {
                // for (short number : resets2) {
                    if (number == 1) {
                        jsonObject.append("Abort", anniuparams);
                //     if (number == 1) {
                //         jsonObject.append("Abort", anniuparams);
                    }
                //     }
                }
                // }
            }
            // 铝框线交互
@@ -257,11 +263,11 @@
                        List<String> messages = webserver.getMessages();
                        if (!messages.isEmpty()) {
                            // 将最后一个消息转换为整数类型的列表
                            // // 将最后一个消息转换为整数类型的列表
                            // String lastMessage = messages.get(messages.size() - 1);
                            // System.out.println("lastMessage:" + lastMessage);
                            // JSONArray messageArray = new JSONArray(lastMessage);
                            //
                            // try {
                            //     // 检查索引是否有效
                            //     if (messageArray.getJSONArray(0).size() > 0) {
springboot-vue3/src/main/java/com/example/springboot/component/PlcsignReview.java
New file
@@ -0,0 +1,124 @@
package com.example.springboot.component;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import com.example.springboot.entity.device.PlcBitObject;
import com.example.springboot.entity.device.PlcBitInfo;
public class PlcsignReview extends Thread {
  String name = "";
  Integer count = 0;
  private volatile static PlcsignReview instance = null;
  private PlcsignReview() {
    init();
  }
  // 单例模式 线程安全
  public static PlcsignReview getInstance() {
    if (instance == null) {
      synchronized (PlcsignReview.class) {
        if (instance == null) {
          instance = new PlcsignReview();
        }
      }
    }
    return instance;
  }
  PlcBitObject plcBitObject = new PlcBitObject();//该DB区数据实例
  private void init() {
    try {
      String jsonfilename=  PlcsignReview.class.getResource("/JsonFile/PlcSign.json").getFile();
      FileReader fileReader = new FileReader(jsonfilename);
      BufferedReader bufferedReader = new BufferedReader(fileReader);
      StringBuilder content = new StringBuilder();
      String line;
      while ((line = bufferedReader.readLine()) != null) {
        content.append(line);
      }
      bufferedReader.close();
      fileReader.close();
      JSONObject jsonfileobj = new JSONObject(content.toString());
      JSONArray jsonArray = jsonfileobj.getJSONArray("parameteInfor");
       plcBitObject.setPlcAddressBegin(jsonfileobj.getStr("plcAddressBegin"));//设置起始位地址
       plcBitObject.setPlcAddressLength(Integer.valueOf(jsonfileobj.getStr("plcAddressLenght")));//设置地址长度
      for (int i = 0; i < jsonArray.size(); i++) {
        JSONObject parameterObj = jsonArray.getJSONObject(i);
        PlcBitInfo plcBitInfo = new PlcBitInfo(jsonfileobj.getStr("plcAddressBegin")); //参数实例
        String codeid=parameterObj.getStr("codeId");
        plcBitInfo.setCodeId(codeid);
        plcBitInfo.setAddressIndex(Integer.valueOf(parameterObj.getStr("addressIndex")));
        plcBitObject.addPlcBit(plcBitInfo);
      }
      System.out.println("");
    } catch (IOException e) {
      e.printStackTrace();
    }
  }
  @Override
  public void run() {
    while (this != null) {
      try {
        Thread.sleep(1000);
      } catch (InterruptedException e) {
        e.printStackTrace();
      }
      List<Boolean> getplcbits=S7control.getinstance().ReadBits(plcBitObject.getPlcAddressBegin(),plcBitObject.getPlcAddressLength());
      plcBitObject.setPlcBitList(getplcbits);
//      this.readValue();
//      String PlcAddress = this.name;
//      Integer Plccount = this.count;
      // System.out.println(PlcAddress);
//      List<Boolean> plclist = S7control.getinstance().ReadBits(PlcAddress, Plccount);
       List<Boolean> plclist = S7control.getinstance().ReadBits("DB102.0.0", 64);
//       Boolean[] values = { true, true, true, true, true, false, true, false,
//       true, false, true, false, true, false,
//       true, false, true, false, true, false, true, false, true, false, true, false,
//       true, false, true, false, true,
//       false, true, false, true, false,
//       true, false, true, false, true, false, true, false, null,
//       true, false,
//       true, false, true, false, true, false,
//       true, false, true, false, true, };
//       List<Boolean> plclist = new ArrayList<>(Arrays.asList(values));
      if (plclist != null) {
        // 将获取的布尔类型转换为整数类型
        List<Integer> Intlist = new ArrayList<>();
        for (Boolean value : plclist) {
          if (value != null) {
            Intlist.add(value == true ? 0 : 1);
          }
        }
        JSONObject jsonObject = new JSONObject();
        jsonObject.append("sig", Intlist);
        WebSocketServer sendwServer3 = WebSocketServer.sessionMap.get("Sign");
        if (sendwServer3 != null) {
          sendwServer3.sendMessage(jsonObject.toString());
        }
      }
    }
  }
}
springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
@@ -17,25 +17,25 @@
        //
        System.out.println("启动完成");
        // new PlcHold().start();
        new PlcHold().start();
        new Plchome().start();
        // new Plcalarm().start();
        new Plcalarm().start();
        // new Plcsign().start();
        new Plcsign().start();
        // new Plcstate().start();
        // new PlcPositioning1().start();
        new Plcstate().start();
        new PlcPositioning1().start();
        // new PlcParameter2().start();
        new PlcParameter2().start();
        // new PLCAutomaticParameterSetting().start();
        new PLCAutomaticParameterSetting().start();
        // new PlcManualonePosition().start();
        // new PlcManualonePosition2().start();
        // new PlcServoManualone().start();
        // new PLCManualJog().start();
        // new Plclog().start();
        new PlcManualonePosition().start();
        new PlcManualonePosition2().start();
        new PlcServoManualone().start();
        new PLCManualJog().start();
        new Plclog().start();
    }
}
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
@@ -391,4 +391,11 @@
    return outSliceServive.CompleteQueue(id, frameid, glassid);
  }
  // 手动完成任务
  @PostMapping("/FrameStateUpdate")
  public Result FrameStateUpdate(String frameno, String framestate) {
    return outSliceServive.FrameStateUpdate(frameno, framestate);
  }
}
springboot-vue3/src/main/java/com/example/springboot/entity/Out_slice.java
@@ -16,6 +16,8 @@
    private String boxId;//箱子id
    private double glasswidthmm;//玻璃宽mm
    private double glassheightmm;//玻璃高mm
    private String position_x;//x坐标
    private int framestate;//y坐标
    public String getPosition() {
        return position;
@@ -168,4 +170,12 @@
    public void setBoxno(String boxId) {
        this.boxId = boxId;
    }
    public int getFrameState() {
        return framestate;
    }
    public void SetFrameState(int framestate) {
        this.framestate = framestate;
    }
}
springboot-vue3/src/main/java/com/example/springboot/entity/device/PlcBitInfo.java
New file
@@ -0,0 +1,74 @@
package com.example.springboot.entity.device;
import com.example.springboot.component.S7control;
public  class PlcBitInfo {
        public PlcBitInfo(String startAddress) {
            this.startAddress = startAddress;
        }
        private String startAddress;
        // 参数标识
        private String codeId;
        // 参数名称
        private String name;
        // 读取 参数值
        private Boolean value;
        // 参数地址
        private int addressIndex;
        public String getCodeId() {
            return this.codeId;
        }
        public void setCodeId(String codeId) {
            this.codeId = codeId;
        }
        public String getName() {
            return this.name;
        }
        public void setName(String name) {
            this.name = name;
        }
        public Boolean getValue() {
            return this.value;
        }
        public void setValue(Boolean value) {
            this.value = value;
        }
        public int getAddressIndex() {
            return this.addressIndex;
        }
         /**
     * 获取地址
     *
     * @param index 索引地址
     */
        public String getAddress(int index) {
            String[] stringdatas = this.startAddress.trim().split("\\.");
            if (stringdatas.length < 2 )
                return null;
            int dbwindex = 0;
            int bitindex = 0;
             if (stringdatas.length == 3) {
                dbwindex = Integer.parseInt(stringdatas[1]);
                bitindex = Integer.parseInt(stringdatas[2]);
            } else
                return null;
              dbwindex+=index/8;
              bitindex+=index%8;
            return stringdatas[0]+"."+dbwindex+"."+bitindex;
        }
        public void setAddressIndex(int addressindex) {
            this.addressIndex = addressindex;
        }
    }
springboot-vue3/src/main/java/com/example/springboot/entity/device/PlcBitObject.java
New file
@@ -0,0 +1,113 @@
package com.example.springboot.entity.device;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.List;
public class PlcBitObject {
    // 该模块数据类型,数据起始位置
    private String plcAddressBegin;
    // 数据地址长度:第一参数到最后一个参数的长度
    private int plcAddressLength;
    private ArrayList<PlcBitInfo> plcBitList;
    /**
     * @return 数据区开始地址
     */
    public String getPlcAddressBegin() {
        return plcAddressBegin;
    }
    /**
     * @param plcAddressBegin 设置数据区开始地址
     */
    public void setPlcAddressBegin(String plcAddressBegin) {
        this.plcAddressBegin = plcAddressBegin;
    }
    /**
     * @return 数据区 读取所有数据所需的长度(以byte类型为基准)
     */
    public int getPlcAddressLength() {
        return plcAddressLength;
    }
    /**
     * @return 设置:数据区 读取所有数据所需的长度(以byte类型为基准)
     */
    public void setPlcAddressLength(int plcAddressLength) {
        this.plcAddressLength = plcAddressLength;
    }
    /**
     * @return 获取参数实例集合
     */
    public ArrayList<PlcBitInfo> getBitList() {
        return plcBitList;
    }
    /**
     * 根据参数标识 获取某个参数实例
     *
     * @param codeid 参数标识
     * @return 获取某个参数实例
     */
    public PlcBitInfo getPlcBit(String codeid) {
        if (plcBitList != null) {
            for (PlcBitInfo plcbitInfo : plcBitList) {
                if (plcbitInfo.getCodeId().equals(codeid))
                    return plcbitInfo;
            }
            return null;
        } else
            return null;
    }
    /**
     * 根据参数标识 获取某个参数实例
     *
     * @param codeid 参数标识
     * @return 获取某个参数实例
     */
    public List<Boolean> getPlcBitValues(List<String> codeids) {
        List<Boolean> arrayList = new ArrayList();
        if (plcBitList != null) {
            for (PlcBitInfo plcbitInfo : plcBitList) {
                if (codeids.contains(plcbitInfo.getCodeId().toString()))
                    arrayList.add(plcbitInfo.getValue());
            }
        }
        return arrayList;
    }
    /**
     * 添加参数实例
     *
     * @param param 参数实例
     */
    public void addPlcBit(PlcBitInfo param) {
        if (plcBitList != null)
            plcBitList.add(param);
        else {
            plcBitList = new ArrayList<PlcBitInfo>();
            plcBitList.add(param);
        }
    }
    /**
     * 根据PLC返回的数据 给参数实例赋值
     *
     * @param plcValueArray PLC读取回来的byte类型数据集合
     */
    public void setPlcBitList(List<Boolean> plcValueArray) {
        if (plcBitList != null) {
            for (PlcBitInfo plcbitInfo : plcBitList) {
                plcbitInfo.setValue(plcValueArray.get(plcbitInfo.getAddressIndex()));
            }
        }
    }
}
springboot-vue3/src/main/java/com/example/springboot/entity/device/PlcParameterInfo.java
New file
@@ -0,0 +1,112 @@
package com.example.springboot.entity.device;
public  class PlcParameterInfo {
      public PlcParameterInfo(String startAddress) {
        this.startAddress = startAddress;
      }
        private String startAddress;
        // 参数标识
        private String codeId;
        // 参数名称
        private String name;
        // 读取 参数值
        private String value;
        // // 写入 参数值
        // private String writeValue;
        // 参数单位
        private String unit;
        // 参数值转换系数
        private int ratio;
        // 参数地址
        private int addressIndex;
        // 参数地址位长度
        private int addressLength;
        public String getCodeId() {
            return this.codeId;
        }
        public void setCodeId(String codeId) {
            this.codeId = codeId;
        }
        public String getName() {
            return this.name;
        }
        public void setName(String name) {
            this.name = name;
        }
        public String getValue() {
            return this.value;
        }
        public void setValue(String value) {
            this.value = value;
        }
        // public String getWriteValue() {
        //     return this.writeValue;
        // }
        // public void setWriteValue(String writeValue) {
        //     this.writeValue = writeValue;
        // }
        public String getUnit() {
            return this.unit;
        }
        public void setUnit(String unit) {
            this.unit = unit;
        }
        public int getAddressIndex() {
            return this.addressIndex;
        }
        public void setAddressIndex(int addressindex) {
            this.addressIndex = addressindex;
        }
        public int getAddressLength() {
            return this.addressLength;
        }
        public void setAddressLength(int addresslength) {
            this.addressLength = addresslength;
        }
        public int getRatio() {
            return this.ratio;
        }
        public void setRatio(int ratio) {
            this.ratio = ratio;
        }
           /**
     * 获取地址
     *
     * @param index 索引地址
     */
    public String getAddress(int index) {
        String[] stringdatas = this.startAddress.trim().split("\\.");
        if (stringdatas.length < 2 )
            return null;
        int dbwindex = 0;
        int bitindex = 0;
         if (stringdatas.length == 2) {
            dbwindex = Integer.parseInt(stringdatas[1]);
        } else
            return null;
        return stringdatas[0]+"."+dbwindex+bitindex;
    }
    }
springboot-vue3/src/main/java/com/example/springboot/entity/device/PlcParameterObject.java
New file
@@ -0,0 +1,149 @@
package com.example.springboot.entity.device;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.List;
public class PlcParameterObject {
    // 该模块数据类型,数据起始位置
    private String plcAddressBegin;
    // 数据地址长度:第一参数到最后一个参数的长度
    private int plcAddressLength;
    private ArrayList<PlcParameterInfo> plcParameterList;
    /**
     * @return 数据区开始地址
     */
    public String getPlcAddressBegin() {
        return plcAddressBegin;
    }
    /**
     * @param plcAddressBegin 设置数据区开始地址
     */
    public void setPlcAddressBegin(String plcAddressBegin) {
        this.plcAddressBegin = plcAddressBegin;
    }
    /**
     * @return 数据区 读取所有数据所需的长度(以byte类型为基准)
     */
    public int getPlcAddressLength() {
        return plcAddressLength;
    }
    /**
     * @return 设置:数据区 读取所有数据所需的长度(以byte类型为基准)
     */
    public void setPlcAddressLength(int plcAddressLength) {
        this.plcAddressLength = plcAddressLength;
    }
    /**
     * @return 获取参数实例集合
     */
    public ArrayList<PlcParameterInfo> getPlcParameterList() {
        return plcParameterList;
    }
    /**
     * 根据参数标识 获取某个参数实例
     *
     * @param codeid 参数标识
     * @return 获取某个参数实例
     */
    public PlcParameterInfo getPlcParameter(String codeid) {
        if (plcParameterList != null) {
            for (PlcParameterInfo plcParameterInfo : plcParameterList) {
                if (plcParameterInfo.getCodeId().equals(codeid))
                    return plcParameterInfo;
            }
            return null;
        } else
            return null;
    }
    /**
     * 根据参数标识 获取某个参数实例
     *
     * @param codeid 参数标识
     * @return 获取某个参数实例
     */
    public List<String> getPlcParameterValues(List<String> codeids) {
        List<String> arrayList = new ArrayList();
        if (plcParameterList != null) {
            for (PlcParameterInfo plcParameterInfo : plcParameterList) {
                if (codeids.contains(plcParameterInfo.getCodeId().toString()))
                    arrayList.add(plcParameterInfo.getValue());
            }
        }
        return arrayList;
    }
    /**
     * 添加参数实例
     *
     * @param param 参数实例
     */
    public void addPlcParameter(PlcParameterInfo param) {
        if (plcParameterList != null)
            plcParameterList.add(param);
        else {
            plcParameterList = new ArrayList<PlcParameterInfo>();
            plcParameterList.add(param);
        }
    }
    /**
     * 根据PLC返回的数据 给参数实例赋值
     *
     * @param plcValueArray PLC读取回来的byte类型数据集合
     */
    public void setPlcParameterList(byte[] plcValueArray) {
        if (plcParameterList != null) {
            for (PlcParameterInfo plcParameterInfo : plcParameterList) {
                byte[] valueList = new byte[plcParameterInfo.getAddressLength()];
                for (int i = 0; i < plcParameterInfo.getAddressLength(); i++) {
                    Array.setByte(valueList, i, plcValueArray[plcParameterInfo.getAddressIndex() + i]);
                }
                if (plcParameterInfo.getAddressLength()==2) {
                      plcParameterInfo.setValue(String.valueOf(byte2short(valueList)));
                }
                else
                {
                    String valuestr = new String(valueList);
                    plcParameterInfo.setValue(valuestr);
                }
            }
        }
    }
     /**
     * short类型转byte[]
     *
     * @param s short类型值
     */
    public static byte[] short2byte(short s){
        byte[] b = new byte[2];
        for(int i = 0; i < 2; i++){
            int offset = 16 - (i+1)*8; //因为byte占4个字节,所以要计算偏移量
            b[i] = (byte)((s >> offset)&0xff); //把16位分为2个8位进行分别存储
        }
        return b;
   }
     /**
     * byte[]类型转short
     *
     * @param b byte[]类型值
     */
   public static short byte2short(byte[] b){
       short l = 0;
       for (int i = 0; i < 2; i++) {
           l<<=8; //<<=和我们的 +=是一样的,意思就是 l = l << 8
           l |= (b[i] & 0xff); //和上面也是一样的  l = l | (b[i]&0xff)
       }
       return l;
   }
}
springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
@@ -156,7 +156,7 @@
  List<north_glass_buffer1> SelectAluminumFrameInfoById(String FrameBarcode);
  //查询玻璃是否已存在于出片队列
  //根据玻璃id查询出片队列信息
  @Select("select * from out_slice where glassid=#{getbarcode}")
  Out_slice SelectQueueByglassid(String getbarcode);
@@ -174,9 +174,14 @@
  //查询用户权限
  @Select("select rp.* from role_permission rp inner join user r on rp.role_id=r.role_id and r.username=#{username} and (permission_id=32 or permission_id=33 or permission_id=34 or permission_id=35)")
  List<RolePermission> SelectPermissionByUserName(String username);
  //完成出片任务
  //根据玻璃完成出片任务
  @Update("update out_slice set state=4 where id=#{id}")
  void CompleteQueue(String id);
  //根据玻璃完成出片任务
  @Update("update out_slice set state=4 where id=#{id}")
  void CompleteQueueByGlassId(String glassid);
  //查询铝框id对应玻璃完成数量
  @Select("select count(*) from out_slice where barcode=#{frameid} and state!=4")
@@ -198,4 +203,8 @@
  @Select("select * from storage_task where task_state=0 and task_type=#{task_type}")
  List<StorageTask> SelectTaskByState(int task_type);
  //修改出片队列铝框状态
  @Select("update out_slice set framestate=#{framestate} where barcode=#{frameno}")
  void FrameStateUpdate(String frameno, String framestate);
}
springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
@@ -94,7 +94,7 @@
    void UpdataOutCage1(double width, int cage, int cell);
    // 调拨更换笼子信息
    @Update("update storage_cage as a,(select*from storage_cage b where b.cage=#{cage} and b.cell=#{cell} and b.tier=#{tier})as b set a.glass_id=b.glass_id,a.order_id=b.order_id,a.state=1,a.glasswidth=b.glasswidth,a.glassheight=b.glassheight,a.glasswidthmm=b.glasswidthmm,a.glassheightmm=b.glassheightmm,a.listid=b.listid,a.boxid=b.boxid where a.id=#{id1}")
    @Update("update storage_cage as a,(select*from storage_cage b where b.cage=#{cage} and b.cell=#{cell} and b.tier=#{tier})as b set a.glass_id=b.glass_id,a.order_id=b.order_id,a.state=1,a.glasswidth=b.glasswidth,a.glassheight=b.glassheight,a.glasswidthmm=b.glasswidthmm,a.glassheightmm=b.glassheightmm,a.listid=b.listid,a.boxid=b.boxid,a.FrameBarcode=b.FrameBarcode where a.id=#{id1}")
    void UpdateDBCage(int id1, int cage, int cell, int tier);
    // @Insert("insert into user(name, date, address, user_no) values (#{name},
@@ -117,11 +117,11 @@
    String SelectOrderout();
    // 内外片调换
    @Update("update storage_cage as a,(select*from storage_cage b where b.cage=#{cage} and b.cell=#{cell} and b.tier=1)as b set a.glass_id=b.glass_id,a.order_id=b.order_id,a.state=1,a.glasswidth=b.glasswidth,a.glassheight=b.glassheight,a.glasswidthmm=b.glasswidthmm,a.glassheightmm=b.glassheightmm,a.listid=b.listid,a.boxid=b.boxid where a.cage=#{cage} and a.cell=#{cell} and a.tier=2")
    @Update("update storage_cage as a,(select*from storage_cage b where b.cage=#{cage} and b.cell=#{cell} and b.tier=1)as b set a.glass_id=b.glass_id,a.order_id=b.order_id,a.state=1,a.glasswidth=b.glasswidth,a.glassheight=b.glassheight,a.glasswidthmm=b.glasswidthmm,a.glassheightmm=b.glassheightmm,a.listid=b.listid,a.boxid=b.boxid,a.FrameBarcode=b.FrameBarcode where a.cage=#{cage} and a.cell=#{cell} and a.tier=2")
    void UpdateDBCage1(int cage, int cell);
    // 清除内片数据
    @Update("update storage_cage a set glass_id='',order_id='',state=0,glasswidth=0,glassheight=0,glasswidthmm=0,glassheightmm=0,listid=null,boxid=null where a.cage=#{cage} and a.cell=#{cell} and a.tier=1;")
    @Update("update storage_cage a set glass_id=null,order_id=null,state=0,glasswidth=null,glassheight=null,glasswidthmm=null,glassheightmm=null,listid=null,boxid=null,FrameBarcode=null where a.cage=#{cage} and a.cell=#{cell} and a.tier=1;")
    void UpdateDBCage2(int cage, int cell);
    // 判断是否有调拨完后出片的任务
@@ -190,12 +190,15 @@
    int Selectqueuestate();
    // 判断铝框出片表是否有玻璃需要出
    @Select("SELECT glassid FROM `out_slice` where state=0  order by sequence,id  limit 1;")
    @Select("SELECT glassid FROM `out_slice` where state=0 and framestate!=1 order by sequence,id  limit 1;")
    String SelectOutSlice();
    // 判断铝框出片表是否有玻璃正在出片中
    @Select("SELECT count(*) FROM `out_slice` where state=1;")
    int SelectOutSliceshu();
    //判断是否有调拨任务未完成
    @Select("SELECT count(*) FROM `storage_cage` where state=#{state};")
    int Selectcageout(int state);
    // 更新出片队列的任务状态
    @Update("update out_slice set state=#{state} where glassid=#{glassid} and state=#{state2}")
@@ -222,4 +225,7 @@
    //获取该半区是否有执行的任务
    @Select(" select count(*) from storage_cage where state=#{state} and cage>#{cage1} and cage<#{cage2}")
    int SelectCageTask(int state,int cage1,int cage2);
    //判断玻璃是否禁用
    @Select(" select disabled from storage_cage where glass_id=#{glassid} limit 1;")
    int SelectCageGlassState(String glassid);
}
springboot-vue3/src/main/java/com/example/springboot/service/North_Glass_Buffer1Service.java
@@ -26,15 +26,15 @@
        public int compare(north_glass_buffer1 n1, north_glass_buffer1 n2) {//对查询到的铝框对应的玻璃数据进行排序,将离出片位置近的,靠近笼子出片侧的玻璃排在前面
            if (n1.getstorageCage() != null) {
                if (n2.getstorageCage() != null) {
                    int cageComparison = n2.getstorageCage().getCage().compareTo(n1.getstorageCage().getCage());
                    int cageComparison = n2.getstorageCage().getCage().compareTo(n1.getstorageCage().getCage());//靠出片口近的笼子优先
                    if (cageComparison != 0) {
                        return cageComparison;
                    } else {
                        int cellComparison = n2.getstorageCage().getCell().compareTo(n1.getstorageCage().getCell());
                        int cellComparison = n2.getstorageCage().getCell().compareTo(n1.getstorageCage().getCell());//靠出片口近的格子优先
                        if (cellComparison != 0) {
                            return cellComparison;
                        } else {
                            return n2.getstorageCage().getTier().compareTo(n1.getstorageCage().getTier());
                            return n2.getstorageCage().getTier().compareTo(n1.getstorageCage().getTier());//靠出片口近的格子外层优先
                        }
                    }
                } else {
springboot-vue3/src/main/java/com/example/springboot/service/OutSliceServive.java
@@ -66,6 +66,16 @@
    return Result.success(map);
  }
  // 确认后完成修改出片队列状态
  public void CompleteQueueByGlassId(String glassid) {
    homeMapper.CompleteQueueByGlassId(glassid);
    Out_slice outslice=homeMapper.SelectQueueByglassid(glassid);
    Short num = homeMapper.SelectCountByFrameNo(outslice.getBarCode());
    if (num == 0) {
      homeMapper.CompleteQueueByFrameNo(outslice.getBarCode());
    }
  }
  //终止进片/出片
  public void StopTask(String glassid, int i) {
    if (i == 0) {// 进片终止
@@ -88,4 +98,11 @@
    homeMapper.DeleteByGlassID(glassid);
  }
public Result FrameStateUpdate(String frameno, String framestate) {
    homeMapper.FrameStateUpdate(frameno, framestate);
    Map<String, Object> map = new HashMap<>();
    map.put("message", "200");
    return Result.success(map);
}
}
springboot-vue3/src/main/resources/JsonFile/PlcParameter.json
New file
@@ -0,0 +1,77 @@
{
   "plcAddressBegin":"DB100.0",
   "plcAddressLenght":"86",
   "dataType":"word",
   "parameteInfor":[
      {
         "codeId": "conveyorVelocity(Max)",
         "addressIndex":"0",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"m/min"
      },
      {
          "codeId": "conveyorVelocity(AutoSLOW)",
          "addressIndex":"6",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"m/min"
       },
       {
          "codeId": "conveyorVelocity(Manual)",
          "addressIndex":"4",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"m/min"
       },
       {
          "codeId": "A01A02TURNJOGVelocity",
          "addressIndex":"6",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"m/min"
       },
       {
          "codeId": "A01A02TRAVELJOGVelocity",
          "addressIndex":"8",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"m/min"
       },
       {
          "codeId": "B01B02TRAVELJOGVelocity",
          "addressIndex":"10",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"m/min"
       },
       {
          "codeId": "A01A02TURNPOSVelocityAUTO",
          "addressIndex":"12",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"m/min"
       },
       {
          "codeId": "A01A02TURNPOSVelocitymanual",
          "addressIndex":"14",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"m/min"
       },
       {
          "codeId": "A01A02TRAVELPOSVelocityAUTO",
          "addressIndex":"16",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"m/min"
       },
       {
         "codeId": "DO1id",
         "addressIndex":"18",
         "addressLenght":"14",
         "ratio":"1",
         "unit":"m/min"
      }
  ]
}
springboot-vue3/src/main/resources/JsonFile/PlcSign.json
New file
@@ -0,0 +1,47 @@
{
   "plcAddressBegin":"DB100.0.0",
   "plcAddressLenght":"20",
   "dataType":"bit",
   "parameteInfor":[
      {
         "codeId": "D01.SRdec",
         "addressIndex":"0"
      },
      {
          "codeId": "conveyorVelocity(AutoSLOW)",
          "addressIndex":"1"
       },
       {
          "codeId": "conveyorVelocity(Manual)",
          "addressIndex":"2"
       },
       {
          "codeId": "A01A02TURNJOGVelocity",
          "addressIndex":"3"
       },
       {
          "codeId": "A01A02TRAVELJOGVelocity",
          "addressIndex":"4"
       },
       {
          "codeId": "B01B02TRAVELJOGVelocity",
          "addressIndex":"5"
       },
       {
          "codeId": "A01A02TURNPOSVelocityAUTO",
          "addressIndex":"12"
       },
       {
          "codeId": "A01A02TURNPOSVelocitymanual",
          "addressIndex":"14"
       },
       {
          "codeId": "A01A02TRAVELPOSVelocityAUTO",
          "addressIndex":"16"
       },
       {
         "codeId": "DO1id",
         "addressIndex":"18"
      }
  ]
}