What is the difference between using a MOVE block instead of a direct connection when an output is just to be assign the input value in a function block diagram?
-
...and are you talking about FBD? – J... Oct 16 '12 at 16:30
-
@J Yes it's FBD and unfortunately I cannot tell what PLC it is. I was just seeking a general explanation to why one would do this. – norq Oct 16 '12 at 16:46
-
1I don't think there is a general explanation. Different PLC systems will let you do one, both, some variation of, or neither of the above things in a FBD. In each case, the implementation is often a bit different. Could you give a bit more context with this question? – J... Oct 17 '12 at 00:28
-
4"Closed as off topic". PLCs are industrial computers that run the world's factories, and programming them should be a fine topic for SO. None of the closers have any obvious skills with PLC programming based on a short inspection of their bios. Why then do they think they have the skill to judge if this is a programming question, let alone a valid one? – Ira Baxter Jan 05 '13 at 02:30
-
2I second reopening. This is a valid question and there is no reason that PLC programming should be excluded. – Ben Mordecai Jan 06 '13 at 21:01
-
@BenMordecai: Click the "reopen" button above to signify your interest. – Ira Baxter Jan 09 '13 at 03:28
-
@IraBaxter, I don't have that button. Is it hinged on enough reputation? – Ben Mordecai Jan 09 '13 at 03:50
-
@BenMordecai: Ah, yes, it might be. Sorry to dangle a non-opportunity, pleased to hear that there's more than one person that think the SO "moderators" are going too far. – Ira Baxter Jan 09 '13 at 04:33
1 Answers
The "wire" tells you that the boolean value computed by ladder code (AND, OR, ...) on the left, is used on the right. It doesn't cause any "memory" to change. (Your drawing just the wire makes the diagram confusing; you really should show the operators on both ends of the wire.)
The MOVE operator causes the content of one memory location, of any type, to 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 recall if you can do a value coercion (e.g., int to float) also but I'd guess that varied from controller to controller. As a side effect, the MOVE operator copies the input boolean on the left side, to the output boolean on the right; most "block" like operators in ladder logic do this. But that input boolean controls whether the block actually does its action, or not. In your example, you show the MOVE block, but not the critical parameters: the from and to locations; the "wire" feeding it controls whether the move actually happens. So a better move example would be:
---| 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, move nothing, and assign false(from X) to Y." (The boolean value of X is copied through the MOVE block).
Since MOVE will work with any type, you can use MOVE to copy a boolean value in a memory location to another location; just imagine P and Q above being boolean variables. However, boolean conditions and actions work just as well:
---| X |----( Y )---
copies the boolean value of X to the boolean value of Y.
To truly simulate a boolean MOVE command, e.g., "copy boolean P conditionally to Q if X is true" requires some convoluted boolean logic:
--+--| X |----| P |---+--( Y )----
| |
|--| *X |---| Y |---|
where *X means "not X". MOVE is simply easier to "write".

- 93,541
- 22
- 172
- 341
-
4Some implementations don't do this, however. RSLogix is an example - MOV is available in ladder but not in FBD. In FBD the move is implicit and is done by just connecting the input reference to the output reference. While what you have said is true, it can't really answer the OP's question. Either case he presented can be valid or impossible depending on the actual PLC system being used. – J... Oct 17 '12 at 00:20