Mov analoge data in RSLogix5000 ..How??

aa2010

Member
Join Date
Oct 2010
Location
PlC
Posts
7
Hello every one..

How can I mov analoge data come from 1756-IF16..in RSLogix5000???

I used mov instruction source (Local:8:i.ch0data)and dest is (tag with real type)...But when the rung is active nothing happens..I also used Dint and int but same thing..

thanks in advance
 
By 'nothing happens' you mean that, when the rung is active the source data and destination data of the MOV command remain different? Could anything else be writing to the destination?

Is the rung inside a subroutine? Is it possible that it isn't being called?
 
thank you for fast reply

I think it is possible that I didn't call subroutine..

So have I use the move instruction in right way?? o_O



best regards
 
Yes. In the MOV command the PLC takes the value at the source location and stores it into the destination in the best way it can. Your MOV of an analog reading would be fine to real, dint and int.

As another example of the use of the MOV command, if the source were a real which had some numbers to the right of the decimal point it would have to remove those (I think by rounding) in order to store it into and integer type location.

The values not changing even though the conditions leading up to the MOV appearing true (highlighted) is a classic example of a subroutine not being called.
 
to complement what bernie has said.....

A-B PLCs, since the year dot, have always taken the stance that MOVing data, (and that includes the destination addresses for ALL math and FAL instruction, will perform whatever data conversion is required to store the "result" in the destination data-table address or Logix5000 tag.This is not the case with some other PLC manufacturers.

So you can mix data types in MOV and Math instructions as you wish.

Bernie mentioned "rounding", which will occur when a floating point or REAL value has to be stored in an integer-type destination.

Prior to the Logix5000 platform, rounding observed the ".5 and greater, round up" rule.

Logix5000 platforms (i.e. ControlLogix, CompactLogix, FlexLogix, SoftLogix, DriveLogix, and GuardLogix), have adopted the "Round to Even" rounding method - a.k.a. "Banker's Algorithm"

When trying to store a value that is nnnn.5 to an integer-type tag, the rounding will take the result to the nearest even integer, not upwards to the next highest integer.

So, a MOV 3.5 Int_Tag will result in Int_Tag becoming 4
but a MOV 4.5 Int_Tag will result in Int_Tag becoming 4 also !

The rationale behind this is that nn.5 is not "nearer" to the whole integer above it or below it, so to always round up is wrong. The Round-to-Even method removes the anomaly produced by the traditional rounding method.
 

Similar Topics

Hello experts. Anyone has any idea how to make BLKMOV execute only once? I have tried with R_TRIG and (P) but it wont write to my location.
Replies
3
Views
207
I've used AOI and User Defined Data Types, but I haven't created one yet. I have a lot of repetitive MOV commands to take a select number of...
Replies
4
Views
394
I'm having to make an AOI to use with a generic ethernet device because the manufacturer does not provide an AOP. I just want to do a sanity check...
Replies
13
Views
1,269
Hello, I'm trying to copy the entire value of a UDT base tag to an element of an array of another UDT containing an element of the first UDT...
Replies
7
Views
1,687
Hi, I would like to move a word to display wind direction. For example: NW, or SE, or ESE in RSLogix 5000, not panelview. I have a wind speed...
Replies
18
Views
5,587
Back
Top Bottom