Best way to troubleshoot a maze of set and rst

kalabdel

Member
Join Date
Feb 2015
Location
Ontario
Posts
1,108
I have an old melsec fx1n and fx0n with ladder program that consists entirely of set and rst of everything imaginable.
Some of the coils were set multiple times at different rungs.

Ultimately the cpu will be replace but until such time I need to work out a systematic method to decipher the programs.

Any ideas?

Thanks
Kal
 
Sometimes the best use of your time is to become very intimate with the machinery and write a new program from scratch.

+1

If the original programmer did not take the time to do this, then making a flow chart of what the machine NEEDS to do may be far simpler than diagramming all of the things the PROGRAM does.
 
Set/Rst is absolutely valid programming technique, and I don't understand what is the issue.
Neither do I understand, why the program should be rewritten from scratch, if the machine operates normally.
I would rather spend time on proper device naming and commenting of the program, if these are missing.
 
I would guess that the Set/Rst is a method of creating a sequencer/grafcet. It's a very valid and systematic approach to stepping through a sequence and I've used the technique myself for many years. Some like to move a step # into a word...I've always liked the set/Rst of bits of a word better. Take some time to see what the set/rsts are doing and you may find the program in better shape than you thought.
 
+1

If the original programmer did not take the time to do this, then making a flow chart of what the machine NEEDS to do may be far simpler than diagramming all of the things the PROGRAM does.
Set and reset is absolutely valid programming technique.

IF IT'S USED CORRECTLY, which also means, IMO, very rarely.

More often than not, it's not. If someone write a sequence with latch and unlatch I can almost bet it's not done right, leading to confused state machine.

Sometime, the program can be rescued, sometime, not. I'm in the middle of trying to decipher such a lazy program that's full of unexpected ambushes and is beyond rescue. I'm going to take it behind the shed and shoot it.
 
I spent all of yesterday writing a new program (for Siemens replacement) and got about 60 percent of it done but it will not be installed and tested possibly for months till the HMIs arrive.
The machine is very simple and the program should/could be but I just don't get it. There's questionable coding and some rungs have no purpose whatsoever.

I was able to figure out a couple of different modifications to fix the problem and will test both versions tomorrow.

I believe the problem we're having on two machines that came for refurbishing have to do with cycle time and the high speed counter (which is not really high at all on those units).
The time between resetting the counter and starting the conveyor could be the reason the conveyor starts out of synch.

I'm trying to capture it on a simulator and haven't been successful yet.

Thanks for all replies
Kal
 
Set/Rst is absolutely valid programming technique, and I don't understand what is the issue.
Neither do I understand, why the program should be rewritten from scratch, if the machine operates normally.
I would rather spend time on proper device naming and commenting of the program, if these are missing.


I spent two days believing that the machine which had been working for years must have a proper working program and was looking for everything other than the an program until I looked at another machine with the same program and realized they both have the same issue and that's when I started looking at the program. My conclusion is that they couldn't have ever worked properly. They can be set close enough to half decent results but no where near the kind of precision they're capable of.

Thanks Sergei

Kal
 

Similar Topics

Compactlogix controller, program has 28 conveyors that use TON's to start the conveyors. The TT sounds a warning horn during start and the DN...
Replies
10
Views
485
I have S7 1512C controler for controlling 48 PID temperature loop, the output is PWM. Please I need the best, most efficient way to write the...
Replies
13
Views
603
I am going to need to use HART multi-drop in order to handle a series of Vega Radar units. There are a lot of options and I'm wondering what...
Replies
3
Views
253
Out of interest, I'd like some thoughts on what would be considered best practice with regards to a 2-position turntable control scheme (see...
Replies
17
Views
1,136
Hello colleagues Anybody knows, what could be the best or a better option to bring with you when you are in service at factory to connect via...
Replies
1
Views
261
Back
Top Bottom