Advanced level programming examples

I'd start with proper error handling. For instance, it's one thing to code a simple state machine, but it's another thing to figure out every single way anything important can go wrong during a sequence or a step and implement the correct action, be it a simple alarm to an HMI or a more complicated auto-diagnosis or catch and retry system.
I/we were doing this back in the early 80s. Any state that waited for an external input to trigger to the next state had a time out. A timer was started for that state and if it time out occurred a message was displayed on a screen that indicated the current state and the input or external condition that the state machine was waiting for. Time outs would normally be quite short. Sometimes a time out message would occur because the condition it was waiting for took a little too long. This allowed the operators to fix problems that were slowing down production not just halting it.
 
Just checked that out, is that just to work out a maths equation in ladder? When would this sort of equation be used in a plc related project?




Yes, and certainly ladder is less than ideal for that puzzle, but coding it might be useful practice and involve making and comparing choices how to design it (e.g. how to loop over the 300k+ possible permutations).


And although we would not expect that puzzle to show up in a real project, certainly things like coding a PID when no PID instruction is available can occur.


Also, I helped my brother finding the pressure to send to a hydraulic cylinder supporting a frame that held up a winding roll. The tension on the web winding onto the roll needed to follow a particular profile vs. length of material on the roll. The frame was pivoting so the hydraulic pressure needed to account for the contribution of the time- (length-) dependent weight of the roll to the web tension:

  • from material increasing on the roll, as well as
  • from the changing angles/geometry of the frame and hydraulic strut as the diameter of the material increased between the roll axis and a fixed nip roll.
So yes, sometimes formulae more involved than A plus B, or A times B, need to be coded. It's not hard, but doing it correctly, cleanly and then documenting it does take some effort, so someone (e.g. you) can understand it several months down the line.
 
Hi all

I am just new to this and relatively new to plc programming, I have been self teaching myself for just over a year now and have done numerous small projects in my work which is a food factory. Some of the projects included HMIs where operators can choose the speed they want their conveyors to run at and another was a tank with submersible pumps which is displayed on an hmi with on and off setpoints which are changeable. I have found doing these small projects to be quite simple and I would just like some feedback from someone who is vastly experienced in programming plcs as to what they would consider an ‘advanced’ or complicated program to accomplish, just so I can possibly practice and take my skills further.

What is your preferred platform? Manufacturer/Series/Version
 
Yes, and certainly ladder is less than ideal for that puzzle, but coding it might be useful practice and involve making and comparing choices how to design it (e.g. how to loop over the 300k+ possible permutations).


And although we would not expect that puzzle to show up in a real project, certainly things like coding a PID when no PID instruction is available can occur.


Also, I helped my brother finding the pressure to send to a hydraulic cylinder supporting a frame that held up a winding roll. The tension on the web winding onto the roll needed to follow a particular profile vs. length of material on the roll. The frame was pivoting so the hydraulic pressure needed to account for the contribution of the time- (length-) dependent weight of the roll to the web tension:

  • from material increasing on the roll, as well as
  • from the changing angles/geometry of the frame and hydraulic strut as the diameter of the material increased between the roll axis and a fixed nip roll.
So yes, sometimes formulae more involved than A plus B, or A times B, need to be coded. It's not hard, but doing it correctly, cleanly and then documenting it does take some effort, so someone (e.g. you) can understand it several months down the line.

Great, I will give certainly give this a try as it seems quite intriguing 😂that sounds like a very interesting project, did you do the calculations and then your calculation controlled how much pressure the cylinder required via analog output?
 

Similar Topics

This video shows the things I think about on page 1. I use Laplace transforms a lot. Laplace transforms allow one to express differential...
Replies
2
Views
1,808
Oh No! Not that again! I will start out sort of simple ( evil thoughts ) Suppose I have a tank that is 4 meters tall with a constant surface area...
Replies
15
Views
7,419
The purpose of this thread is to use a simple system to show how one can approach systems that are much more complicated. Everyone knows...
Replies
22
Views
12,280
Is anyone interested in covering this topic at a college level? Tank level control is a simple application but I can go where most have not gone...
Replies
26
Views
6,543
Hi folks, I'm not as accustom with Siemens & WinCC, however I've been asked to increase the amount of data an existing application is logging...
Replies
2
Views
67
Back
Top Bottom