Publication 1756-UM523F-EN-P - December 2006
80
Configure and Program the Controller
7. Execute code only when you need it.
The controller crossloads a tag anytime an instruction writes a value to the tag. This
happens even if the value stays the same.
•
Many instructions write a value whenever they run. For example, instructions such as
OTL, OTU, and many instructions with Destination operands write a value each time
the rung-condition-in is true.
•
Whenever an instruction writes a value, the controller marks the value for the next
crossload. This occurs even if the instruction wrote the same value that was previously
in the tag.
If you execute an instruction only when you need to, you reduce the amount of crossload
data. This reduces scan time. To limit the execution of an instruction:
•
make a rung false when you do not need to execute its instructions.
•
divide your logic into subroutines and call each subroutine only when needed.
•
run noncritical code every few scans instead of every scan.
Action
Details
This is better
Than this
The ADD instruction runs only when the controller gets new data (New_Data = on). And
Dest_Tag crossloads only when the ADD instruction produces a new value.
The ADD instruction writes the sum of Tag_1 + Tag_2 to Dest_Tag each time the rung
executes. The controller crossloads Dest_Tag every scan, even if Tag_1 and Tag_2 stay the
same.
Содержание 1756-CNB/E
Страница 4: ...Publication 1756 UM523F EN P December 2006 Summary of Changes 4 Notes...
Страница 10: ...Publication 1756 UM523F EN P December 2006 10 Table of Contents...
Страница 26: ...Publication 1756 UM523F EN P December 2006 26 ControlLogix Redundancy System Overview Notes...
Страница 42: ...Publication 1756 UM523F EN P December 2006 42 Design the System Notes...
Страница 64: ...Publication 1756 UM523F EN P December 2006 64 Configure the System Redundancy Module Notes...
Страница 102: ...Publication 1756 UM523F EN P December 2006 102 Configure and Program the Controller Notes...
Страница 146: ...Publication 1756 UM523F EN P December 2006 146 Update Modules and Redundant Systems Notes...
Страница 162: ...Publication 1756 UM523F EN P December 2006 162 Set Up EtherNet IP Communication Across Subnets Notes...
Страница 168: ...Publication 1756 UM523F EN P December 2006 168 Convert an Existing System to Redundancy Notes...
Страница 178: ...Publication 1756 UM523F EN P December 2006 178 Redundant System Restrictions Notes...
Страница 185: ......