RSLogix 5K and packing bits - Help

gizmo

Member
Join Date
Aug 2002
Posts
95
Greetings,

I need to move various bits from a tag TO_SEND (type = SINT[20]) to a consecutive order into bits 0-15 of a tag = SEND (type = INT[10].

For example:
TO_SEND[1].5 needs to goto SEND[1].0
TO_SEND[3].2 needs to goto SEND[1].1
TO_SEND[6].5 needs to goto SEND[1].2
and so on.

I need to get these bits packed into a word so that it can be read by other software.

Any help would be greatly appreciated.

Thanks!!!
 
either use a masked move command or just have the TO_SEND bits drive OTE's on the SEND bits.

For example:
XIC TO_SEND[1].5 OTE SEND[1].0

 |-----||-------------------( )-|
TO_SEND[1].5 SEND[1].0
|-----||-------------------( )-|
TO_SEND[3].2 SEND[1].1

 
Last edited:
follow up

I like the 2nd option of driving SEND as OTE's. It seems to keep it simple.

I was just reading about a BTD instruction. It appears to do what I want. Any comments or suggestions on why or why not to used the BTD instr.?
 
Yeah, as I was reading your question the BTD immediately popped into my mind. That would be the easiest way to move consecutive bits in a source to consecutive bits in a destination.

The other method is more flexible for moving bits when either the source or destination ar enot consecutive.

OG
 
Thanks..Now I need to...MSG?

Thanks Again for the helpful info.

Once I get my Int type Tags created with the consecutive bits I need to move them to another control logix processor via control net.

It appears that I can do this with a MSG instruction.
Is there a recommendation on wheter I use Block Transfer Write and write to the destination plc or use Block Transfer Read @ destination plc.

What is the "Source Element" field?

I'll be moving 7 - 16bit integers: Send_To[0] - Send_To[6]
to Send[0] - Send[6].

What would be my Source element?
 
gizmo,

With the random arrangement you have, the only reasonable way to map between the arrays is with XIC / OTE pairs like LJBMatt suggested. If there was more pattern to it, you would have other alternatives.

You will be using a CIP Data Table Read or CIP Data Table Write to talk to another ControlLogix. Block transfers are for talking to 1771 I/O modules and such.

To read or not to read? That is the question... It's a good one, and a whole subject by itself. I'm going to skip it for now. I don't have that much time right now.

Your Source Element is the tag name in the ControlLogix where the MSG instruction is. The Destination Element is the tag name where the MSG instruction is not. In your case, that's Send_To[0] for the source, and Send[0] for the destination. Note that you need the [0].

I recommend you choose the names for tags a little differently.
Tags in Processor A (the one with the MSG instruction)
Data_to_ProcB[0]

Tags in Processor B (the other processor)
Data_from_ProcA[0]

I actually prefer something more descriptive than "Data" since I usually have more than one message, but I like the tag to contain both the direction the data is moving and the other processor involved. It really helps preserve your sanity.

Good luck,

Mike Ellis
 
Thanks

Thanks Mike,

Your message was very helpful. My actual tagnames are more descriptive, but they are about 30 char. each so I cut them short to be lazy.

I've got to make this work tomorrow and I won't have access to the internet so I was tring to get as much info as possible before.

I would like to thank everyone that makes this site possible because it has been very helpful to me.
 

Similar Topics

Hello Everyone, thank you for taking the time to read this post. I got this short program of a Packing Line. I documented everything. I was hoping...
Replies
16
Views
4,006
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
84
Hi folks, in the alarm manager of Rslogix 5000, the tag-based alarm has been created. But when I tried to change the condition, it was found the...
Replies
2
Views
154
I have a little bit of experience with Allen-Bradley. I have a Micrologix 1500 (RSLogix 500) and a PanelView Plus 7 (FactoryTalk View Studio ME)...
Replies
3
Views
163
Back
Top Bottom