Jump to content
OMRON Forums

VisionHAWK Ethernet/IP Explicit Messaging Example


Recommended Posts

VisionHAWK Ethernet/IP Explicit Messaging Example

VisionHAWK does support explicit messages and this is going to be the easiest way to communicate as you will be able to pull the data from the Micrologix controller.

You will need to do a few things to get the job to output the data to the Ethernet/IP assembly and this is an easy process. The steps are outlined below;
1. Set the output data in the Ethernet/IP Assemblies in AutoVision.
a. Open Autovision.
b. Connect to your VisionHAWK.

User-added image

c. Add the OCR Tool.

User-added image

d. Link the OCR Tool data to the Ethernet/IP Assembly. Each link represents the available data that one can link to the Ethernet/IP assemblies and I’ve highlighted what the OCR tool has to offer.

User-added image

1. Pass/Fail Status: Status bit for the OCR Tool
a. 1 = OCR Inspection Passed
b. 0 = OCR Inspection Failed
2. ASCII String Data
a. This will be a STRING in the PLC, so the first 4 bytes will be the length of the string (size DINT) followed by an SINT array of 2044 bytes.

User-added image

3. Number of Characters Found: The total number of characters found in the inspection by the OCR Tool. This will be same value as the LEN in the STRING above.
e. Click the Link button in the OCR Tool
Example
1. Linking the OCR Tool Inspection Status bit


User-added image
 The link chain will highlight green after you set the link


2. Linking the OCR Tool Inspection ASCII Data


User-added image
The link chain will highlight green after you set the link


3. Linking the OCR Tool’s total number of characters found


User-added image
 The link chain will highlight green after you set the link

f. Verify that the data link is correct by running the job once as a test by click in the Run Once button.
g. Click the Data Navigator to see the data.
h. Download the Job to the reader.
2. Configure the MSG instruction to read the Ethernet/IP  Input Assembly explicitly.
a. Reference Page 2-14 through 2-17 on the Assembly, class and instances to read the data that was linked above.
b. Example
  i. Read the OCR Inspection Status bit set above which was assigned to BOOL1.  In page 2-15:
   Service Code:   0xE (Get Attribute)
   Class: 0x68 (Class 104)
   Instance: 0x1 (Always 1)
   Attribute: 0x1 (Refer to page 2-15 for the attribute value)
  ii. Read the OCR ASCII Data that was set above which was STRING1.
   Service Code:   0xE (Get Attribute)
   Class: 0x6c (Class 107)
   Instance: 0x1 (Always 1)
   Attribute: 0x1 (Refer to page 2-15 for the attribute value)
  iii. Read the total number of characters found in the OCR Inspection Tool that was set above which was INT1.
   Service Code:   0xE (Get Attribute)
   Class: 0x69 (Class 107)
   Instance: 0x1 (Always 1)
   Attribute: 0x1 (Refer to page 2-15 for the attribute value)


You’ll need to set the MSG instruction in the RSLogix500 program to make sure communication is established and that the controller can read the data from the unit.  I’m not 100% sure on how to do this as I’ve not personally done it before.  You’ll need to find a way to read the data using CIP  (Common Industrial Protocol) and in the 1766-rm001 manual states that this can be done when creating the Message File and setting the sub element 2 to 1 (CIP) and making your Target Device = CIP Generic in sub elements 12 to 15.   Chapter 22 has an example on configuring an Ethernet/IP Message so you should be able to get things to work from this point on.
 

Operating System

Any

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...