Engineers Vs. "Joe Maintenance"

I'm a bit drunk atm but to summarize (No offence intended):

USA = Hates ST no matter what, but must have no arc'ing ever but can use use gaffer tape as a safety function.

Rest of the World: Write what you like, but make it very safe.

I never drunk text/email/etc... this is the reason I have not been here the last two weeks ;)

If the end customer wants ST and they are paying... then ST it is
 
I don't believe this to be off-topic....I will just throw it out here and see how it lands. I had an electrician ask me if there is a document available that one could use ladder logic to decipher ST. I built an air flow test rig and I had to use ST, couldn't find a way around it (at the time). I started to create something for him however, haven't been back to it since. Does anyone know if such a document exists, where there would be a LD and ST that are the same project, that I could pass on to this gentleman? Thanks.

If you are using RSLogix, shouldn't it be possible to automate conversion of ST to the string you get when you hit [/] on a rung? e.g. this

Code:
BST XIC B3:0/8 NXB XIC B3:0/15 BND BST XIO B3:0/8 NXB XIO B3:0/0 BND OTE B3:0/15

maybe not trivial, but doable? BST/NXB/NXB/NXB/.../BND approximates OR; adjacent items approximate AND.


Sidebar: is it possible to dump those strings other than copy-paste, one at a time?
 
Sidebar: is it possible to dump those strings other than copy-paste, one at a time?

I don't have Rockwell with me, but there is a setting somewhere to switch the format slightly... Maybe under options?
Default is like "xic variable ote variable_1". There's another format that is "xic(variable)ote (variable_1);"
Once it is switched, you can paste multiple rungs, separated by semicolons.
The BST/NXB/BND syntax changes too. Just copy a few rungs to work out the syntax.
 
I challenge you to prove what can't be done in ladder (CLX/CpLX platform).

Yeah, I've yet to be tasked with something I couldn't program in ladder. I do loops all the time with JMP & LBL instructions. Looks pretty clean to me. :confused:
 
Better depends on context

I challenge you to prove what can't be done in ladder (CLX/CpLX platform).

I'm not sure there is any point to that.

As an exercise I implemented a Gaussian-distributed random number generator (RNG) in ladder, which included polynomial approximations for sine, cosine and natural logarithm accurate to six significant decimal digits or better, and which random numbers pass the Anderson-Darling normality test.

I challenge you to prove that has any practical value other than to see if it can be done, compared to loading an array of externally-generated random numbers and writing a trivial program to loop through them, or writing the same algorithms, but simpler, and far more easily understood, in ST. If you look through this or other PLC fora for requests for an RNG, the most common response is "Why would you want one?" I'm not saying there is never going to be an application (e.g. the Simon game, or a whack-a-mole game), but I doubt there will be a need for something that robust, and if there was it would be much easier to do it in ST. Does that make ST better? Of course not.

The question isn't whether "can X be done in ladder;" it's "what language is best to do X in context Y," where the context could include customer directives or preferences, who is going to look at and/or support the code, etc.

I think the answer is that context is King and drives the answer sometimes to ladder, sometimes to ST, and sometimes to summat else.
 
I'm not sure there is any point to that.

As an exercise I implemented a Gaussian-distributed random number generator (RNG) in ladder, which included polynomial approximations for sine, cosine and natural logarithm accurate to six significant decimal digits or better, and which random numbers pass the Anderson-Darling normality test.

I challenge you to prove that has any practical value other than to see if it can be done, compared to loading an array of externally-generated random numbers and writing a trivial program to loop through them, or writing the same algorithms, but simpler, and far more easily understood, in ST. If you look through this or other PLC fora for requests for an RNG, the most common response is "Why would you want one?" I'm not saying there is never going to be an application (e.g. the Simon game, or a whack-a-mole game), but I doubt there will be a need for something that robust, and if there was it would be much easier to do it in ST. Does that make ST better? Of course not.

The question isn't whether "can X be done in ladder;" it's "what language is best to do X in context Y," where the context could include customer directives or preferences, who is going to look at and/or support the code, etc.

I think the answer is that context is King and drives the answer sometimes to ladder, sometimes to ST, and sometimes to summat else.

Ok, rephrase... with relevance to motion and machine control, which was what I responded to. Could care less about doing things just to do things. I have better things to do with my time.
 
Maybe for your customer base, but the majority of ours insist on ladder because that's all they understand (Granted they are.... well, special).

I challenge you to prove what can't be done in ladder (CLX/CpLX platform).
Can't is a big word.
It isn't that it can't be done, it is just that no one is going to be foolish enough to try.

Calculations are easier to do in ST.
Debugging is easier too but not because of the ST but because of the IDE.
ST in a state machine is deterministic.
ST in a state machine is more efficient.

