May not be be politically correct

Mark Buskell

Member
Join Date
Sep 2003
Location
Florida
Posts
892
I have a message block writes from a PLC5/30 to a 504.
1 of the message bits is for turning on some valves and the other for stopping a pump. Every once in a while, may be hours or days, the pump stop bit will fail to turn off the pump. The bits get sent over at the same time. There are other bits involved (starting pumps) but no problem with them. The valves always change like they should so you would think the pump would stop since it is getting set at the same time.

There are other bits controlling other valves in my message block also but never any problems with them either.

What I do in my logic is set a latch for my pump stop and only unlatch it when I get a pump not running bit back from the 504 (Message write from the 504 to the 5).

I have checked everything that I could to find the problem (Message Faults, overwriting of data, indirect addressing problems, etc.)
If the pump does fail to stop, there is a button there that the operator will push to manually stop the pump.

Well I came up with what I call my ***** slap logic (BSL).
I start a timer with my latch and if I don't get a pump stop signal back from the 504 within 5 seconds I send over another bit to stop the pump. So far it seems to be working. I also have a counter to check how many times my BSL logic has been triggered. Since I have put in my BSL the pump has yet failed to stop, maybe she knows I am now watching.

It's one of those things that should always work and I will eventually find the problem but for now is a mystery.
 
Mark,

You could follow the normal routine that Ladder follows...

If there is no reason to keep a condition ON then turn it OFF.

This means, at the "5", keep the "Run Remote" signal ON until it is time to go OFF.

The comm-link update will write a "1" to the "504-bit". As long as the "504-bit" is "1" run the Remote Output".

"Run Remote"
(From the "5")
-----| |--------------------( ) "Run Output" (at the "504")


The "504-bit" will STAY at "1" until a "0" is written to it.

This means, for every update, the "5" has to continuously "assert" that it wants the Remote to Run for as long as it wants the remote to run.

When the "assertion" is removed, at the "5", then the next comm-link update sends a "0" to the "504-bit". That will turn OFF the "Remote Output".
 
Update

Thanks Terry,

I originally set out to do it as you described and that way would have worked great however I did not write the 504 logic. The way it works is somewhat confusing, they use a lot of one-shot logic to turn things on and off with the same buttons from a Panelview. Actually they also use a lot of latches and jumps routines.

The machine has a couple hundred pulse valves. Pulse once to turn it on, pulse again to turn it off. I imagine whoever originally wrote the software also allied this concept to the Panelview pushbuttons.

The software that I wrote is for automatically controlling valves and pumps turning on and off so the operator does not have to push a bunch of buttons. The computer now does everything for him but he still needs to be able to put the system back in manual sometimes or if there is a problem maybe touch the button and turn the pump off.

The operator still needs sometimes to be able to turn the pumps or valves on of off even if I am in automatic. If I latched the pump on, then he would first have to go to manual mode and then press the Pump start/stop pushbutton.

The code that was originally written is what I call spaghetti code and is a nightmare to debug. It is filled with tons of jump routines depending on the current mode. I and others believe that the original company wrote this logic so complicated that we would have to call them if there was a problem. At one time they had a bunch of math logic (MUL, DIV, MASKS, more DIV's, MASKS and MUL's) put in there that was not even used. It looked like it was being used but upon detailed analysis it was not. I am in the U.S., they are in Germany. Don't even get me started about some of the rung comments and descriptors still being in German.

Over the years, I have tried to simplify the code when some type of modification need to be done. The other problem is that there are maybe a dozen of these machines used throughout the country and each one is similar but needs to be customized depending on its application.

I do wish however instead of using my new BSL logic on the code, I could have used it on the originally programmer.
 

Similar Topics

Was having trouble w/ a schneider drive intermittently giving me a motor run on. It would hang up on start. It was driving me batty. Increasing...
Replies
2
Views
1,477
Good Morning , This is what I get when I started a project 5 months ago , and then get back to it , with a new 1769-L33ER, into my existing ME...
Replies
2
Views
1,902
OT to the military vets out there that may not be aware of this but thought I would share. If this is an inappropriate post please delete. I...
Replies
0
Views
1,307
InTouch : "your system may be running low on memory" and "WWHEAP" errors Hi, I'm trying to run a managed application on a Windows 10...
Replies
6
Views
11,564
Not really Q&A, but I wanted to show off some of my old college projects you may like Here is a 4 axis, chain driven robot built with...
Replies
2
Views
1,843
Back
Top Bottom