1、在全局脚本的VB语言中,设置1S钟触发周期VB项目:
2、程序代码(详细看导出的VB动作):
Option Explicit
Function action
action = vbTrue
Dim MyDate,MyTime
MyDate = FormatDateTime(Now,vbLongDate)
MyTime = FormatDateTime(Now,vbLongTime)
Dim Path
Path = HMIRuntime.ActiveProject.Path &"\TXTDIST\"
Dim Name_a,Name_b,Name_c,Name_d,VPa,VPb,VPc,VPd,VPm
Name_a = MyDate& "A记录.txt"
Name_b = MyDate& "B记录.txt"
Name_c = MyDate& "C记录.txt"
Name_d = MyDate& "D记录.txt"
VPa = MyDate& "A泵阀动作记录.txt"
VPb = MyDate& "B泵阀动作记录.txt"
VPc = MyDate& "C泵阀动作记录.txt"
VPd = MyDate& "D泵阀动作记录.txt"
VPm = MyDate& "公共泵阀动作记录.txt"
Dim FA,FB,FC,FD,VPAN,VPBN,VPCN,VPDN,VPMN
FA = Path& Name_a
FB = Path& Name_b
FC = Path& Name_c
FD = Path& Name_d
VPAN = Path& VPa
VPBN = Path& VPb
VPCN = Path& VPc
VPDN = Path& VPd
VPMN = Path& VPm
HMIRuntime.Tags("FA_FileName").WriteFA
HMIRuntime.Tags("FB_FileName").WriteFB
HMIRuntime.Tags("FC_FileName").WriteFC
HMIRuntime.Tags("FD_FileName").WriteFD
HMIRuntime.Tags("VPA_FileName").WriteVPAN
HMIRuntime.Tags("VPB_FileName").WriteVPBN
HMIRuntime.Tags("VPC_FileName").WriteVPCN
HMIRuntime.Tags("VPD_FileName").WriteVPDN
HMIRuntime.Tags("VPM_FileName").WriteVPMN
HMIRuntime.Tags("MyTime").WriteMyTime
End Function
3、编写C语言全局动作,读写记录操作(C语言全局动作,详细看导出的C动作)
C程序代码:
#include "apdefap.h"
int gscAction( void )
{
#pragma option(mbcs)
#defineTAG_1"FILTER_A.start" //定义自动启动A位(当变化变量时,触发位相应变化)
#define TAG_2"FILTER_B.start" //定义自动启动B位(当变化变量时,触发位相应变化)
#define TAG_3"start_a" //定义自动启动C位(当变化变量时,触发位相应变化)
#define TAG_4"start_b" //定义自动启动D位(当变化变量时,触发位相应变化)
Int ka,kb,kc,kd; //定义整数当前过步骤
int ia,ib,ic,id; //定义整数批次
static int na=0; //初始化前一A#步骤
static int nb=0; //初始化前一B#步骤
static int nc=0; //初始化前一C#步骤
static int nd=0; //初始化前一D#步骤
float ta,tb,tc,td; //定义浮点运行时间
char* p, *name,*patha,*pathb, *pathc,*pathd,*pavha,*pavhb,*pavhc,*pavhd,*pavhm; //定义字符时间,路径
BOOL s3a,s4a,s5a,s6a,s7a,s8a,s9a,s11a,s12a,s13a,sm6a,sm14a,sm15a,sm16a;
static BOOL h3a,h4a,h5a,h6a,h7a,h8a,h9a,h11a,h12a,h13a,hm6a,hm14a,hm15a,hm16a; //a
BOOL s3c,s4c,s5c,s6c,s7c,s8c,s9c,s11c,s12c,s13c,sm6c,sm14c,sm15c,sm16c;
static BOOL h3c,h4c,h5c,h6c,h7c,h8c,h9c,h11c,h12c,h13c,hm6c,hm14c,hm15c,hm16c; //c
BOOL s3b,s4b,s5b,s6b,s7b,s8b,s9b,s11b,s12b,s13b,sm6b,sm14b,sm15b,sm16b;
static BOOL h3b,h4b,h5b,h6b,h7b,h8b,h9b,h11b,h12b,h13b,hm6b,hm14b,hm15b,hm16b; //b
BOOL s3d,s4d,s5d,s6d,s7d,s8d,s9d,s11d,s12d,s13d,sm6d,sm14d,sm15d,sm16d;
static BOOL h3d,h4d,h5d,h6d,h7d,h8d,h9d,h11d,h12d,h13d,hm6d,hm14d,hm15d,hm16d; //d
BOOLs1,s2,s14,s10a,s10b,s10c,s10d,sm7,sm8,sm10,sm11,sm12,sm17,sm18;
static BOOLh1,h2,h14,h10a,h10b,h10c,h10d,hm7,hm8,hm10,hm11,hm12,hm17,hm18; //m
char qa[12] ,qb[12], qc[12], qd[12]; //定义字符批次A\b\c\d
char runa[12] ,runb[12], runc[12],rund[12]; //定义字符运行时间A\b\c\d
FILE* fpa; //定义A文件名
FILE* fpb; //定义B文件名
FILE* fpc; //定义C文件名
FILE* fpd; //定义D文件名
FILE* fva; //定义A文件名
FILE* fvb; //定义B文件名
FILE* fvc; //定义C文件名
FILE* fvd; //定义D文件名
FILE* fvm; //定义m文件名
//文件路径A/B/C/D
char buf[128]; //文件内容
ka=GetTagWord("FILTER_A.setp"); //当前A过滤步
kb=GetTagWord("FILTER_B.setp"); //当前B过滤步
kc=GetTagWord("STEP_C"); //当前C过滤步
kd=GetTagWord("STEP_D"); //当前D过滤步
ia=GetTagDWord("FILTER_A.batch"); //当前A总批次
ib=GetTagDWord("FILTER_B.batch"); //当前B总批次
ic=GetTagDWord("BATCH_C"); //当前C总批次
id=GetTagDWord("BATCH_D"); //当前D总批次
ta=GetTagFloat("FILTER_A.run_time"); //当前A运行时间
tb=GetTagFloat("FILTER_B.run_time"); //当前B运行时间
tc=GetTagFloat("TIME_C"); //当前C运行时间
td=GetTagFloat("TIME_D"); //当前D运行时间
p = GetTagChar("MyTime"); //当前时间
patha=GetTagChar("FA_FileName"); //当前时间文件路径A
pathb=GetTagChar("FB_FileName"); //当前时间文件路径B
pathc=GetTagChar("FC_FileName"); //当前时间文件路径C
pathd=GetTagChar("FD_FileName"); //当前时间文件路径D
name =GetTagChar("@CurrentUserName"); //当前用户名(操作员)
pavha=GetTagChar("VPA_FileName"); //当前时间文件路径A
pavhb=GetTagChar("VPB_FileName"); //当前时间文件路径B
pavhc=GetTagChar("VPC_FileName"); //当前时间文件路径C
pavhd=GetTagChar("VPD_FileName"); //当前时间文件路径D
pavhm=GetTagChar("VPM_FileName"); //当前时间文件路径M
sprintf(qa, "%d",ia); //总批次A转字符
sprintf(qb, "%d",ib); //总批次B转字符
sprintf(qc, "%d",ic); //总批次C转字符
sprintf(qd, "%d",id); //总批次D转字符
sprintf(runa, "%f",ta); //运行时间A转字符
sprintf(runb, "%f",tb); //运行时间B转字符
sprintf(runc, "%f",tc); //运行时间C转字符
sprintf(rund, "%f",td); //运行时间D转字符
s3a = GetTagBit("A.BVV03"); //Return-Type: BOOL
s4a = GetTagBit("A.BVV04"); //Return-Type:BOOL
s5a = GetTagBit("A.BVV05"); //Return-Type: BOOL
s6a = GetTagBit("A.BVV06"); //Return-Type: BOOL
s7a = GetTagBit("A.BVV07"); //Return-Type: BOOL
s8a = GetTagBit("A.BVV08"); //Return-Type:BOOL
s9a = GetTagBit("A.BVV09"); //Return-Type: BOOL
s11a = GetTagBit("A.BVV11"); //Return-Type: BOOL
s12a = GetTagBit("A.BVV12"); //Return-Type:BOOL
s13a = GetTagBit("A.BVV13"); //Return-Type: BOOL
sm6a=GetTagBit("MOT06A_OUT"); //Return-Type: BOOL
sm14a=GetTagBit("MOT14A_OUT"); //Return-Type: BOOL
sm15a=GetTagBit("MOT15A_OUT"); //Return-Type:BOOL
sm16a=GetTagBit("MOT16A_OUT"); //a
s3b = GetTagBit("B.BVV03"); //Return-Type: BOOL
s4b = GetTagBit("B.BVV04"); //Return-Type:BOOL
s5b = GetTagBit("B.BVV05"); //Return-Type: BOOL
s6b = GetTagBit("B.BVV06"); //Return-Type: BOOL
s7b = GetTagBit("B.BVV07"); //Return-Type:BOOL
s8b = GetTagBit("B.BVV08"); //Return-Type: BOOL
s9b = GetTagBit("B.BVV09"); //Return-Type:BOOL
s11b = GetTagBit("B.BVV11"); //Return-Type: BOOL
s12b = GetTagBit("B.BVV12"); //Return-Type: BOOL
s13b = GetTagBit("B.BVV13"); //Return-Type:BOOL
sm6b=GetTagBit("MOT06B_OUT"); //Return-Type: BOOL
sm14b=GetTagBit("MOT14B_OUT"); //Return-Type: BOOL
sm15b=GetTagBit("MOT15B_OUT"); //Return-Type: BOOL
sm16b=GetTagBit("MOT16B_OUT"); //b
s3c = GetTagBit("C.BVV03"); //Return-Type: BOOL
s4c = GetTagBit("C.BVV04"); //Return-Type: BOOL
s5c = GetTagBit("C.BVV05"); //Return-Type:BOOL
s6c = GetTagBit("C.BVV06"); //Return-Type: BOOL
s7c = GetTagBit("C.BVV07"); //Return-Type: BOOL
s8c = GetTagBit("C.BVV08"); //Return-Type:BOOL
s9c = GetTagBit("C.BVV09"); //Return-Type:BOOL
s11c = GetTagBit("C.BVV11"); //Return-Type: BOOL
s12c = GetTagBit("C.BVV12"); //Return-Type: BOOL
s13c = GetTagBit("C.BVV13"); //Return-Type:BOOL
sm6c=GetTagBit("MOT06C_OUT"); //Return-Type: BOOL
sm14c=GetTagBit("MOT14C_OUT"); //Return-Type: BOOL
sm15c=GetTagBit("MOT15C_OUT"); //Return-Type:BOOL
sm16c=GetTagBit("MOT16C_OUT"); //C
s3d = GetTagBit("D.BVV03"); //Return-Type: BOOL
s4d = GetTagBit("D.BVV04"); //Return-Type: BOOL
s5d = GetTagBit("D.BVV05"); //Return-Type:BOOL
s6d = GetTagBit("D.BVV06"); //Return-Type: BOOL
s7d = GetTagBit("D.BVV07"); //Return-Type: BOOL
s8d = GetTagBit("D.BVV08"); //Return-Type: BOOL
s9d = GetTagBit("D.BVV09"); //Return-Type:BOOL
s11d = GetTagBit("D.BVV11"); //Return-Type: BOOL
s12d = GetTagBit("D.BVV12"); //Return-Type: BOOL
s13d = GetTagBit("D.BVV13"); //Return-Type:BOOL
sm6d=GetTagBit("MOT06D_OUT"); //Return-Type: BOOL
sm14d=GetTagBit("MOT14D_OUT"); //Return-Type: BOOL
sm15d=GetTagBit("MOT15D_OUT"); //Return-Type: BOOL
sm16d=GetTagBit("MOT16D_OUT"); //D
s10a = GetTagBit("A.BVV10"); //Return-Type: BOOL
s10b = GetTagBit("B.BVV10"); //Return-Type: BOOL
s10c = GetTagBit("C.BVV10"); //Return-Type:BOOL
s10d = GetTagBit("D.BVV10"); //Return-Type: BOOL
s1 =GetTagBit("BVV01_OUT"); //Return-Type: BOOL
s2 =GetTagBit("BVV02_OUT"); //Return-Type:BOOL
s14 = GetTagBit("BVV14_OUT"); //Return-Type:BOOL
sm7=GetTagBit("MOT07_OUT");
sm8=GetTagBit("MOT08_OUT");
sm10=GetTagBit("MOT10_OUT");
sm11=GetTagBit("MOT11_OUT");
sm12=GetTagBit("MOT12_OUT");
sm17=GetTagBit("MOT17_OUT");
sm18=GetTagBit("MOT18_OUT"); //D
fpa= fopen(patha, "a+"); //记事本地址
if(GetTagDouble(TAG_1)) //当自动启动位有效时
{
if ((ka==24)&&((na==0)||(na>24))) //低压泵固定频率1过滤
{
sprintf(buf, "1:过滤开始时间,低压泵冲洗管道步:\t %s\n",p);
fputs(buf, fpa);
sprintf(buf, "操作员:\t %s\n",name);
fputs(buf, fpa);
sprintf(buf, "过滤批次为:\t %s\n",qa);
fputs(buf, fpa);
}
if((ka==3)&&((na<3)||(na>3))) //低压泵固定频率2过滤
{
sprintf(buf,"2:低压进料泵过滤:\t %s\n",p);
fputs(buf, fpa);
}
if ((ka==23)&&((na<23)||(na>23))) //3;低压泵过滤恒压控制
{
sprintf(buf, "3;高压进料泵过滤:\t%s\n",p);
fputs(buf, fpa);
}
if((ka==25)&&((na<25)||(na>25))) //4;高压泵固定频率过滤
{
sprintf(buf, "4;高压冲洗管道步:\t%s\n",p);
fputs(buf, fpa);
}
if((ka==7)&&((na<5)||(na>7))) //5;高压泵过滤恒压控制1
{
sprintf(buf, "5;压榨步:\t%s\n",p);
fputs(buf, fpa);
}
if((ka==4)&&((na<4)||(na>4))) //6;高压泵过滤恒压控制2
{
sprintf(buf, "6;反吹步:\t%s\n",p);
fputs(buf, fpa);
}
if((ka==8)&&((na<8)||(na>8))) //7; 反冲洗
{
sprintf(buf, "7;隔膜排空步:\t%s\n",p);
fputs(buf, fpa);
}
if((ka==22)&&((na<22)||(na>22))) //过滤结束。
{
sprintf(buf, "过滤结束时间是\t%s\n",p);
fputs(buf, fpa);
sprintf(buf, "本次运行时间是\t%s\n",runa);
fputs(buf, fpa);
sprintf(buf," \n");
fputs(buf, fpa);
}
na=ka; //复制当前过滤步到前一过滤步。
}
fclose(fpa); //关闭文件。
//#####################################################
fpb= fopen(pathb, "a+"); //记事本地址
if(GetTagDouble(TAG_2)) //当自动启动位有效时
{
if((kb==24)&&((nb==0)||(nb>24))) //低压泵固定频率1过滤
{
sprintf(buf, "1:过滤开始时间,低压泵冲洗管道步:\t %s\n",p);
fputs(buf, fpb);
sprintf(buf, "操作员:\t %s\n",name);
fputs(buf, fpb);
sprintf(buf, "过滤批次为:\t %s\n",qb);
fputs(buf, fpb);
}
if((kb==3)&&((nb<3)||(nb>3))) //低压泵固定频率2过滤
{
sprintf(buf,"2:低压进料过滤步:\t %s\n",p);
fputs(buf, fpb);
}
if((kb==23)&&((nb<23)||(nb>23))) //3;低压泵过滤恒压控制
{
sprintf(buf, "3;高压进料过滤步:\t%s\n",p);
fputs(buf, fpb);
}
if((kb==7)&&((nb<7)||(nb>7))) //4;高压泵固定频率过滤
{
sprintf(buf, "4;隔膜压榨过滤步:\t%s\n",p);
fputs(buf, fpb);
}
if((kb==4)&&((nb<4)||(nb>4))) //5;高压泵过滤恒压控制1
{
sprintf(buf, "5;反向吹气步:\t%s\n",p);
fputs(buf, fpb);
}
if((kb==8)&&((nb<8)||(nb>8))) //6;高压泵过滤恒压控制2
{
sprintf(buf, "6;隔膜排水步:\t%s\n",p);
fputs(buf, fpb);
}
if((kb==22)&&((nb<22)||(nb>22))) //过滤结束。
{
sprintf(buf, "过滤结束时间是\t%s\n",p);
fputs(buf, fpb);
sprintf(buf, "本次运行时间是\t%s\n",runb);
fputs(buf, fpb);
sprintf(buf," \n");
fputs(buf, fpb);
}
nb=kb; //复制当前过滤步到前一过滤步。
}
fclose(fpb); //关闭文件。
//##############################################################################
fpc= fopen(pathc, "a+"); //记事本地址
if(GetTagDouble(TAG_3)) //当自动启动位有效时
{
if ((kc==1)&&((nc==0)||(nc>1))) //低压泵固定频率1过滤
{
sprintf(buf, "1:过滤开始时间,浓缩过滤1步,预处理步:\t %s\n",p);
fputs(buf, fpc);
sprintf(buf, "操作员:\t %s\n",name);
fputs(buf, fpc);
sprintf(buf, "过滤批次为:\t %s\n",qc);
fputs(buf, fpc);
}
if ((kc==2)&&((nc<2)||(nc>2))) //低压泵固定频率2过滤
{
sprintf(buf,"2:浓缩过滤2步,浓缩开始:\t %s\n",p);
fputs(buf, fpc);
}
if((kc==3)&&((nc<3)||(nc>3))) //3;低压泵过滤恒压控制
{
sprintf(buf, "3;浓缩过滤结束,冲洗滤布:\t%s\n",p);
fputs(buf, fpc);
}
if((kc==4)&&((nc<4)||(nc>4))) //4;高压泵固定频率过滤
{
sprintf(buf, "4;调理池加入石灰步:\t%s\n",p);
fputs(buf, fpc);
}
if((kc==5)&&((nc<5)||(nc>5))) //5;高压泵过滤恒压控制1
{
sprintf(buf, "5;石灰加药结束,搅拌步:\t%s\n",p);
fputs(buf, fpc);
}
if((kc==6)&&((nc<6)||(nc>6))) //过滤结束。
{
sprintf(buf, "浓缩配料结束时间是\t%s\n",p);
fputs(buf, fpc);
sprintf(buf, "本次运行时间是\t%s\n",runc);
fputs(buf, fpc);
sprintf(buf," XXX \n");
fputs(buf, fpc);
}
nc=kc; //复制当前过滤步到前一过滤步。
}
fclose(fpc); //关闭文件。
//###########################################################################
fpd= fopen(pathd, "a+"); //记事本地址
if(GetTagDouble(TAG_4)) //当自动启动位有效时
{
if ((kd==1)&&((nd==0)||(nd>1))) //低压泵固定频率1过滤
{
sprintf(buf, "1:过滤开始时间,浓缩过滤1步,预处理步:\t %s\n",p);
fputs(buf, fpd);
sprintf(buf, "操作员:\t %s\n",name);
fputs(buf, fpd);
sprintf(buf, "过滤批次为:\t %s\n",qd);
fputs(buf, fpd);
}
if((kd==2)&&((nd<2)||(nd>2))) //低压泵固定频率2过滤
{
sprintf(buf,"2:浓缩过滤2步,浓缩开始:\t %s\n",p);
fputs(buf, fpd);
}
if((kd==3)&&((nd<3)||(nd>3))) //3;低压泵过滤恒压控制
{
sprintf(buf, "3;浓缩过滤结束,冲洗滤布:\t%s\n",p);
fputs(buf, fpd);
}
if ((kd==4)&&((nd<4)||(nd>4))) //4;高压泵固定频率过滤
{
sprintf(buf, "4;调理池加入石灰步:\t%s\n",p);
fputs(buf, fpd);
}
if((kd==5)&&((nd<5)||(nd>5))) //5;高压泵过滤恒压控制1
{
sprintf(buf, "5;石灰加药结束,搅拌步:\t%s\n",p);
fputs(buf, fpd);
}
if((kd==6)&&((nd<6)||(nd>6))) //过滤结束。
{
sprintf(buf, "浓缩过滤结束时间是\t%s\n",p);
fputs(buf, fpd);
sprintf(buf, "本次运行时间是\t%s\n",rund);
fputs(buf, fpd);
sprintf(buf," XXXXXX \n");
fputs(buf, fpd);
}
nd=kd; //复制当前过滤步到前一过滤步。
}
fclose(fpd); //关闭文件。
//#############################################################################
fva= fopen(pavha, "a+"); //记事本地址
if(s3a==h3a) //BVV03A
{
}
else
if(GetTagBit("A.BVV03") //Return-Type: BOOL
)
{
sprintf(buf,"BVV03A打开时间是:\t %s\n",p);
fputs(buf, fva);
}
else
{
sprintf(buf, "BVV03A关闭时间是:\t%s\n",p);
fputs(buf, fva);
}
if(s4a==h4a) //BVV03A
{
}
else
if(GetTagBit("A.BVV04") //Return-Type: BOOL
)
{
sprintf(buf,"BVV04A打开时间是:\t %s\n",p);
fputs(buf, fva);
}
else
{
sprintf(buf,"BVV04A关闭时间是:\t %s\n",p);
fputs(buf, fva);
}
if(s5a==h5a) //BVV03A
{
}
else
if(GetTagBit("A.BVV05") //Return-Type: BOOL
)
{
sprintf(buf,"BVV05A打开时间是:\t %s\n",p);
fputs(buf, fva);
}
else
{
sprintf(buf,"BVV05A关闭时间是:\t %s\n",p);
fputs(buf,fva);
}
if(s6a==h6a) //BVV03A
{
}
else
if(GetTagBit("A.BVV06") //Return-Type: BOOL
)
{
sprintf(buf,"BVV06A打开时间是:\t %s\n",p);
fputs(buf, fva);
}
else
{
sprintf(buf,"BVV06A关闭时间是:\t %s\n",p);
fputs(buf, fva);
}
if(s7a==h7a) //BVV03A
{
}
else
if(GetTagBit("A.BVV07") //Return-Type: BOOL
)
{
sprintf(buf,"BVV07A打开时间是:\t %s\n",p);
fputs(buf, fva);
}
else
{
sprintf(buf,"BVV07A关闭时间是:\t %s\n",p);
fputs(buf, fva);
}
if(s8a==h8a) //BVV03A
{
}
else
if(GetTagBit("A.BVV08") //Return-Type: BOOL
)
{
sprintf(buf,"BVV08A打开时间是:\t %s\n",p);
fputs(buf, fva);
}
else
{
sprintf(buf,"BVV08A关闭时间是:\t %s\n",p);
fputs(buf, fva);
}
if(s9a==h9a) //BVV03A
{
}
else
if(GetTagBit("A.BVV09") //Return-Type: BOOL
)
{
sprintf(buf,"BVV09A打开时间是:\t %s\n",p);
fputs(buf, fva);
}
else
{
sprintf(buf,"BVV09A关闭时间是:\t %s\n",p);
fputs(buf, fva);
}
if(s11a==h11a) //BVV03A
{
}
else
if(GetTagBit("A.BVV11") //Return-Type: BOOL
)
{
sprintf(buf,"BVV11A打开时间是:\t %s\n",p);
fputs(buf, fva);
}
else
{
sprintf(buf,"BVV11A关闭时间是:\t %s\n",p);
fputs(buf, fva);
}
if(s12a==h12a) //BVV03A
{
}
else
if(GetTagBit("A.BVV12") //Return-Type: BOOL
)
{
sprintf(buf, "BVV12A打开时间是:\t%s\n",p);
fputs(buf, fva);
}
else
{
sprintf(buf,"BVV12A关闭时间是:\t %s\n",p);
fputs(buf, fva);
}
if(s13a==h13a) //BVV03A
{
}
else
if(GetTagBit("A.BVV13") //Return-Type: BOOL
)
{
sprintf(buf,"BVV13A打开时间是:\t %s\n",p);
fputs(buf, fva);
}
else
{
sprintf(buf,"BVV13A关闭时间是:\t %s\n",p);
fputs(buf, fva);
}
if(sm6a==hm6a) //BVV03A
{
}
else
if(GetTagBit("MOT06A_OUT") //Return-Type: BOOL
)
{
sprintf(buf,"MOT06A输送机启动时间是:\t %s\n",p);
fputs(buf, fva);
}
else
{
sprintf(buf,"MOT06A输送机停止时间是:\t %s\n",p);
fputs(buf, fva);
}
if(sm14a==hm14a) //BVV03A
{
}
else
if(GetTagBit("MOT14A_OUT") //Return-Type: BOOL
)
{
sprintf(buf,"MOT14A低压进料泵启动时间是:\t %s\n",p);
fputs(buf, fva);
}
else
{
sprintf(buf,"MOT14A低压进料泵停止时间是:\t %s\n",p);
fputs(buf, fva);
}
if(sm15a==hm15a) //BVV03A
{
}
else
if(GetTagBit("MOT15A_OUT") //Return-Type: BOOL
)
{
sprintf(buf,"MOT15A高压进料泵启动时间是:\t %s\n",p);
fputs(buf, fva);
}
else
{
sprintf(buf,"MOT15A高压进料泵停止时间是:\t %s\n",p);
fputs(buf, fva);
}
if(sm16a==hm16a) //BVV03A
{
}
else
if(GetTagBit("MOT16A_OUT") //Return-Type: BOOL
)
{
sprintf(buf,"MOT16A压榨泵启动时间是:\t %s\n",p);
fputs(buf, fva);
}
else
{
sprintf(buf,"MOT16A压榨泵停止时间是:\t %s\n",p);
fputs(buf, fva);
}
h3a = GetTagBit("A.BVV03"); //Return-Type: BOOL
h4a = GetTagBit("A.BVV04"); //Return-Type:BOOL
h5a = GetTagBit("A.BVV05"); //Return-Type: BOOL
h6a = GetTagBit("A.BVV06"); //Return-Type: BOOL
h7a = GetTagBit("A.BVV07"); //Return-Type:BOOL
h8a = GetTagBit("A.BVV08"); //Return-Type:BOOL
h9a = GetTagBit("A.BVV09"); //Return-Type: BOOL
h11a = GetTagBit("A.BVV11"); //Return-Type:BOOL
h12a = GetTagBit("A.BVV12"); //Return-Type:BOOL
h13a = GetTagBit("A.BVV13"); //Return-Type: BOOL
hm6a=GetTagBit("MOT06A_OUT"); //Return-Type: BOOL
hm14a=GetTagBit("MOT14A_OUT"); //Return-Type:BOOL
hm15a=GetTagBit("MOT15A_OUT"); //Return-Type: BOOL
hm16a=GetTagBit("MOT16A_OUT"); //a
fclose(fva); //关闭文件。
//######################################################################################################
fvb= fopen(pavhb, "a+"); //记事本地址
if(s3b==h3b) //BVV03A
{
}
else
if(GetTagBit("B.BVV03") //Return-Type: BOOL
)
{
sprintf(buf,"BVV03B打开时间是:\t %s\n",p);
fputs(buf, fvb);
}
else
{
sprintf(buf,"BVV03B关闭时间是:\t %s\n",p);
fputs(buf, fvb);
}
if(s4b==h4b) //BVV03A
{
}
else
if(GetTagBit("B.BVV04") //Return-Type: BOOL
)
{
sprintf(buf,"BVV04B打开时间是:\t %s\n",p);
fputs(buf, fvb);
}
else
{
sprintf(buf,"BVV04B关闭时间是:\t %s\n",p);
fputs(buf, fvb);
}
if(s5b==h5b) //BVV03A
{
}
else
if(GetTagBit("B.BVV05") //Return-Type: BOOL
)
{
sprintf(buf,"BVV05B打开时间是:\t %s\n",p);
fputs(buf, fvb);
}
else
{
sprintf(buf,"BVV05B关闭时间是:\t %s\n",p);
fputs(buf, fvb);
}
if(s6b==h6b) //BVV03A
{
}
else
if(GetTagBit("B.BVV06") //Return-Type: BOOL
)
{
sprintf(buf,"BVV06B打开时间是:\t %s\n",p);
fputs(buf, fvb);
}
else
{
sprintf(buf,"BVV06B关闭时间是:\t %s\n",p);
fputs(buf, fvb);
}
if(s7b==h7b) //BVV03A
{
}
else
if(GetTagBit("B.BVV07") //Return-Type: BOOL
)
{
sprintf(buf,"BVV07B打开时间是:\t %s\n",p);
fputs(buf, fvb);
}
else
{
sprintf(buf,"BVV07B关闭时间是:\t %s\n",p);
fputs(buf, fvb);
}
if(s8b==h8b) //BVV03A
{
}
else
if(GetTagBit("B.BVV08") //Return-Type: BOOL
)
{
sprintf(buf,"BVV08B打开时间是:\t %s\n",p);
fputs(buf, fvb);
}
else
{
sprintf(buf,"BVV08B关闭时间是:\t %s\n",p);
fputs(buf, fvb);
}
if(s9b==h9b) //BVV03A
{
}
else
if(GetTagBit("B.BVV09") //Return-Type: BOOL
)
{
sprintf(buf,"BVV09B打开时间是:\t %s\n",p);
fputs(buf, fvb);
}
else
{
sprintf(buf,"BVV09B关闭时间是:\t %s\n",p);
fputs(buf, fvb);
}
if(s11b==h11b) //BVV03A
{
}
else
if(GetTagBit("B.BVV11") //Return-Type: BOOL
)
{
sprintf(buf, "BVV11B打开时间是:\t%s\n",p);
fputs(buf, fvb);
}
else
{
sprintf(buf,"BVV11B关闭时间是:\t %s\n",p);
fputs(buf, fvb);
}
if(s12b==h12b) //BVV03A
{
}
else
if(GetTagBit("B.BVV12") //Return-Type: BOOL
)
{
sprintf(buf,"BVV12B打开时间是:\t %s\n",p);
fputs(buf, fvb);
}
else
{
sprintf(buf,"BVV12B关闭时间是:\t %s\n",p);
fputs(buf, fvb);
}
if(s13b==h13b) //BVV03A
{
}
else
if(GetTagBit("B.BVV13") //Return-Type: BOOL
)
{
sprintf(buf,"BVV13B打开时间是:\t %s\n",p);
fputs(buf, fvb);
}
else
{
sprintf(buf,"BVV13B关闭时间是:\t %s\n",p);
fputs(buf, fvb);
}
if(sm6b==hm6b) //BVV03A
{
}
else
if(GetTagBit("MOT06B_OUT") //Return-Type: BOOL
)
{
sprintf(buf, "MOT06B输送机启动时间是:\t%s\n",p);
fputs(buf, fvb);
}
else
{
sprintf(buf,"MOT06B输送机停止时间是:\t %s\n",p);
fputs(buf, fvb);
}
if(sm14b==hm14b) //BVV03A
{
}
else
if(GetTagBit("MOT14B_OUT") //Return-Type: BOOL
)
{
sprintf(buf,"MOT14B低压进料泵启动时间是:\t %s\n",p);
fputs(buf, fvb);
}
else
{
sprintf(buf,"MOT14B低压进料泵停止时间是:\t %s\n",p);
fputs(buf, fvb);
}
if(sm15b==hm15b) //BVV03A
{
}
else
if(GetTagBit("MOT15B_OUT") //Return-Type: BOOL
)
{
sprintf(buf,"MOT15B高压进料泵启动时间是:\t %s\n",p);
fputs(buf, fvb);
}
else
{
sprintf(buf,"MOT15B高压进料泵停止时间是:\t %s\n",p);
fputs(buf, fvb);
}
if(sm16b==hm16b) //BVV03A
{
}
else
if(GetTagBit("MOT16B_OUT") //Return-Type: BOOL
)
{
sprintf(buf,"MOT16B压榨泵启动时间是:\t %s\n",p);
fputs(buf, fvb);
}
else
{
sprintf(buf,"MOT16B压榨泵停止时间是:\t %s\n",p);
fputs(buf, fvb);
}
h3b = GetTagBit("B.BVV03"); //Return-Type: BOOL
h4b = GetTagBit("B.BVV04"); //Return-Type:BOOL
h5b = GetTagBit("B.BVV05"); //Return-Type: BOOL
h6b = GetTagBit("B.BVV06"); //Return-Type: BOOL
h7b = GetTagBit("B.BVV07"); //Return-Type:BOOL
h8b = GetTagBit("B.BVV08"); //Return-Type: BOOL
h9b = GetTagBit("B.BVV09"); //Return-Type:BOOL
h11b = GetTagBit("B.BVV11"); //Return-Type: BOOL
h12b = GetTagBit("B.BVV12"); //Return-Type: BOOL
h13b = GetTagBit("B.BVV13"); //Return-Type:BOOL
hm6b=GetTagBit("MOT06B_OUT"); //Return-Type: BOOL
hm14b=GetTagBit("MOT14B_OUT"); //Return-Type: BOOL
hm15b=GetTagBit("MOT15B_OUT"); //Return-Type: BOOL
hm16b=GetTagBit("MOT16B_OUT"); //b
fclose(fvb); //关闭文件。
//##########################################################################################################
fvc= fopen(pavhc, "a+"); //记事本地址
if(s3c==h3c) //BVV03A
{
}
else
if(GetTagBit("C.BVV03") //Return-Type: BOOL
)
{
sprintf(buf,"BVV03C打开时间是:\t %s\n",p);
fputs(buf, fvc);
}
else
{
sprintf(buf,"BVV03C关闭时间是:\t %s\n",p);
fputs(buf, fvc);
}
if(s4c==h4c) //BVV03A
{
}
else
if(GetTagBit("C.BVV04") //Return-Type: BOOL
)
{
sprintf(buf,"BVV04C打开时间是:\t %s\n",p);
fputs(buf, fvc);
}
else
{
sprintf(buf,"BVV04C关闭时间是:\t %s\n",p);
fputs(buf, fvc);
}
if(s5c==h5c) //BVV03A
{
}
else
if(GetTagBit("C.BVV05") //Return-Type: BOOL
)
{
sprintf(buf,"BVV05C打开时间是:\t %s\n",p);
fputs(buf, fvc);
}
else
{
sprintf(buf,"BVV05C关闭时间是:\t %s\n",p);
fputs(buf, fvc);
}
if(s6c==h6c) //BVV03A
{
}
else
if(GetTagBit("C.BVV06") //Return-Type: BOOL
)
{
sprintf(buf, "BVV06C打开时间是:\t%s\n",p);
fputs(buf, fvc);
}
else
{
sprintf(buf,"BVV06C关闭时间是:\t %s\n",p);
fputs(buf, fvc);
}
if(s7c==h7c) //BVV03A
{
}
else
if(GetTagBit("C.BVV07") //Return-Type: BOOL
)
{
sprintf(buf,"BVV07C打开时间是:\t %s\n",p);
fputs(buf, fvc);
}
else
{
sprintf(buf,"BVV07C关闭时间是:\t %s\n",p);
fputs(buf, fvc);
}
if(s8c==h8c) //BVV03A
{
}
else
if(GetTagBit("C.BVV08") //Return-Type: BOOL
)
{
sprintf(buf, "BVV08C打开时间是:\t%s\n",p);
fputs(buf, fvc);
}
else
{
sprintf(buf,"BVV08C关闭时间是:\t %s\n",p);
fputs(buf, fvc);
}
if(s9c==h9c) //BVV03A
{
}
else
if(GetTagBit("C.BVV09") //Return-Type: BOOL
)
{
sprintf(buf,"BVV09C打开时间是:\t %s\n",p);
fputs(buf, fvc);
}
else
{
sprintf(buf,"BVV09C关闭时间是:\t %s\n",p);
fputs(buf, fvc);
}
if(s11c==h11c) //BVV03A
{
}
else
if(GetTagBit("C.BVV11") //Return-Type: BOOL
)
{
sprintf(buf,"BVV11C打开时间是:\t %s\n",p);
fputs(buf, fvc);
}
else
{
sprintf(buf,"BVV11C关闭时间是:\t %s\n",p);
fputs(buf, fvc);
}
if(s12c==h12c) //BVV03A
{
}
else
if(GetTagBit("C.BVV12") //Return-Type: BOOL
)
{
sprintf(buf, "BVV12C打开时间是:\t%s\n",p);
fputs(buf, fvc);
}
else
{
sprintf(buf,"BVV12C关闭时间是:\t %s\n",p);
fputs(buf, fvc);
}
if(s13c==h13c) //BVV03A
{
}
else
if(GetTagBit("C.BVV13") //Return-Type: BOOL
)
{
sprintf(buf,"BVV13C打开时间是:\t %s\n",p);
fputs(buf, fvc);
}
else
{
sprintf(buf,"BVV13C关闭时间是:\t %s\n",p);
fputs(buf, fvc);
}
if(sm6c==hm6c) //BVV03A
{
}
else
if(GetTagBit("MOT06C_OUT") //Return-Type: BOOL
)
{
sprintf(buf,"MOT06C输送机启动时间是:\t %s\n",p);
fputs(buf, fvc);
}
else
{
sprintf(buf,"MOT06C输送机停止时间是:\t %s\n",p);
fputs(buf, fvc);
}
if(sm14c==hm14c) //BVV03A
{
}
else
if(GetTagBit("MOT14C_OUT") //Return-Type: BOOL
)
{
sprintf(buf,"MOT14C低压进料泵启动时间是:\t %s\n",p);
fputs(buf, fvc);
}
else
{
sprintf(buf,"MOT14C低压进料泵停止时间是:\t %s\n",p);
fputs(buf, fvc);
}
if(sm15c==hm15c) //BVV03A
{
}
else
if(GetTagBit("MOT15C_OUT") //Return-Type: BOOL
)
{
sprintf(buf,"MOT15C高压进料泵启动时间是:\t %s\n",p);
fputs(buf, fvc);
}
else
{
sprintf(buf,"MOT15C高压进料泵停止时间是:\t %s\n",p);
fputs(buf, fvc);
}
if(sm16c==hm16c) //BVV03A
{
}
else
if(GetTagBit("MOT16C_OUT") //Return-Type: BOOL
)
{
sprintf(buf,"MOT16C压榨泵启动时间是:\t %s\n",p);
fputs(buf, fvc);
}
else
{
sprintf(buf,"MOT16C压榨泵停止时间是:\t %s\n",p);
fputs(buf, fvc);
}
h3c = GetTagBit("C.BVV03"); //Return-Type: BOOL
h4c = GetTagBit("C.BVV04"); //Return-Type:BOOL
h5c = GetTagBit("C.BVV05"); //Return-Type: BOOL
h6c = GetTagBit("C.BVV06"); //Return-Type: BOOL
h7c = GetTagBit("C.BVV07"); //Return-Type:BOOL
h8c = GetTagBit("C.BVV08"); //Return-Type: BOOL
h9c = GetTagBit("C.BVV09"); //Return-Type: BOOL
h11c = GetTagBit("C.BVV11"); //Return-Type: BOOL
h12c = GetTagBit("C.BVV12"); //Return-Type:BOOL
h13c = GetTagBit("C.BVV13"); //Return-Type: BOOL
hm6c=GetTagBit("MOT06C_OUT"); //Return-Type: BOOL
hm14c=GetTagBit("MOT14C_OUT"); //Return-Type:BOOL
hm15c=GetTagBit("MOT15C_OUT"); //Return-Type: BOOL
hm16c=GetTagBit("MOT16C_OUT");
fclose(fvc); //关闭文件。
//#############################################################################################
fvd= fopen(pavhd, "a+"); //记事本地址
if(s3d==h3d) //BVV03A
{
}
else
if(GetTagBit("D.BVV03") //Return-Type: BOOL
)
{
sprintf(buf,"BVV03D打开时间是:\t %s\n",p);
fputs(buf, fvd);
}
else
{
sprintf(buf,"BVV03D关闭时间是:\t %s\n",p);
fputs(buf, fvd);
}
if(s4d==h4d) //BVV03A
{
}
else
if(GetTagBit("D.BVV04") //Return-Type: BOOL
)
{
sprintf(buf, "BVV04D打开时间是:\t%s\n",p);
fputs(buf, fvd);
}
else
{
sprintf(buf,"BVV04D关闭时间是:\t %s\n",p);
fputs(buf, fvd);
}
if(s5d==h5d) //BVV03A
{
}
else
if(GetTagBit("D.BVV05") //Return-Type: BOOL
)
{
sprintf(buf,"BVV05D打开时间是:\t %s\n",p);
fputs(buf, fvd);
}
else
{
sprintf(buf,"BVV05D关闭时间是:\t %s\n",p);
fputs(buf, fvd);
}
if(s6d==h6d) //BVV03A
{
}
else
if(GetTagBit("D.BVV06") //Return-Type: BOOL
)
{
sprintf(buf,"BVV06D打开时间是:\t %s\n",p);
fputs(buf, fvd);
}
else
{
sprintf(buf,"BVV06D关闭时间是:\t %s\n",p);
fputs(buf, fvd);
}
if(s7d==h7d) //BVV03A
{
}
else
if(GetTagBit("D.BVV07") //Return-Type: BOOL
)
{
sprintf(buf, "BVV07D打开时间是:\t%s\n",p);
fputs(buf, fvd);
}
else
{
sprintf(buf,"BVV07D关闭时间是:\t %s\n",p);
fputs(buf, fvd);
}
if(s8d==h8d) //BVV03A
{
}
else
if(GetTagBit("D.BVV08") //Return-Type: BOOL
)
{
sprintf(buf,"BVV08D打开时间是:\t %s\n",p);
fputs(buf, fvd);
}
else
{
sprintf(buf,"BVV08D关闭时间是:\t %s\n",p);
fputs(buf, fvd);
}
if(s9d==h9d) //BVV03A
{
}
else
if(GetTagBit("D.BVV09") //Return-Type: BOOL
)
{
sprintf(buf,"BVV09D打开时间是:\t %s\n",p);
fputs(buf, fvd);
}
else
{
sprintf(buf,"BVV09D关闭时间是:\t %s\n",p);
fputs(buf, fvd);
}
if(s11d==h11d) //BVV03A
{
}
else
if(GetTagBit("D.BVV11") //Return-Type: BOOL
)
{
sprintf(buf, "BVV11D打开时间是:\t%s\n",p);
fputs(buf, fvd);
}
else
{
sprintf(buf,"BVV11D关闭时间是:\t %s\n",p);
fputs(buf, fvd);
}
if(s12d==h12d) //BVV03A
{
}
else
if(GetTagBit("D.BVV12") //Return-Type: BOOL
)
{
sprintf(buf,"BVV12D打开时间是:\t %s\n",p);
fputs(buf, fvd);
}
else
{
sprintf(buf,"BVV12D关闭时间是:\t %s\n",p);
fputs(buf, fvd);
}
if(s13d==h13d) //BVV03A
{
}
else
if(GetTagBit("D.BVV13") //Return-Type: BOOL
)
{
sprintf(buf,"BVV13D打开时间是:\t %s\n",p);
fputs(buf, fvd);
}
else
{
sprintf(buf,"BVV13D关闭时间是:\t %s\n",p);
fputs(buf, fvd);
}
if(sm6d==hm6d) //BVV03A
{
}
else
if(GetTagBit("MOT06D_OUT") //Return-Type: BOOL
)
{
sprintf(buf, "MOT06D输送机启动时间是:\t%s\n",p);
fputs(buf, fvd);
}
else
{
sprintf(buf,"MOT06D输送机停止时间是:\t %s\n",p);
fputs(buf, fvd);
}
if(sm14d==hm14d) //BVV03A
{
}
else
if(GetTagBit("MOT14D_OUT") //Return-Type: BOOL
)
{
sprintf(buf,"MOT14D低压进料泵启动时间是:\t %s\n",p);
fputs(buf, fvd);
}
else
{
sprintf(buf,"MOT14D低压进料泵停止时间是:\t %s\n",p);
fputs(buf, fvd);
}
if(sm15d==hm15d) //BVV03A
{
}
else
if(GetTagBit("MOT15D_OUT") //Return-Type: BOOL
)
{
sprintf(buf,"MOT15D高压进料泵启动时间是:\t %s\n",p);
fputs(buf, fvd);
}
else
{
sprintf(buf,"MOT15D高压进料泵停止时间是:\t %s\n",p);
fputs(buf, fvd);
}
if(sm16d==hm16d) //BVV03A
{
}
else
if(GetTagBit("MOT16D_OUT") //Return-Type: BOOL
)
{
sprintf(buf,"MOT16D压榨泵启动时间是:\t %s\n",p);
fputs(buf, fvd);
}
else
{
sprintf(buf,"MOT16D压榨泵停止时间是:\t %s\n",p);
fputs(buf, fvd);
}
//
//C
h3d = GetTagBit("D.BVV03"); //Return-Type: BOOL
h4d = GetTagBit("D.BVV04"); //Return-Type:BOOL
h5d = GetTagBit("D.BVV05"); //Return-Type: BOOL
h6d = GetTagBit("D.BVV06"); //Return-Type: BOOL
h7d = GetTagBit("D.BVV07"); //Return-Type:BOOL
h8d = GetTagBit("D.BVV08"); //Return-Type:BOOL
h9d = GetTagBit("D.BVV09"); //Return-Type: BOOL
h11d = GetTagBit("D.BVV11"); //Return-Type:BOOL
h12d = GetTagBit("D.BVV12"); //Return-Type:BOOL
h13d = GetTagBit("D.BVV13"); //Return-Type: BOOL
hm6d=GetTagBit("MOT06D_OUT"); //Return-Type: BOOL
hm14d=GetTagBit("MOT14D_OUT"); //Return-Type:BOOL
hm15d=GetTagBit("MOT15D_OUT"); //Return-Type: BOOL
hm16d=GetTagBit("MOT16D_OUT"); //D
fclose(fvd); //关闭文件。
//##############################################################################################
fvm= fopen(pavhm, "a+"); //记事本地址
if(s1==h1) //Bfv01
{
}
else
if(GetTagBit("BVV01_OUT") //Return-Type: BOOL
)
{
sprintf(buf,"BFV01打开时间是:\t %s\n",p);
fputs(buf, fvm);
}
else
{
sprintf(buf,"BFV01关闭时间是:\t %s\n",p);
fputs(buf, fvm);
}
if(s2==h2) //Bfv01
{
}
else
if(GetTagBit("BVV02_OUT") //Return-Type: BOOL
)
{
sprintf(buf,"BFV02打开时间是:\t %s\n",p);
fputs(buf, fvm);
}
else
{
sprintf(buf,"BFV02关闭时间是:\t %s\n",p);
fputs(buf, fvm);
}
if(s14==h14) //Bfv01
{
}
else
if(GetTagBit("BVV14_OUT") //Return-Type: BOOL
)
{
sprintf(buf,"BVV14打开时间是:\t %s\n",p);
fputs(buf, fvm);
}
else
{
sprintf(buf,"BVV14关闭时间是:\t %s\n",p);
fputs(buf, fvm);
}
if(s10a==h10a) //Bfv01
{
}
else
if(GetTagBit("A.BVV10") //Return-Type: BOOL
)
{
sprintf(buf,"BVV10A洗布阀打开时间是:\t %s\n",p);
fputs(buf, fvm);
}
else
{
sprintf(buf,"BVV10A洗布阀关闭时间是:\t %s\n",p);
fputs(buf, fvm);
}
if(s10b==h10b) //Bfv01
{
}
else
if(GetTagBit("B.BVV10") //Return-Type: BOOL
)
{
sprintf(buf,"BVV10B洗布阀打开时间是:\t %s\n",p);
fputs(buf, fvm);
}
else
{
sprintf(buf,"BVV10B洗布阀关闭时间是:\t %s\n",p);
fputs(buf, fvm);
}
if(s10c==h10c) //Bfv01
{
}
else
if(GetTagBit("C.BVV10") //Return-Type: BOOL
)
{
sprintf(buf,"BVV10C洗布阀打开时间是:\t %s\n",p);
fputs(buf, fvm);
}
else
{
sprintf(buf,"BVV10C洗布阀关闭时间是:\t %s\n",p);
fputs(buf, fvm);
}
if(s10d==h10d) //Bfv01
{
}
else
if(GetTagBit("D.BVV10") //Return-Type: BOOL
)
{
sprintf(buf,"BVV10D洗布阀打开时间是:\t %s\n",p);
fputs(buf, fvm);
}
else
{
sprintf(buf,"BVV10D洗布阀关闭时间是:\t %s\n",p);
fputs(buf, fvm);
}
if(sm7==hm7) //BVV03A
{
}
else
if(GetTagBit("MOT07_OUT") //Return-Type: BOOL
)
{
sprintf(buf,"MOT07输送机2#启动时间是:\t %s\n",p);
fputs(buf, fvm);
}
else
{
sprintf(buf,"MOT07输送机2#停止时间是:\t %s\n",p);
fputs(buf, fvm);
}
if(sm8==hm8) //BVV03A
{
}
else
if(GetTagBit("MOT08_OUT") //Return-Type: BOOL
)
{
sprintf(buf,"MOT08输送机3#启动时间是:\t %s\n",p);
fputs(buf, fvm);
}
else
{
sprintf(buf,"MOT08输送机3#停止时间是:\t %s\n",p);
fputs(buf, fvm);
}
if(sm10==hm10) //BVV03A
{
}
else
if(GetTagBit("MOT10_OUT") //Return-Type: BOOL
)
{
sprintf(buf,"MOT10潜式搅拌机启动时间是:\t %s\n",p);
fputs(buf, fvm);
}
else
{
sprintf(buf,"MOT10潜式搅拌机停止时间是:\t %s\n",p);
fputs(buf, fvm);
}
if(sm11==hm11) //BVV03A
{
}
else
if(GetTagBit("MOT11_OUT") //Return-Type: BOOL
)
{
sprintf(buf,"MOT11潜水泵启动时间是:\t %s\n",p);
fputs(buf, fvm);
}
else
{
sprintf(buf,"MOT11潜水泵停止时间是:\t %s\n",p);
fputs(buf, fvm);
}
if(sm12==hm12) //BVV03A
{
}
else
if(GetTagBit("MOT12_OUT") //Return-Type: BOOL
)
{
sprintf(buf,"MOT12浓缩池格栅机启动时间是:\t %s\n",p);
fputs(buf, fvm);
}
else
{
sprintf(buf,"MOT12浓缩池格栅机停止时间是:\t %s\n",p);
fputs(buf, fvm);
}
if(sm17==hm17) //BVV03A
{
}
else
if(GetTagBit("MOT17_OUT") //Return-Type: BOOL
)
{
sprintf(buf,"MOT17洗布泵启动时间是:\t %s\n",p);
fputs(buf, fvm);
}
else
{
sprintf(buf,"MOT17洗布泵停止时间是:\t %s\n",p);
fputs(buf, fvm);
}
if(sm18==hm18) //BVV03A
{
}
else
if(GetTagBit("MOT18_OUT") //Return-Type: BOOL
)
{
sprintf(buf,"MOT18洗布泵启动时间是:\t %s\n",p);
fputs(buf, fvm);
}
else
{
sprintf(buf,"MOT18洗布泵停止时间是:\t %s\n",p);
fputs(buf, fvm);
}
h10a = GetTagBit("A.BVV10"); //Return-Type: BOOL
h10b = GetTagBit("B.BVV10"); //Return-Type:BOOL
h10c = GetTagBit("C.BVV10"); //Return-Type:BOOL
h10d = GetTagBit("D.BVV10"); //Return-Type: BOOL
h1 =GetTagBit("BVV01_OUT"); //Return-Type:BOOL
h2 =GetTagBit("BVV02_OUT"); //Return-Type:BOOL
h14 = GetTagBit("BVV14_OUT"); //Return-Type: BOOL
hm7=GetTagBit("MOT07_OUT");
hm8=GetTagBit("MOT08_OUT");
hm10=GetTagBit("MOT10_OUT");
hm11=GetTagBit("MOT11_OUT");
hm12=GetTagBit("MOT12_OUT");
hm17=GetTagBit("MOT17_OUT");
hm18=GetTagBit("MOT18_OUT");
fclose(fvm); //关闭文件。
return 0; //返回到0
}