In general (with respect to PLC's) any kind of data move is "size" oriented. Some people say "type" oriented, but it is really "size" oriented.
Sizes include...
- byte (8-bits),
- word (16-bits),
- double-word (32-bits)
That's all there is (up to this point).
Some really older machines were able to move "nibbles" (4-bits).
Within each of those size-groups are a few data-types.
"word" can mean Interger, Signed Integer,...
"double-word" can mean "Long Integer, Real,...
Down at the gut-level of the processor, moves are byte-oriented.
Yes, the processors use 16-bit registers... but those registers get loaded one byte at a time. This is because Memory is byte-oriented.
When the processor is told to "fetch" an "Integer" (word), the processor performs 2 fetches from memory... 2 x 8 = 16.
When the processor is told to "fetch" a "Signed Integer" (word), the processor performs 2 fetches from memory... 2 x 8 = 16.
When the processor is told to "fetch" a "Long Integer" (double-word), the processor performs 4 fetches from memory... 4 x 8 = 32.
When the processor is told to "fetch" a "Real" (double-word), the processor performs 4 fetches from memory... 4 x 8 = 32.
With respect to "moves" there is no difference between an Integer and a Signed Integer, nor between a Long Integer and a Real.
As far as a move operation is concerned...
Integer = Signed = 2-bytes
Long = Real = 4-bytes.
Some instructions call for the user to specify the "data type". Identifying the "data-type" specifies the number of bytes.
Some instructions are inherently "size-specific". That is, Move Word will move 2-bytes. Move DWord will move 4-bytes.
Some instructions call for the user to specify an "element type" and then a number of "elements". In this case, the element-type might be... byte, word or double-word. Each "element-type" specifies a number of bytes... 1, 2, or 4. The "number of elements" would then be multiplied by the type-number to get the total number of bytes involved in the move.
The "element move" is by far the most flexible data move (copy) instruction in all of PLC-dom. It can use indirect-addressing for all parameters (except the element type), including... source, destination, and number of elements. Adding the element-type gives the user access to all possible move types.
So... the lesson learned here... if you aren't restricted to a system that uses rules set forth by a "Land Use Planning and Zoning Commission" (you know who you are), is that there are more than a half-dozen different ways to skin poor ol' Tin-Tin when it comes to "moving" data.
Damn, I'm sorry Pierre... you know I am... you can have at mine... but please, be gentle with 'em... Especially with Stinker... she's still got those aliens showing up all the time, ya know. However... just 'cause I'm a little pi$$ed at the little prick right now, you can have at Tuffy "Tuff-Nuts"... he deserves it! And he can take it... he is Tuffy-Tuff-Nuts, after all... what a little prick!
A note on that "Land Use Planning and Zoning Commission"...
I have heard that those commissioners are coming around more and more to the TI way of thinking... hmmmm?
I'm beginning to understand how the earlier settlers in the Oklahoma Territory felt when the great land-grab happened. I felt pretty much alone out here... now an awful lot of new neighbors are showin' up!
And Lefty,
I'd still like to know which came first...
Direct Logic from Koyo
-or-
Texas Instrument products designed by Texas Instruments with manufacturing "farmed out" to Koyo.
That makes me wonder where the DL programming philosophy really came from.
blah-blah-blah... End-Rambling...