Native commands to Cognex In-Sight from Allen Bradley ML1100 over EIP

Nortech

Member
Join Date
Mar 2018
Location
Spain
Posts
59
Hi All,

I am working on an application where I must use EIP communication to a ML1100. (Not enough IO).

I have the Camera writing the Pass/Fail result to the PLC using a 'FormatOutputBuffer' and then 'WriteEIPBuffer' on the camera and then I am reading it using a message function on the PLC.

However, I will have to read the Online/Offline status of the camera as well as setting the Camera offline to change Jobs and then setting it back online.

I know that I need to use Native Mode commands such as SO0 and SO1 to set the Camera ON/Offline.

I have tried writing these out as a string to the camera and using ReadEIP on the camera to receive the string but I'm not having any luck.

I am struggling here as my knowledge is limited so any and all help would be very much appreciated.

Thanks in advance,
Nortech.
 
To specify, I am using a MicroLogix 1100 RS Logix 500 PLC.

Most of the info around this topic online seems to relate to SLC.

IN ANOTHER POST, THIS QUY SAID...

"I know this is old but I discovered the answer so I'm going to post it. My application is similar except I'm using a Micrologix 1400 and an In-Sight Micro 1401.

First thing's first. Your message setup needs to be "PLC5 Type Write." This will change the "Data Table Offset" field under "Target Device" to "Data Table Address."

Second, the Address you want to put in the Target field is ST10:0. This is the default address for all Native Mode Commands.

Third, I don't know if it's different for the 5400, but for the Micro, I used the "SE8" command to trigger the camera. SE8 is the built-in command for triggering so there is no need to set up anything in the spreadsheet.

So in other words, to trigger a Cognex Camera over ethernet with a Micrologix 1100/1400, you need to write the string "SE8" to address ST10:0 in the Camera, using the PLC5 Typed Write protocol.

P.S. Note the following:

1. The Camera must be online for the message to work, otherwise it will Error out
2. I had my trigger mode set to Network, but I believe there are two other modes that allow Native Mode Commands to work."

I have followed this exactly but I get the errors in the attached JPEG.

The only way i can verify the rung is to use 485CIF write and even then the message command just times out.

Any help would be greatly appreciated. Thanks

Capture1.JPG Capture2.JPG Capture3.JPG Capture4.JPG Capture6.JPG
 
Verify on the Multihop tab that you have the IP address of the camera set correctly.

I have not done this with Micrologix, but that step is necessary for SLC.
 
Hi Mispled,
Thanks for your reply.

Yes, my IP address is correct in the multi hop tab.

I already have the camera writing the Pass/Fail out to the PLC over ethernet so I am sure of my network configuration.

I just don't know how to configure the message instruction to write native mode commands to the camera.

Any suggestions?

Thanks again for your reply.
 
The document available at the following link shows an example of SLC-to-Cognex messaging for Native Mode commands starting on page 28. It is not be a direct match to the Micrologix environment, but may offer some insight:

PLC to In-Sight Communications Using EIP

From what I see, your configuration is correctly following this example. It is my understanding that you can submit tech support questions to Cognex without a service contract. That may be another source of assistance, or a local Cognex sales office.
 
Hi Mispled,

Thanks for the document but unfortunately I have been over it previously.

If I cannot find help on the forum them I am going to have to contact tech support as you said.

thanks again.
 
As per the manual, your destination address for native commands should always be ST10:0(pg.29). In the screenshot you attached (attachment4) you are writing to ST10:1
 
Hi Mdim,

Thanks for your reply.

I was under the impression that ST10:0 was reserved for the native command to trigger the camera ONLY.

And that the next native command is SO0 (set camera offline) and should be sent to ST10:1?

Thanks again.
 
Hi all,
Just wanted to bump this up to see if anyone else has any suggestions.

I will be working on this again tomorrow so it would be great to start with some fresh ideas.

Thank you.
 
Can anyone tell me if i need to do anything in insight in order to read my Native mode commands?

it would appear that i am sending the commands OK from the PLC but nothing is happening on the insight side.

do I need to read them using ReadEIPBuffer?

I was under the impression that it should read the NMCs automatically.
 
Can anyone tell me if i need to do anything in insight in order to read my Native mode commands?

it would appear that i am sending the commands OK from the PLC but nothing is happening on the insight side.

do I need to read them using ReadEIPBuffer?

I was under the impression that it should read the NMCs automatically.

We used explicit messaging and native mode commands many years ago (before EIP), and from what I recall, there was nothing in the spreadsheet to support reading and writing data. It was all on the PLC side. I looked for some of those programs, but all have been purged.

Maybe this Cognex tech note will help, if you haven't seen it already:

SENDING IN-SIGHT NATIVE MODE COMMANDS USING EXPLICIT MESSAGING
 
It appears that the Cognex tech note in the previous reply has a direct example of Micrologix native mode commands. Reply if you have any trouble accessing it.
 
it would appear that i am sending the commands OK from the PLC but nothing is happening on the insight side.

Does it mean you receive the DN bit? If so, this is what same manual says

"The Done (DN) bit will be set to 1 when In-Sight has replied that the Native Mode command was received and executed with success"

If you don't get it, you should get the ER bit and fault code, which might help for diagnosing the issue.
 
Hi all,
thanks for your replies!

Mispled, yes I have copied that cognex help file as closely as possible and it seems to work ON THE PLC SIDE. However, my MSG (Message) command is quite different than the one in that file so I had to do some guessing there.

Mdim, I read that line too, sounds promising. I always get my DN bit with no ER at all. However, still nothing happening on the camera side.

I used "FormatInputBuffer" and "ReadEIPBuffer" to check that I am receiving the data in Insight; and I am receiving it OK!

However, as per the Cognex help file above:


"The native mode command string data is then copied (MOV) 2 bytes at a time into integer file N13 starting at word 10 (N13:10) as ASCII characters. This needs to be done because in a MicroLogix1100 you can only send and receive string data using the N file type.""

Therefore, as I would expect, I can only read the data as an integer on the insight side. Is there a way to convert this to a string in order to confirm the correct data is being sent?
 
"The native mode command string data is then copied (MOV) 2 bytes at a time into integer file N13 starting at word 10 (N13:10) as ASCII characters. This needs to be done because in a MicroLogix1100 you can only send and receive string data using the N file type.""

Therefore, as I would expect, I can only read the data as an integer on the insight side. Is there a way to convert this to a string in order to confirm the correct data is being sent?

I think this would just be a matter of comparing ASCII codes of what was sent by the PLC and what was received by the camera. One possible watch-out is byte swapping in the logic and communication path.
 

Similar Topics

I have an in-sight cognex camera connected via profinet, and it is up and running perfectly. However, for reasons too long to explain, I need to...
Replies
9
Views
6,226
Greetings All, I recently decided to start freelancing in Controls and Automation part time, most of my experience has been with Rockwell...
Replies
2
Views
78
Recently I have requested a quote from Magnetek for their Impulse Drives but can't raise a response from them. I've requested a quote FOUR TIMES...
Replies
3
Views
1,046
Hello All, Its been a long time since i've been in the trenches actually doing development. When i was developing I used PicsPro extensively for...
Replies
2
Views
1,124
Hello friends, I'm asking a new question here, after thinking a lot about my problem, I wondered if it wouldn't be easier for me to install new...
Replies
0
Views
710
Back
Top Bottom