Control Logix scan time...

The scan time would be micro seconds. In a CLX you view the scan times of each program and have to add the scan times of all programs if you want a full scan time.
However if only 1 program is running then 640 microseconds is not abnormal. These things are fast. Regards Alan Case
 
back on line again!!
terry the scan time for the main routine is about 640Micro seconds..I put the +- in becouse it goes from 620-660..
after reaming my rep out about the resolver card i figured out where he was coming from..my application would benifit from it but does not require the immidiate respons that a PLS offers..This is just one of those things that was nagging in the back of my mind..

When i get home i will change how i call the subroutines..(at the moment i have one that runs all the time) and see what that does..as i said the machine runs perfect i added the limit instruction insted of the equals and all is good..i mean the limit i put in is (320 is target and rhe limit is 320-322)..but it was one of those..did i do something wrong? it seems i may have made a minor mistake in subroutines but i will see what happens to the scan time later..

Now i am faced with a bigger challenge!! i have a simialr machine (same manufacture but newer model) and it has 6 single axis servos on it.. If it comes down the pipes who knows we may see another learning by doing thread!! seeing as i have never done servo/motion control before..

Thanks guys for all the info..It is taken to heart and if i improve my scan time i will lwt you know..

BTW terry my first impression when i read the scan time was.."that cant be right...Damn these things are fast!!but then again thats why i chose CL

Darren
 
Alaric, Misinformed, what I'm going to say is based only on what I've been taught and what I've read in the documentation (1756-RM087C-EN-E); if you've got hard data based on real-world programmes then I'll gladly retract it all!

Calculating an expression using CPT is always going to be slower than using individual maths instructions, for an L-60 series it's 1.6 uS plus the execution time of each of the individual operations in the equation. (In my opinion that's a very small price to pay considering how much more readable the code becomes and therefore how much better understood by maintenance guys).

Executing a complex assignment in ST takes the same amount of time as a CPT. I also like ST due to my background but maintenance guys hate it.
 
NOP

None of the programs I work on here are really time critical so the compute instruction doesn't hurt me as far as scan time goes. I've only dealt with ST a few times so I'm not all that proficient with it plus I work with a maintenance team and they are having a hard enough time troubleshooting using just ladder logic. The simpler I can make it for these guys the happier thay are. Plus I hate that 2AM phone call asking how to fix the machine.
 
MisInformed said:
The simpler I can make it for these guys the happier thay are. Plus I hate that 2AM phone call asking how to fix the machine.

Amen. Which costs your customer more, a few ms saved per loop or 40 minutes downtime caused by "efficient" code that only the programmer can comprehend (even if they included documentation :) )?
 
NOP

If you do something like

CPT C "A + B"
or
Add A B C

Then the add is definitely going to be much faster.

If however you are doing something like

CPT C "((A+((B-A)/Rate * (Timer1.Acc/1000.0)) + Offset)*)16384"

then the CPT instruction begins to be an advantage. There would be six intermediate results and storage operations in ladder.

As I indicated earlier, I have not tested it myself, but I was told by one of Rockwell's own that ST was faster than ladder for math intensive routines. I know that a lot of maintenance guys dont like ST, but then in my experience, most of the time the maintenance staff is looking for a limit switch that is not being made or some such malfunction and rarely concern themselves with any actual calculations.

I am the guy that gets called at 3:00 in the morning, so I usually try and write my code to be as readable as it needs to be. I even talked about some of my techniques in another thread, but there are certain routines that once debugged can be thought of as black boxes - the code is predictable and sometimes its the kind of thing I don't want a maintenance tech messing with. I recently had to put a password on a PLC (something I hated doing as I despise the "kingdom builder" mentality) because one of the techs just wouldn't leave it alone. We just couldn't convice him that the sensor needed frequent calibration instead of tweaking the numbers in the PLC just to get it to run marginally. Since locking it down it hasn't given a single problem as he is now forced to do keep the sensor calibrated. If I would have had ST available on that PLC I would have used it rather than lock down the PLC.
 
Last edited:
OK, I decided to test this to make sure on the speed of ST. I programmed two identical programs, ones in Ladder, and one in ST in a CLX processor. Each is its own program with its own tags. Each program performs 25 floating point multiplication operations; it multiplies the real tag rD by 1.0 twenty five times and stores the result in the real tag rC.



Here are the results.
scanresults.JPG




The ladder takes 460 micro seconds to execute
The ST takes 178 micro seconds to execute, or more than 2.5 times faster.
 
Alaric-

I think you have proven that ST is faster than LAD (assuming you used equivalent instructions in both files). Now for NOP's contention that a complex equation in a CPT is slower than it's discrete counterpart and your rebuttal.

In either ST or LAD add tag to another tag 25 times. Do one as a single CPT and the other as a string of 25 ADD instructions to prove which is faster. Just make sure you use just one language for both implementations. My vote is that the CPT will be faster.

Keith
 

Similar Topics

Dear Friends, we all know that we can get the Scan time of a Task using GSV Instruction. I would like to know is there any Method/formula to...
Replies
5
Views
7,695
In one of my project I need to integrate Bar code Scanner (Model: MS 880, Supplied by Microscan) with Control Logix Processor using Ethernet...
Replies
3
Views
4,218
I have a controllogix PLC utilising devicenet I/O, and am having problems that I believe are due to the prescan. Certain logic utilises examine...
Replies
13
Views
4,130
Hello guys, I'm new here so go easy on me ;). Right I have many years AB experience but I am using the contollogix plc with RSLogix5000...
Replies
19
Views
15,313
I am having trouble with getting no control of my analog output signal. I am using the SCL function block to control my analog output. The logic...
Replies
11
Views
254
Back
Top Bottom