
132 Publication LOGIX-AP008B-EN-P - June 2008
Chapter 5 Common Mistakes when Converting to Logix
User Code Emulating
Existing Instructions
Programmers often write user code when an existing instruction will do the
job. As an example, compare copying an array with user code and with the
COP instruction.
User Code
COP Instruction
Below are the relative timings for the two methods. Again, the numbers here
are only for comparison with other numbers in the table. They should not be
compared with entries in other tables.
To perform operations like copy arrays, STEP 7 library functions that are
written in Statement List are used. If the library function doesn't do what is
required, a new one can be written. The functions written can be almost as
efficient as the ones that STEP 7 provides.
However in Logix, it is impossible for a programmer to write a copying
function that is as efficient as the built-in COP. The lesson for S7
programmers is to check the Instruction Help in RSLogix 5000 software
carefully before doing it yourself.
Method Relative Timing
Copy array of DINTs with structured
text
100
Copy array of DINTs with COP 18
Commentaires sur ces manuels