![]() |
||
|
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
| ||
New Here? Please read this important info!!!
|
|
#1 |
|
Member
![]() Join Date: Oct 2005
Location: Damanjodi
Posts: 149
|
Hello Everyone,
I am facing a peculiar problem with intouch...The problem is PLC Fault alarm comes and communication losts between intouch and S7-400 PLC....Only thing we do is just close the intouch application and open it...I found that plc_alarm is the item which is causing the alarm...I am completely new to intouch and I have basic programming concepts.. In the application script i found the following code: sample_time_count =sample_time_count - 1; time_count = time_count + 1; IF time_count > 25 THEN PLC_alarm = 1; ELSE PLC_alarm = 0; ENDIF; imp_min = DB_BR_GrL1_imp_min_br; IF $AccessLevel < 9999 THEN EnableDisableKeys(1,1,1) ; ELSE EnableDisableKeys(0,0,0); ENDIF; I want the significance of "time_count > 25"? what is 25? Thanks in advance. |
|
|
|
#2 |
|
Member
![]() Join Date: Mar 2006
Location: Kansas
Posts: 1,669
|
It's a handshake system.
If you look in the PLC, you will find something that is setting the value of time_count back to 0. This method is used to detect when the PLC is not responding anymore... If InTouch keeps incrementing the counter but the PLC never clears the counter, then there is a problem with the comm link between the PLC and WonderWare. The 25 is just some amount of time. If you'll look at the top of that application script, you'll see that it's a while_true condition. Then it will show how often to run the script while the condition is true. If it shows 1000, then it's executing every 1000 milliseconds. If the script executes 25 consecutive times without being reset, you have a problem. plc_alarm is not causing the problem, but rather indicating that you have a problem. Now you need to determine why you're not able to communicate between PLC and WonderWare any more. How are you attempting to communicate with WonderWare? |
|
|
|
#3 |
|
Member
![]() Join Date: Oct 2005
Location: Damanjodi
Posts: 149
|
Hi OZEE,
I am communicating to PLC with simatic OPC net server..I dont know how to use OPC Scout to test this particular problem. Also can you explain me how then after restarting the application (i mean intouch) the problem gets rectified? |
|
|
|
#4 | |
|
Lifetime Supporting Member
![]() Join Date: Dec 2003
Location: Cairo
Posts: 257
|
Greetings drspanda,
You may for an "OPC item" in your OPC server that represents the communication status. These items should be built in your OPC server. I don't know about "simatic OPC net server", But I'm generally speaking. Quote:
__________________
Ayman Metwally |
|
|
|
|
#5 | |
|
Member
![]() Join Date: Mar 2006
Location: Kansas
Posts: 1,669
|
Actually, it's being rectified because the comm is up again.
If your WonderWare app has the menu bar enabled, you can go to Special > Reinitialize IO > Reinitialize all and it will probably reconnect. I'm not familiar with that OPC server, but most of them quit trying after they get mad. You can also put a pushbutton on one of the screens with the following command: Code:
IOReinitialize(); Quote:
However, the thing to realize is that this is a bandage. You really need to figure out why the comm link is dropping. It could be as simple as a bad connection. Or as difficult to identify as RF interference. Check your cable routings -- are they close and parallel to any drive or softstart wires? Again, I'm not at all familiar with that OPC server so I can't give you any specific guidance on it. WonderWare - I know! That's been my specialty for over 10 years. Comm problems - if it has ever worked correctly - can almost always be traced back to either a bad connection someplace or electrical interferene. |
|
|
|
|
#6 |
|
Member
![]() Join Date: Oct 2005
Location: Damanjodi
Posts: 149
|
Hi Ozee,
I had increased the count to 25->35...I will put the bandage (button) after observing the system for 1 or 2 days... Also I did not find any symbol in the PLC "time_count"? I have checked this in symbol table as well as goto->location menu after selecting any symbol in LAD editor. I suppose when the operator changes windows in intouch i mean drum level window to conveyour window...the opc server need to give data values to for the new window in this particular time (25 units) if the server cannot give this may initiate plc_alarm....Am I correct? regards, rajasekhar. |
|
|
|
#7 | ||||
|
Member
![]() Join Date: Mar 2006
Location: Kansas
Posts: 1,669
|
Quote:
Just putting the button in is not going to fix the problem. It will merely give you an easier way to restart. You really need to fix the problem by finding what is causing the comm to drop out! Quote:
Quote:
Quote:
OZEE |
||||
|
|
|
#8 |
|
Member
![]() Join Date: Oct 2005
Location: Damanjodi
Posts: 149
|
Hi Ozee,
I cannot say it worked out (changing from 25->35) because the problem comes approximately once in 14 days or sometimes within 2 to 3 days...I mean we cannot tell when the problem comes exactly...I need to wait to.. I shall send the WW application to you but its size is large...it has many files with different extensions as far as i remember it has a folder called CSV containing .csv files and their size is large..So how do I send them?? I mean give me hint that what files are needed by you so that I can send them....Also where to send I mean in this site or to your email address. Thanks for the support. |
|
|
|
#9 | |
|
Member
![]() Join Date: Oct 2005
Location: Damanjodi
Posts: 149
|
Quote:
|
|
|
|
|
#10 |
|
Member
![]() Join Date: Oct 2005
Location: Damanjodi
Posts: 149
|
Hi Ozee,
Today I observed there is a boolean bit "life_check" which is "ON" for 10sec and "OFF" for 10sec as long as PLC is working well...and this bit is used to bring back "time_count=0"....here I am getting a doubt...if this life_check bit is OFF and during this 10 seconds time_count is becomming greater than 25 because the application script runs during that period also...Am I correct?? Also i made life_check bit zero in the plc (for test purpose only) and observed PLC Alarm has come approximately after 10 sec...Surprisingly when I made the life_check bit again normal...PLC Alarm got reset...What I mean to inform is It was not necessary to re-initialize the intouch.. I am attaching the screen shots from intouch.. Come with your ideas?? |
|
|
|
#11 |
|
Lifetime Supporting Member
|
What changes the state of life_check bit?
I have seen "heartbeat" systems set up in which a PLC resets a bit and another device sets the same bit via a communication channel. Each time the bit changes states, a timer is reset. If the timer expires, a fault is issued called something like "Communication Failure" or "Heartbeat Timeout". So, find out what sets AND what resets the life_check bit. Chances are that two different processes (the PLC program and the wonderware app) are writing to it, and they are both watching it with timers to generate a fault should either fail. |
|
|
|
#12 | |
|
Member
![]() Join Date: Oct 2005
Location: Damanjodi
Posts: 149
|
Quote:
|
|
|
|
|
#13 |
|
Member
![]() Join Date: Apr 2005
Location: SoCal
Posts: 319
|
How fast is the application script updating? I couldn't really tell from your screenshot.
Have you checked the logger to see if there's any communication errors? |
|
|
|
#14 | |
|
Member
![]() Join Date: Oct 2005
Location: Damanjodi
Posts: 149
|
Quote:
|
|
|
|
|
#15 |
|
Lifetime Supporting Member
|
So, the PLC toggles the state of life_check all by itself. The wonderware application monitors that bit and, when 0, clears the value of time_count. Once every 2-14 days you get a communication fault that causes the time_count routine in ww to reach its limit and generate a fault.
IMHO, You have an actual comunication problem and an oddly designed heartbeat logic. What would happen if communication failed with the life_check bit in the ON state? I know nothing about ww, but it looks like you would not get a fault in that situation. When life_check is off, time_count is allowed to increment. When it is on, time_count is brought back to zero by the data change script. |
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Topics
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Wonderware InTouch - Auto select application | blue39 | LIVE PLC Questions And Answers | 4 | October 31st, 2009 01:17 PM |
| Intouch losing application focus | ControlLogix | LIVE PLC Questions And Answers | 7 | November 9th, 2006 04:22 AM |
| how to establish communication between InTouch SCADA application and RSEmulator500 | gorillaz_sg | LIVE PLC Questions And Answers | 4 | July 20th, 2006 07:38 PM |
| InTouch Application Script Query | jaichains | LIVE PLC Questions And Answers | 7 | July 19th, 2006 07:37 AM |
| Wonderware Script Issue | ControlLogix | LIVE PLC Questions And Answers | 2 | October 24th, 2005 11:56 AM |