21 lines
693 B
Python
21 lines
693 B
Python
import os, time, csv, struct, sys
|
|
import numpy as np
|
|
sys.path.append(r'.\UserScripts')
|
|
from user_common import wordData2HexStr, nowStr, nowStr1, checkValue, params_to_int
|
|
from CRC import crc16 as checkValue
|
|
|
|
SENDHEADER = ''
|
|
RSPHEADER = ''
|
|
RETRYTIMES = 3
|
|
CYCLES = 1
|
|
TIMEOUT = 0.2
|
|
DEBUG = True
|
|
|
|
deviceInfoTable = {
|
|
'PV':{'value':0,'address':0x0054,'mask':0x0001,'len':1},
|
|
'SV':{'value':0,'address':0x0054,'mask':0x0001,'len':1},
|
|
'OUT1':{'value':0,'address':0x0054,'mask':0x0001,'len':1},
|
|
'OUT2':{'value':0,'address':0x0054,'mask':0x0001,'len':1},
|
|
'EXE_FLG':{'value':0,'address':0x0054,'mask':0x0001,'len':1},
|
|
'EV_FLG':{'value':0,'address':0x0054,'mask':0x0001,'len':1},
|
|
} |