📄 dsvariable.~pas
字号:
unit dsVariable;
interface
uses windows,Driver,SyncObjs;
//以下为--PCL722参数
type
Tsbuf=array[1..200] of byte; //存储协议字符串;
// lpDevList = ^PT_DEVLIST;
pid=record
setpoint:integer;
// Proportion:double;
// Integral:double;
// Derivative:double;
LastError:double;
PrevError1:double;
PrevError2:double;
PrevError3:double;
sumError:double;
state:boolean;
end;
const MaxEntries = 255;
var
DeviceHandle : Longint;
// ptDevGetFeatures : PT_DeviceGetFeatures;
// DeviceList : array [0..MaxEntries] of PT_DEVLIST;
// SubDeviceList : array [0..MaxEntries] of PT_DEVLIST;
ErrCde : Longint;
szErrMsg : string;
pszErrMsg : Pchar = @szErrMsg;
// lpDioPortMode : PT_DioSetPortMode;
// lpDioWritePort : PT_DioWritePortByte;
// lpDioGetCurrentDOByte : PT_DioGetCurrentDOByte;
lpDioWriteBit : PT_DioWriteBit;
// ---;
para_interval,para_dw,para_gw,para_qh,para_lq,para_fj1,para_fj1dj,para_fj2,para_fj2dj,para_fj3:string; //间隔时间,低温加热、高温加热、强化、冷却、风机1,风机2, 风机3 设定值
sj_interval,sj_dw,sj_gw,sj_qh,sj_lq,sj_fj1,sj_fj2,sj_fj3:string; //低温加热、高温加热、强化、冷却、风机1,风机2, 风机3 实际值
tempseq:integer; //为了减少轮询的延时性,线程每次只取一个8018的8个热电偶的温度;
pid_p,pid_i,pid_d,pid_t:double;
pidout:array[1..56] of pid;
pid_p:array[1..56] of integer;
pid_i:array[1..56] of integer;
pid_d:array[1..56] of integer;
bwarn:array[1..56] of boolean;
swriteerrormessage:array[1..5] of string;
starttime:dword;
temp_com,plc_com:string;
iwarn:integer;
sdefaultfile:string; //缺省的文件名;
sendcount:integer;//重发次数
sSendcommand:string;
readtempcount:integer;//读温度次数;
icycletime,ipower,iwarntemp,ipidtemp:integer;//加热周期,加热功率,报警温度;
bstart:boolean; //系统启动时默认读取plc设置参数,但延时比较长;
implementation
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -