ControlLogix native SF command to Cognex Insight

tmkkoservo

Member
Join Date
Nov 2010
Location
Indiana
Posts
20
I am trying to send a message in the form of a SF command to write a value to a cell in a cognex spreadsheet. This is intended to update exposure before triggering image. I followed documentation precisely but keep getting "error processing connection related service". When I test a GV (get value,column,row), it works fine. Just cannot figure out the SF message.

image.jpg
 
The message part looks fine but I am not sure exactly what data you are sending. I suspect that the source length is not correct as you are mixing data types and it would be easy to get wrong.
 
ControlLogix native SF command to Cognex

widelto - Thanks, I have seen this document. It describes a message change. I need to write a value to a cell before triggering so the proper exposure can be used for the acquisition and inspection.

Andybr - I am trying to send a native SF command in the format
Syntax: SF[Column][Row][Float]as described in the Cognex helpfiles.

 
Finally Solved

I finally aborted all attempts at using user defined data types containing the command structure as instructed in all the documentation and just used a tag type SINT with a length long enough to contain the command string. Then I used Service Code 34, Class 78, Instance 1, service code 0.
 
Hate to bump an old thread, but I'm running into the same issue, and this fix doesn't seem to do it for me.

I'm using a CompactLogix PLC (1769-L27ERM-QBFC1B) on v24 of Studio 5000.

I have an Insight 7050 on Firmware 4.09.01

I'm trying to send the Native Command Set Int (SI).

MSG instruction:
Type CIP Generic
Serive Type Custome
Service Code 34
Class 78
Instance 1
Attribute 0
(Not sure what those instance/attribute values should be. Help file has confused me a bit).

Trying to write an INT to cell "A10" for the same reason as this user. Setup a UDT with SINTs for "S" "I" "A" 10 and then have tried SINT, INT, DINT for the actual Integer value.

Have tried not doing the UDT and just setting an array of SINTs for the values instead.

The MSG instruction always ends with an Error; Error Processing Connection Related Service. Error Code: 16#001F, Extended Code: 16#0000_0101

My latest attempt (after trying UDTs) was an array of SINT. 6 long.

0 - 'S' (Ascii)
1 - 'I' (Ascii)
2 - 'A' (Ascii)
3 - 10 (Decimal)
4 - 10 (Decimal)
5 - 0 (Decimal)

Communications are already working on this camera. I have an Implicit Ethernet/IP setup sending data, and an explicit MSG sending Job change commands. So I'm thinking it's something to do with either my Data Source in the PLC or my selection for the Instance/Attribute of the MSG instruction.

Anyone have any ideas? Thanks.

Edit:
Thought I saw an issue with the Row being SINT vs INT, but changing that doesn't seem to have made a difference.
 
Last edited:
It's been so long I can barely remember what I did. But I'll attach a spread sheet with screen shots of my MSG command. I'm not sure why the tag structure is the length that it is. I might have been playing around until I finally got it to work. In my case, I had an array of 3 of the command store tag. I was storing a couple different commands and moving it into the actual tag to be sent right before the message was sent to the Cognex.
 
Thanks for that. I notice you are storing the ascii equivalent of everything on that "SFA0108.330"

I hadn't tried sending it all as ASCII yet. I will do that and see if it helps.

The MSG configuration looks right (or at least, the same). So it must be my tag structure that is the issue.
 
Just an update.
As soon as I set it all to send as ASCII, it worked just fine.

Correct syntax:

Command (SI, SF, etc, as ASCII)
Cell Column (A-Z as ASCII)
Cell Row (000 thru 399 as ASCII)
Value (As ASCII)

So in my case I wanted to send the value "5" to cell A10, it was:

SIA0105

Stored them all in an array of SINT as ASCII, and just sent that across in the MSG.

For multiple digit values, it seems you can send either all leading zeros (08 = 8) or the single digit number and filled the remainder with Null characters. So "08" = 8, and "8 Null" = 8.

If the cell doesn't contain an editable data value, it seems to generate the same alarm as before. (If my Cell A10 had an EditInt, it was fine. A11 was blank, trying to write directly to it with no EditInt generated the previously mentioned alarm).

Thanks for your help.
 
Last edited:

Similar Topics

I have an application where one ControlLogix needs to read data from another ControlLogix. The second PLC is part of a validated pharma process...
Replies
9
Views
2,911
I'm converting a SquareD Symax system to ControlLogix and I'm trying to pick the best solution for a reeling drum comms cable. I've been looking...
Replies
0
Views
2,917
I've got several identical machines at a customer's site. All of the CPUs are accessible from the corporate network. What I'd like to do is make...
Replies
2
Views
4,306
Why does the controllogix redundancy modules use a single mode fiber vs multimode fiber?
Replies
1
Views
78
Hello, I have two 16 point input cards and 1 16 point output card showing module faulted on my IO tree in Logix Designer. The fault code is...
Replies
7
Views
214
Back
Top Bottom