ganutenator
Lifetime Supporting Member
will have to check this out
Curious, how often is it a programming issue versus something else?
Generally speaking, my experience when I have gotten calls from "bubba", it's usually because "bubba" goes online with a PLC and uses this as his primary troubleshooting tool and quickly abandons everything else (including looking at the alarm information on the HMI!). They can't follow something in the PLC so they pass the buck and call to me. I arrive and and perform the basic troubleshooting "bubba" should have done in the first place and point out the mechanical or electrical component failure that is often the cause.
MrDnesco, you are pointing out is a failure in the programming and implementation of ST. Ladder is horrible for motion control. Structured text is much better than ladder when dealing with velocities, position, pressures etc. As for debugging, our motion controller uses a combination of a state machine and ST. The state machine forces the user to organize their program in steps that do something then wait will some event occurs before going to the next step. This makes debugging simpler because one always knows what step the problem is in. On top of that we log when variables were changed and when the task went from one step to another. This provides a trace almost like an in-circuit emulator. Now what ladder language has that? None that I know of. Anything complex I can debug faster with our controller than in a PLC. Another feature is that we can have up to 16 traces or pens in our graphs or trends. This allows use to plot variables graphically so we and see how they change together. If there is a problem you can find the time and then go into the event log at the same time to see what happened. Yes, Rockwell has trends but can the update 16 pens at 250 microsecond intervals? If not fast input changes can come and go and not be detected.
Finally, there are thing bugs or faults that show up rarely. Some faults may take days to appear. What do you do with a PLC? With our controller we can setup a trigger on the fault and it will stop the gather of data after at a point selectable by the user so he can see what led up to the fault and would happened after the fault. This is like a data analyzer.
I know of no PLC that has these functions.
It isn't the language. Its how it is implemented. Having trained programmers helps too.
Building enough diagnostics in the HMI system to be able to find all possible problems and display on the HMI to the point that program access with a laptop is not needed for troubleshooting would increase the project cost by 150% and no one is going to pay that. They will go to the competition.
I know of no PLC that has these functions.
This thread boils down to: Use the appropriate tools for the task.
That being said, there's this one moment I won't forget soon.
We had our very first RSLogix production machines installed. So training was needed. Someone found local engineering firm that does Rockwell stuff and is certified trainer. They sent over one of their more experienced programmers to give us some training. Training went rather swift, you could tell the guy knew the platform.
Then he opened a ST routine. He stared at it, then closed it again. Then said: I have no idea what this routine does. We don't use ST.
And the training resumed.
Holy **** dude, dial that arrogance down a few notches.
This is an implementation problem. Ladder must load and store data for every block. A ST line of code can be the equivalent of many ladder blocks and not have the need to store intermediate values.We almost exclusively use ControlLogix at work. Structured text is nice for program structuring at times, but for lots of data transfer and manipulation, it is sometimes 3x as slow as equivalent ladder logic. When I write a piece of logic, I will always check to see which language will execute it faster, especially when that logic runs often. Just something to watch out for.
_Axis[].IntGain := 10.0 * Lambda **4.0 * InvGainAlphaMu;
_Axis[].PropGain := 40.0 * Lambda **3.0 * InvGainAlphaMu;
I was struck by the inappropriate bluntness of the post you are replying to. It tells me a lot about this individual.
I hope he responds in a way that is appropriate for someone who is asking for help, though based on the post that started this thread, I wonder if he is *really* asking for help.
We'll see...
seriously?