Our company makes the Rockwell HYD02 and M02AS for Rockwell. Sometimes out motion controller is competing against the ones we make for Rockwell. One thing the Rockwell guys always bring up is that you don't need to learn anything but ladder because the Rockwell motion cards are programmed using motion blocks in ladder. However, this issue come up only rarely. If the project requires lots of computations then ST wins hands down most of the time. If it does't then the integrator soon regrets his decision.
 
ST in a state machine is deterministic.
ST in a state machine is more efficient.


Perhaps you could explain this in some detail?


In my experience the use of ST vs ladder is purely based on preference. I know quite a few PLC guys who couldn't write a single line in ST without referencing a help file of some kind. That doesn't make them bad PLC programmers either, as I have seen them do some neat projects. I have seen guys that can write high level code in their sleep, and then completely fail on a project.

Obviously the types of projects really dictate what should/could be used. Most, if not all, of what we do can be done solely in ladder and our customers wouldn't want anything but ladder. Heck, they barf when they see a function block.
 
Perhaps you could explain this in some detail?
St in a state machine is more deterministic because only the code in the current state gets executed. It is easier to compute the execution time for just one state than an whole ladder. Have you ever seen a ladder program with an execution time listed?


Executing only the code in states keeps the CPU from executing code that is not important in the current state.



The user program must be deterministic in motion control and it can't take so long that it interferes with the motion control itself.


Another huge difference is the efficiency of the generated code.


In my experience the use of ST vs ladder is purely based on preference. I know quite a few PLC guys who couldn't write a single line in ST without referencing a help file of some kind.
No doubt.



That doesn't make them bad PLC programmers either, as I have seen them do some neat projects. I have seen guys that can write high level code in their sleep, and then completely fail on a project.
I view LD and ST as tools. You use the right tool for the job. There is a difference between writing code and being a real programmer.





Obviously the types of projects really dictate what should/could be used.
Yes, but if the job requires ST then what?



Most, if not all, of what we do can be done solely in ladder and our customers wouldn't want anything but ladder. Heck, they barf when they see a function block.
Yes, but our world is strictly motion control. Code must be executed in a deterministic way. I have plenty of videos where ladder would not work.
 
St in a state machine is more deterministic ...

Thanks for the info. I guess our definition of state machine differs wildly. I do my sequences/state machines in ladder and they are deterministic in that there is only one valid transition based on the input(s).

Definitely agree to use the right tool for the job. I once worked with a guy that only carried channel locks. You always knew where he had been by looking at rounded off/marked up bolt heads.
 
Thanks for the info. I guess our definition of state machine differs wildly.
?????



I do my sequences/state machines in ladder and they are deterministic in that there is only one valid transition based on the input(s).
Ladder is not deterministic. There is no way you can say that even an interrupt will execute every 10 milliseconds because interrupts are off during the house keeping part of the scan. This avoids read modify write problems but the result is that the interrupt will execute every 10 milliseconds + or - a bit.


There is no way that ladder running in the main scan is deterministic.
 
?????




Ladder is not deterministic. There is no way you can say that even an interrupt will execute every 10 milliseconds because interrupts are off during the house keeping part of the scan. This avoids read modify write problems but the result is that the interrupt will execute every 10 milliseconds + or - a bit.


There is no way that ladder running in the main scan is deterministic.

You missed my point Peter, but it's ok. Thanks again for the reply.
 
Ladder is not deterministic. There is no way you can say that even an interrupt will execute every 10 milliseconds because interrupts are off during the house keeping part of the scan. This avoids read modify write problems but the result is that the interrupt will execute every 10 milliseconds + or - a bit.

There is no way that ladder running in the main scan is deterministic.


Admittedly I'm jumping into this halfway through, so it's possible I missed a key detail somewhere above, but:

How is this different for the ST code than the LD code? All code has to get executed from somewhere. Can you blame the programming language for the precision of the system event/task that triggers it?

It feels almost like you're conflating "ST" with "I wrote my own operating system so I can do whatever I want", except that wouldn't make any sense, because you wouldn't use ST for FW, you'd use C or something along those lines.
 

Similar Topics

In my car I have 2 cigarette lighter outlets. Dashboard outlet has a 25A fuse in the engine compartment. Cargo area outlet has a 30A fuse next to...
Replies
22
Views
4,785
A recent thread asked how people describe what they do and that is always a difficult thing to explain to people that have little or no...
Replies
0
Views
940
Hi all, i tried to created a button which is visible only when the user "Engineer" is logged. First, i created a macro with the following...
Replies
4
Views
2,486
Best wishes to all of my fellow engineers! :lolis:
Replies
1
Views
1,230
Hi I am second year mechanical engineering student interested in PLC programming as a career choice. Looking at job advertisements it looks like...
Replies
22
Views
6,098
Back
Top Bottom