Compactlogix byte word from devicenet

rigicon

Member
Join Date
Aug 2009
Location
kent
Posts
415
Hi all,
I have a compactlogix and a 1769-SDN scanner connected to ABB robots with devicenet.
After mapping etc I have 64bits Input and 64 bits Output per Robot I think this is the robot limitattion ie 8bytesIn and 8 bytes out.
I need to send some bits no problem. I used group input/output on the robot to send bytes and words. Problem is on the PLC side DINT/Dout=32bit. I used bits 0-3 for one mould ID (no more than 7)In/Out and bits 16-31 for counts ie a word(65535)In/Out.
What is the easiest way to tell RSlogix to group certain bits together to form a byte or word input and output.
Inother words bits 0-3 will be word 1 and bits 16-31 will be word 2. I need to get this IN and send it Out.
The robot is all done and was a breeze. I know the PLC can do it. Do I,do it the old fashion way and move each specific bit into a specific place in a new word or is there a neat way. Help very much appreciated. :unsure:
 
UDT's can be tricky; make sure you test yours to be sure the data goes where you expect it to go.

UDTs line up data based on the data type of the next element in sequence. If you have a BOOL followed by an INT, for example, the BOOL takes up Bit 00 and the INT takes up Bits 16-31, not bits 01-17.

Sometimes the data just doesn't line up in a way that a ControlLogix UDT can handle. That's when I copy all the data into a SINT array then write a little logic to put it into the proper elements in the UDT.

If this is just one robot project, it might make sense to just do it the hard way (which can be understood by anyone coming to it later) with XIC -> OTE and MOV, MVM, and CPS instructions.
 
Thanks to you both. There are 5 robots so I see a bit of a copy paste. I have used UDT once before for a recipe which was more of a copy of an example. I'll try something and let you know. Cheers.
 
I found the most flexible way to map to and from the DNet mapping was with the Bit Field Distributed instruction. Easy enough too!
 
jac You r brilliant. I had a go with a UDT got so muddled up. Then tried bcd etc but your way is exactly what I was looking for.🍺🍻
 
The BTD instruction is a perfectly good way of doing this but you must understand that it is very particular about the data types of the source and destination tags. If these do not match exactly you are likely to see minor errors which will not stop your code from working but will quickly become tiresome.
 

Similar Topics

Hello all, and thank you in advance for any assistance you may be able to provide! This is my first post, so if I need to reformat or change...
Replies
0
Views
1
We are trying to poll data coming from a PLC for remote monitoring we have the IP address of the PLC and the default port number and the path is...
Replies
25
Views
418
Hi everyone, this is my first time trying to setup encoder counts and track the traveled distance and speed i am using L27ERM QBFC1B processor...
Replies
12
Views
331
I have a device that is currently connected to a UR 10 robot through a UR Cap and I would like to connect the device to an Allen Bradley...
Replies
3
Views
316
I have a device that is currently connected to a UR 10 robot through a UR Cap and I would like to connect the device to an Allen Bradley...
Replies
0
Views
102
Back
Top Bottom