CIP Generic access Open Socket on MicroLogix 1400

rmunsta24

Member
Join Date
Feb 2015
Location
MN
Posts
9
CIP Generic access to the Open Socket interface on the MicroLogix 1400

Hi guys,
Looking for some help on getting 1 socket opened for a ethernet barcode reader. I've got about 4 pages of help manuals opened and i cant figure it out. Even got some sample code from AB to use but im unsure on setting the ip address and port number...
Im trying to use the HERCULES SETUP UTILITY by HW-Group, i got this application to work with the serial port on the Mirologix 1400 but i am struggling on this open socket setup.

First should i be the server or client, when a barcode reader will be sending a ascii string down...

thanks...
 
i have had that chapter open for a couple days now.
I didnt provide barcode scanner details because i dont have one, thats why i am using the hercules program to send the data to the micrologix.
i am just trying to get the basic code i need setup in my current program for when the barcode scanner shows up. i should just need to read from the scanner, i wont be sending anything to it.(i think)

thanks fo rthe help
 
The problem with the manual, which I have also been staring at for 3 days, is that they leave a few things out. on page 452 it says...

N file sending contains: 8 bytes + n bytes

Nx:0, Nx:1 = time out (4 bytes)
Nx:2 = Address length (2 bytes)
Nx:3 = Reserverd
Nx:4..... = Address Data (in bytes, max 64)

So I am assuming an "N file" means a Data File of the "N" type which is in general an integer file. You can view and edit the data in this file as binary, octal, decimal, hex/BCD, or Ascii.

When it says "Nx:4..... = Address Data (in bytes, max 64)" and then suggests "10.88.81.10?port=2813" as an IP address what should my Data File look like when that address is entered? The only way to add characters is in Ascii mode. Am I totally missing something? There is no way to view it in bytes unless you count binary? Page 448 gives some more clues but shows you a super simple address and talks about CIP byte order. I can't view my Data Table like that.

Sorry if I'm missing something basic but this is new to me.
 
Generally I've used an MSG instruction to read from scanners into controllers - configure the IP address, source, destination, and create a control file (another N file).
 
Smith5425;

Ideally, open up a different thread for your specific question, as answering multiple questions in a thread can get confusing.

I think you're describing the OpenSocket message. My specific copy of 1766-RM001 (May 2012) has that info on a slightly different page.

You're correct that the OpenSocket MSG Address Data section is an array of ASCII characters that stores the target IP address, a question mark, and the port= assignment. This array of characters starts at Nxx:4 of the Send Data table that you designate while setting up the MSG instruction.

I think that the best way to enter the "10.88.81.10?port=2813" is to go directly to the Data Table monitor and highlight Nxx:4 while in ASCII mode then paste the string right into the Data Table monitor.

You're right that this is not a simple function of the MicroLogix, and addressing using ASCII is confusing because of by the way that MicroLogix handles Strings with 16-bit chunks of two characters each.

There are a couple of RA Knowledgebase articles that might help with examples. Article 115167 is Access Level = Everyone, and Artilce 466332 is Access Level = TechConnect.
 

Similar Topics

Hello, PLCS.net guys. I'm learning about MSG for TCP communication recently. I'm trying to use CIP Generic. And the main flow is like the one...
Replies
6
Views
1,253
Having an issue with network timing out when trying to use CIP generic on a Micrologix 1100 B. I’m trying to read flow and totalizer information...
Replies
19
Views
5,039
Hello, I am using a 1756-EN2T and tryin to communicate with a device that accepts ASCII string over ehternet usin UDP. Do packets sent using CIP...
Replies
8
Views
1,806
Hi All - I am trying to communicate between a Micrologix 1100 and a Powerflex 525 via CIP MSG. There is a great Knowledgebase and TechNote...
Replies
3
Views
4,001
Sorry if this is a beginner question, and I have looked at the manuals. Seems like a couple of tech notes would answer my question but I don't...
Replies
8
Views
6,495
Back
Top Bottom