RsLogix5000 - Read 1756-EN2TR IP Address

AlexDarsigny

Member
Join Date
Jun 2015
Location
Montreal
Posts
19
Hi everyone,

I'm looking for a way to read the IP address I set on my 1756-EN2TR card. I want to use it for internal logic in my controller. No need to produce the tag for other controller.

Every IO cards on my rack has built-in structure which contains settings but the EN2TR do not.

I do not want to change EN2TR setting with internal logic, I only want to be able to read them.

Any suggestion?

Thanks.
 
Some of the settings you can obtain using GSV instruction. See help -> GSV for more details.

I am not sure if you will be able to read IP address this way.
 
You can use a MSG instruction --
CIP Generic;
Get Single Attribute;
service code = e;
class = f5;
instance = 1;
attribute = 5

Your destination will be SINT[26] type tag.

Communication path is simply the name of your ENT2R.

The first four words, I believe will be the IP address, in backwards order: ie, 15,1,168,192 for 192.168.1.15.

Do note that because of the SINT, values > 127 will appear as negative numbers.

HTH. Good luck.
 
I checked everything about Module object and even the other object. There's a bunch of interesting option but not the IP address. It's probably too specific to be a "module" attribute.
 
Aaardwizz is correct; this information is not in the Module object (accessible by GSV) but rather in the TCP/IP Object, accessible by CIP Generic Message and the MSG instruction.

There's a good Knowledgebase document on the topic:

https://rockwellautomation.custhelp.com/app/answers/detail/a_id/26779


If you're already familiar with CIP Generic Messaging, it's a Get Attribute Single to Class F5, Instance 1, Attribute 5. I make the destination a SINT[32] then handle the data from there if I have to make a string out of it.

The data size varies depending on if you have a Hostname in your configuration, so make a larger SINT[x] array to be sure it accepts all the data, then shorten it to suit the actual response length.

I just did it on my EN2T to check, and it works fine.
 

Similar Topics

Need good example/sample of aoi RSLogix5000 code to read&write through RS232 port on Need good example/sample of aoi RSLogix5000 code to...
Replies
0
Views
1,838
Is it possible to partially restrict the types of communications allowed through a ControlLogix communications module? Ideally I'd like something...
Replies
7
Views
3,299
I'm working on a project using a pair of 1756-L62 processors using RSLogix5000 ver 18.02 and FTViewSE 6.00 standalone. The odd thing that is...
Replies
22
Views
32,091
I need to read Drive status from 10 GV3000/SE drives. I am using ControlLogix processor @ V13.31 and the path is via ControlNet. I see plenty on...
Replies
3
Views
3,660
Back
Top Bottom