unsigned int check1,check2,check3; //初始化4个无符号整型变量
short a;
a=PSW[30]+PSW[31]+PSW[32]+PSW[33]+PSW[34]+PSW[35];
if (1 == GetPSBStatus(1005)) //C函数自动产生随机种子数,srand()函数
{
srand(a);
check1=rand()&0x7FFF; //产生0~36767随机验证码
check2=rand()&0x7FFF;
SetPSB(1000);
ResetPSB(1005);
}
Write(HMI_LOCAL_MCH, 0, TYPE_PFW, 4000, 0, TYPE_DWORD, check1);
//验证码1
Write(HMI_LOCAL_MCH, 0, TYPE_PFW, 4002, 0, TYPE_DWORD, check2);
//验证码2
//Write(HMI_LOCAL_MCH, 0, TYPE_PFW, 4004, 0, TYPE_DWORD, 121234);
//密码1
//Write(HMI_LOCAL_MCH, 0, TYPE_PFW, 4006, 0, TYPE_DWORD, 234567);
//Write(HMI_LOCAL_MCH, 0, TYPE_PFW, 4004, 0, TYPE_DWORD, check1+check2+74347);
//密码1
Write(HMI_LOCAL_MCH, 0, TYPE_PFW, 4004, 0, TYPE_DWORD, check1*2+check2+8);
//密码1
Write(HMI_LOCAL_MCH, 0, TYPE_PFW, 4006, 0, TYPE_DWORD, check1+check2*2+5);
//密码2
以上是是从信捷TG系列触摸屏复制过来,粘贴到TS系列的编程软件就会报错,不懂C语言实在搞不懂,有没有大神有TS的案例,工程文件是TG系列的分期案例