Reputation: 2593
In some Omron plc logic I have a move statement that looks like this
----------
|@Mov(021)
| |
| |
|&110 |
| |
| |
|D5000 |
| |
|(value) |
| |
----------
Confused as to what the @ sign means and the & sign?
The reason i ask is, the value is always 0 , 110 , 120 (numbers) but the only moves i find is 0 and &110 , thanks
Upvotes: 1
Views: 2976
Reputation: 31393
The @
sign (in this case!!! *) indicates a differential instruction. This means the instruction is only executed when the input makes an OFF to ON transition.
Example:
12.34
---| | -------------------| MOV |
| &110 |
| D5000|
For the above, any time 12.34
is ON the decimal value (indicated by &
) 110 will be moved to D5000
. It will be stored as [x006E]
. If you instead used #110
it would be moved as a HEX or BCD value (ie : D5000
would contain [x0110]
- a BCD value of 110 or a decimal value of 272, depending on how it is interpreted)
Consider now
12.34
---| | -------------------| @MOV |
| &110 |
| D5000|
This will only move the value &110
to D5000
on a single PLC scan when 12.34
turns from OFF to ON. If another instruction later writes to D5000
while 12.32
remain ON then the above instruction will not overwrite it except if 12.34
turns OFF again, then back ON. The @
, then, makes the instruction a one-shot instruction - it doesn't work continuously but only once each time the input conditions are fully satisfied.
While different in meaning and implementation, the above rung would work the same as, for example :
12.34
---|↑| -------------------| MOV |
| &110 |
| D5000|
In the above, the 12.34
contact is differential and only turns on for one scan when 12.34
makes an OFF->ON transition. Often, however, you may have more complex input logic such that a differential @MOV
instruction, in place of differential contacts, is more convenient or sensible or even required for the desired behaviour.
If you are finding mystery values in your memory locations you can track down where they come from using the Address Reference Tool in CX-Programmer (View -> Windows -> Address Reference Tool -- or ALT+4). Clicking on the D-Memory location in Ladder will list all rungs where that address is used. This should help you find where it is being written to in your program :
* Be careful with other uses of @ in Omron PLCs - See Here
Upvotes: 1