Read IP address from 1756-ENBT

I remembered I had an ENBT around here and just tried the parameters from the CPLX post and they worked.

Is there a single place one can look for all the available object/instance/atribute values or do you have to get them piecemeal from the Knowledgebase every time you need something?

Keith
 
There isn't a GSV/SSV object that can get/set the IP addresses of an Ethernet module.

This can be done - as in the linked post - using CIP Explicit Messaging.

Here's the details:-

Picture IPConfig1 shows a MSG instruction to get the info from the module. Not a good idea to trigger this every scan!

Pic IPConfig2 shows the Tag needed to receive the module info.

Pic IPConfig3 shows the MSG configuration - this is "Get Attribute Single" - Class F5, Instance 1, Attribute 5

I haven't show the MSG Comms path, this is just either the name of the module, or 1,slot assuming the ENBT is in the local chassis.

Getting this to work is a doddle : interpreting the results is harder, since the SINT array displays numbers above 127 as negative, (i.e. SINT are signed integers, IP addresses are unsigned).

Using MOV to copy the SINTs to DINTs won't work, because the controller will simply convert the negative SINT's to negative DINTs - back to square one.

Using COP to copy the SINTs to a DINT array won't work either, since it will copy four SINTs into each DINT.

Also the IP Addresses and Subnet Mask are stored in the SINT in REVERSE ORDER !

For the sake of simplicity - I used a MOV for each element, and if less than 0, added 256 - messy I know, but it works (I'm sure someone will post a better way)....

e.g.
MOV ENBT_Config[3] IP[0], LES IP[0] 0, ADD IP[0] 256 IP[0]
MOV ENBT_Config[2] IP[1], LES IP[1] 0, ADD IP[1] 256 IP[1]
MOV ENBT_Config[1] IP[2], LES IP[2] 0, ADD IP[2] 256 IP[2]
MOV ENBT_Config[0] IP[3], LES IP[3] 0, ADD IP[3] 256 IP[3]
gets you the IP address in readable form

The same can be done for the Subnet Mask (ENBT_Config[7] to [4]), and the Gateway address (ENBT_Config[11] to [8]

IPConfig1.jpg IPConfig2.jpg IPConfig3.jpg
 
Well it worked back then, but I'm trying to do exactly the same thing now with a ControlLogix L61 @ V20, and a Local ENBT module....

Guess what, it doesn't work anymore, and I'm damned if I know why not ? My setup, message configuration, everything, is identical to the above .....

The error code I get is 16#0005

Error Path: LOCAL_ENBT
Error Text: Class or instance not supported

Does anyone know why it doesn't function ?
 
I have found the problem, I had put "15" for the class value, not "f5". šŸ™ƒ

Really need to get my eyes tested ...
 

Similar Topics

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...
Replies
8
Views
2,568
Dear friend, how to read the input register (3xxxxx) of device from twido plc. i have tried the comm macro but it always read the holding register...
Replies
3
Views
1,567
Hello everyone! I want read MD address (temp data) from OB1 block and save data on PC. Program working on VIPA S7-300. I try used moka7 (java...
Replies
3
Views
1,398
Hello, I have a radio telemetry system that has an RS-232 interface that "understands" the DF1 protocol. In one place I still have a Compact...
Replies
4
Views
2,104
Hi! I'm trying to understand the structure of the "Protected Typed Logical Read with Three Address Fields" function, and I am using the online...
Replies
1
Views
1,636
Back
Top Bottom