12/10/2019 9:25 AM | |
Joined: 5/14/2019 Last visit: 1/31/2024 Posts: 2 Rating:
|
Hi Salma, I have a project "Upgrade PLC from Quantum to Modicon" but when I connected to presently WinCC v7.0 sp2 Pop-ups are too long to appear. I check and think the problem is in C-code below: pragma option(mbcs) void SetMotor_P() { double db1, mM_NUM; mM_NUM=GetTagSWord("M_NUM"); if(mM_NUM==1) db1=GetTagWordWait("MAG101_ST"); //Return-Type: WORD SetTagDoubleWait("MotorST_P",db1); //SetTagSWord("MOTOR_ST_GROUPP0",1); if(mM_NUM==2) db1=GetTagWordWait("SCN104A_ST"); //Return-Type: WORD SetTagDoubleWait("MotorST_P",db1); // SetTagSWord("MOTOR_ST_GROUPP0",2); if(mM_NUM==3) db1=GetTagWordWait("ASP105_ST"); //Return-Type: WORD SetTagDoubleWait("MotorST_P",db1); // SetTagWord("MOTOR_ST_GROUPP0",4); if(mM_NUM==4) db1=GetTagWordWait("RV107_ST"); //Return-Type: WORD SetTagDoubleWait("MotorST_P",db1); //SetTagWord("MOTOR_ST_GROUPP0",8); if(mM_NUM==5) db1=GetTagWordWait("BF109A_ST"); //Return-Type: WORD SetTagDoubleWait("MotorST_P",db1); //SetTagWord("MOTOR_ST_GROUPP0",16); if(mM_NUM==6) db1=GetTagWordWait("LEG110_ST"); //Return-Type: WORD SetTagDoubleWait("MotorST_P",db1); } After checking, I changed it to ( I only put a code SetTagDoubleWait("MotorST_P",db1) at the bottom of the function) pragma option(mbcs) void SetMotor_P() { double db1, mM_NUM; mM_NUM=GetTagSWord("M_NUM"); if(mM_NUM==1) db1=GetTagWordWait("MAG101_ST"); //Return-Type: WORD //SetTagSWord("MOTOR_ST_GROUPP0",1); if(mM_NUM==2) db1=GetTagWordWait("SCN104A_ST"); //Return-Type: WORD // SetTagSWord("MOTOR_ST_GROUPP0",2); if(mM_NUM==3) db1=GetTagWordWait("ASP105_ST"); //Return-Type: WORD // SetTagWord("MOTOR_ST_GROUPP0",4); if(mM_NUM==4) db1=GetTagWordWait("RV107_ST"); //Return-Type: WORD //SetTagWord("MOTOR_ST_GROUPP0",8); if(mM_NUM==5) db1=GetTagWordWait("BF109A_ST"); //Return-Type: WORD //SetTagWord("MOTOR_ST_GROUPP0",16); if(mM_NUM==6) db1=GetTagWordWait("LEG110_ST"); //Return-Type: WORD SetTagDouble("MotorST_P",db1); } After changing, Pop-up has now appeared faster. I am not sure that my changing effect on my logic or not? And what happens if I use GetTagXXX instead of GetTagXXXWait? So when should I use GetTagXXX and GetTagXXXWait? So sorry for my English, I hope that you understand my problem. Thank for your attention. ------------------------------------------------------------------------------------------ |
Last edited by: Min1302 at: 12/10/2019 09:30:23Last edited by: Jen_Moderator at: 12/11/2019 08:43:34New subject after splitting |
|
Follow us on