You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
829 B
Java

package com.example.pdaplccontrol;
final class PlcConfig {
// 参数集中放置,现场地址变化时只改这里。
static final String PLC_IP = "192.168.11.1";
static final int RACK = 0;
static final int SLOT = 1;
static final int DB_NUMBER = 49;
static final int LINE_NUMBER_OFFSET = 32;
static final int WEIGHT_KG_OFFSET = 34;
static final int WORD_BYTE_LENGTH = 2;
static final int MONITOR_START_OFFSET = LINE_NUMBER_OFFSET;
static final int MONITOR_BYTE_LENGTH = WEIGHT_KG_OFFSET + WORD_BYTE_LENGTH - MONITOR_START_OFFSET;
static final int MONITOR_INTERVAL_MILLIS = 2000;
static final int MIN_LINE_NUMBER = 10;
static final int MAX_LINE_NUMBER = 18;
static final int MIN_WEIGHT_KG = 0;
static final int MAX_WEIGHT_KG = 30;
private PlcConfig() {
}
}