Bit Field Distribute vs Move

Timeismoney08

Member
Join Date
Jul 2012
Location
United States
Posts
312
Can someone explain the difference between the two instructions? Bit field distribute almost sound like a shift register, but maybe I'm wrong.

Any input would be appreciated!
 
I'll assume you're talking about the Allen-Bradley instruction sets.

Move (MOV) takes the value from Source and puts it into Destination.

Note that I said "value".

In A-B controllers, MOV automatically converts betwen data types, so you can Move an integer into a floating-point value, and the whole number itself is moved over, with its sign. The bit pattern gets automatically converted from 2's complement integer to 32-bit single precision floating point.

Bit Field Distribute (BTD) is more like a shift register and mask. It takes a specific number of bits from one place in a SINT/INT/DINT tag and moves them to another place in a different tag. Often the group of bits starts at Bit 0, but it doesn't have to.

I notice that you didn't mention COP or CPS (specific to ControlLogix) or CPW (specific to MicroLogix). Those generally work on blocks of data in chunks, and will move bit patterns between different data types without converting them or accounting for the Sign bit.

Because COP/CPS/CPW can be used for differing data types or across element boundaries in a user-defined data type, they require a longer discussion and usually some examples.
 

Similar Topics

Hi guys, I am needing to write 8 bits to the lower half of a 16 bit word without affecting the data in the upper half of the 16 bit word. I need...
Replies
4
Views
3,094
I have the following question when read a PLC book, regarding The bit field distribution (BTD) instruction. Thank you in advance for help. Given...
Replies
4
Views
8,808
See the screenshot of EIP tag list. We are trying to read in a digital input that is hard-wired. It is shown here as I31.1. I believe we cannot...
Replies
7
Views
272
A couple days ago I accidentally toggled an alwasyoff bit. The issue is it was set up as a single OTU on a rung, nothing else, and used as XICs...
Replies
3
Views
219
Hi I have an old panel builder 32 that I’m replacing for a factory talk me hmi . In the plc for the old panel builder there is a coms bit for the...
Replies
0
Views
70
Back
Top Bottom