The purpose of the "MOVE" block?

What is the difference between using a MOVE block instead of a direct connection, when the output should just assign an input value to a functional block diagram?

MOVE Example

+4
source share
1 answer

The "wire" tells you that the logical value calculated by the code of the stairs (AND, OR, ...) on the left is used on the right. This does not change the "memory". (Your drawing only by wire makes the diagram confusing; you really should show the operators at both ends of the wire.)

The MOVE operator leads to the fact that the contents of one memory cell of any type can be conditionally copied to another. Using the MOVE operator, you can copy an integer, float, or other more complex value to a new destination; I don’t remember if you can make a forced value for the value (for example, int for float), but I would suggest that this varies from controller to controller. As a side effect, the MOVE statement copies the input logical value on the left side to the output logical value on the right; most "blocks" like operators in ladder logic do this. But this input logically controls whether the block really performs its action or not. In your example, you show a MOVE block, but not critical parameters: from and to locations; the "wire" supplying it controls whether the movement is really happening. So the best example:

---| X |------| MOVE(P,Q) |---( Y )--- 

What this says is, "if X is true, then copy P to Q and assign true (from X) to Y; if X is false, do not move anything and assign false (from X) to Y." (The Boolean value of X is copied through the block MOVE).

Since MOVE will work with any type, you can use MOVE to copy a logical value to a memory location in another place; just imagine that P and Q above are logical variables. However, logical conditions and actions work just as well:

 ---| X |----( Y )--- 

copies logical value X to boolean value Y.

To really simulate a logical MOVE command, for example, "copy boolean P conditionally to Q if X is true", requires some convoluted logical logic:

 --+--| X |----| P |---+--( Y )---- | | |--| *X |---| Y |---| 

where * X means "not X". MOVE is simply easier to write.

+2
source

Source: https://habr.com/ru/post/1440069/


All Articles