Appendix
F
Ethernet/IP Communication with ControlLogix PLCs
Add Program Tags
In this example, we will be creating a timed trigger, so we will need a TIMER
and a place to store the current trigger state. From the program tree, double click
on Tasks -> MainTask -> MainProgram -> Program Tags and select the Edit Tags
tab. Create a tag named Trigger_Timer of type TIMER and Trigger_Val of type
DINT. We will also create a User_Tag_Val of type DINT to hold our user tag
value which we will set to a value of 1 on the Monitor Tags tab.
FIGURE F–32.
Ladder Logic
With our data types defined and tags created, we can now create the program
using ladder logic. In this example, we will copy the user tag and match string
from our controller tag to the Ethernet/IP output assembly on every cycle.
Similarly, we will copy the results from the Ethernet/IP input assembly to our
Results structure in the controller tags on every cycle.
We will use the file copy function COP to copy data between our tags and the
assemblies. Our first rung will copy the user tag from User_Tag_Val to the
User_Tag_Out alias and the Match_String to the User_Data_Out alias. The
Length parameter corresponds to the number of DINTs to copy, in the case of our
32 byte HE1600T_String type, the length will be 8. This will write the user tag
and match string to the output assembly to be received by the Visionscape
Smart Camera HE1600T.
F-28
Visionscape® Smart Camera HE1600T Guide
®
Rev. 1H, Mar 2009
Need help?
Do you have a question about the Visionscape HE1600T and is the answer not in the manual?
Questions and answers