Reading single bit from ControlLogix (via CIP)?

vorfeed

Member
Join Date
Jul 2008
Location
New Mexico, USA
Posts
19
Hi,

I'm talking to a ControlLogix PLC using CIP over E/IP, and I'm having trouble accessing single bits inside another type (such as an integer).

For example, I can access B30[4] or N2:I.SlotStatusBits, but when I ask for tagnames like B30[4].2 or N2:I.SlotStatusBits.0 I get an error back from the PLC (0x05, "The particular item referenced could not be found"). I can see these are valid tagnames under RSLogix, but nothing I try will get them back via CIP.

Is this a syntax problem on my end? If not, is there some other way to reference individual bits on ControlLogix, or am I out of luck?

Here's the IOI I'm using for "B30[4].2":
4C 06 91 03 42 33 30 00 28 04 91 01 32 00

Thanks for any advice you can give me!
 
Thanks for the reply!

I'm including the "01 00" for the number of elements at the end -- it just wasn't printed in the output, sorry about that. I also just tried using 02 instead of 32 in the last segment, and that didn't help. I still get "the particular item referenced could not be found".

Unfortunately there's no example of single-bit addressing in the manual you linked to. The closest thing is "str1Array[8].travel", which looks similar to what I'm doing (building an ANSI symbolic segment starting with 0x91, appending the array subscript as a Member ID with 0x28, and then adding another ANSI symbolic segment starting with 0x91 for the stuff after the '.'). The manual says this should work for structure members, and it does, but it doesn't seem to work for bits.

I also just tried adding the bit number as a Member ID (0x28), Element ID (0x28), Class ID (0x20), Instance ID (0x24), and Attribute ID (0x30) instead of an ANSI symbolic segment, just to see if any of those would work. They all give me a different error ("the IOI was malformatted").

Is there some other tagname format I could try? Please post if you have any other suggestions!
 
Hi,

I "think" the problem is the bits are not declared structure members like EN or ACC or PRE or travel. RSLogix makes it appear that way but I do think they are declared structure members. The base type is int. Int is not a structure.

My 2 cents. I would LOVE to be wrong!
 
I spoke with some people who know more than I know:
While I did not get a final answer both of them said that most likely it is not possible directly.
The proper way in this case get a complete integer (or DINT) and extract correct bit in your application.
If I hear an additional infromation then I will post it here.
 

Similar Topics

Hello I have a s7-1200 and I would like to read the tags present in this controller with my controllogix controller. The two controllers don't use...
Replies
5
Views
134
Hi all, i have 8 CJ2m plc units that show different numbers on the plc display and i am stuck on reading the info. my unit has an ip address of...
Replies
3
Views
96
Hi Everyone, I am not proficient in RSLogix 500 so I have a question regarding the evaluation of N7:0 data as an input. So as I understand in...
Replies
1
Views
85
Trying to setup a message read via Ethernet. I have the path setup as 1, 1, 2, 192.168.66.10 I get an error code 1, ext err 315. I am beating...
Replies
9
Views
232
Dear all, I don't know why setup of password became challenging and weird. After setting up the password and try to upload the ladder from the plc...
Replies
3
Views
172
Back
Top Bottom