-1.QNaN with compactlogix controller

Mihir_007

Member
Join Date
Apr 2014
Location
ahmedabad
Posts
63
Hi there,

I am fetching some data(basically energy consumption-kWh) from Schneider make power monitor EM7230 over a modbus with CIP generic message instruction from integer to Real data type with COP. Voltage/PF/Current shows good values so far. But the energy consumption reading is showing -1.QNAN. I have read about this QNAN saying it is not a number or invalid number or the number is devided by 0 or kind off....

Can anybody share, how to resolve the same? As I am just copying the data from device to device, and there is no compution in logix regarding this fetch.
 
Hi there,

I am fetching some data(basically energy consumption-kWh) from Schneider make power monitor EM7230 over a modbus with CIP generic message instruction from integer to Real data type with COP. Voltage/PF/Current shows good values so far. But the energy consumption reading is showing -1.QNAN. I have read about this QNAN saying it is not a number or invalid number or the number is devided by 0 or kind off....

Can anybody share, how to resolve the same? As I am just copying the data from device to device, and there is no compution in logix regarding this fetch.


You cannot use COP to convert Integers to Real data-types.


I do not know the power monitor you are using, but would hazard a guess that the V/PF/A figures are Real values being passed in integer data, so using COP to restore a valid real would be possible.


However the "energy consumption" value, since it is a value that could feasibly exceed the constraints of a single integer, may be being passed as a LONG integer, and you may have to devise a way to get it into a REAL.


You need to double-check the data sheets of the power monitor....
 
You cannot use COP to convert Integers to Real data-types.


I do not know the power monitor you are using, but would hazard a guess that the V/PF/A figures are Real values being passed in integer data, so using COP to restore a valid real would be possible.


However the "energy consumption" value, since it is a value that could feasibly exceed the constraints of a single integer, may be being passed as a LONG integer, and you may have to devise a way to get it into a REAL.


You need to double-check the data sheets of the power monitor....


Hi Daba,

Thanks for the response.

I understand what your are saying. Let me explain you in a brief what exactly i am doing..

1. I am fetching a data using CIP Generic MSG with source Length 8 .Both Source and destination tags are INT. Let us say destination tag is "X"
2. Now copying the array of X, into INT tag let us say "Y".
3. Now using COP, Source data as Y(which is INT), and destination data as Z(Which is Real) with length 2, I am getting the desired value in data tag Z.

Hope you understand. :) :)
 
I think the energy registers are actually 5 INT values.
First int is 10^n
Second int is 10^n+3
Third is 10^n+6
And so on

You can set n somewhere on the meter.

Nooo...

Address registers are fixed.
Like....
#126 is for kWh
#128 is KVAH

and for rest of the meters it working in the same way....
o_O
 
Swapping integers - let's say you received the two integers into MyInteger[0] and MyInteger [1] Now in two instructions copy MyInteger[0] to MyInteger[3] then copy MyInteger[1] to MyInteger[2]. Now they are in the opposite order within an array. Of course you can copy to any array you wish. Then, using this example, copy MyInteger[2] to MyReal - with a length of 1.
 
Swapping integers - let's say you received the two integers into MyInteger[0] and MyInteger [1] Now in two instructions copy MyInteger[0] to MyInteger[3] then copy MyInteger[1] to MyInteger[2]. Now they are in the opposite order within an array. Of course you can copy to any array you wish. Then, using this example, copy MyInteger[2] to MyReal - with a length of 1.

Hi,

Tried same. It shows 0.

:confused:
 
Post the contents of the sints before you copy it to a real.

Also, What value does the meter say it should be when you use its keypad and screen?

Are you sure this is the same energy meter as the others and not an updated model as the old one is obsolete?
 

Similar Topics

Hello, I am average in automation, we had power outage in our factory, and one of the conditions on the SCADA was 0 regardless of any change so...
Replies
13
Views
433
Hi All, I have relatively obscure problem with floating point numbers. My setup is a CompactLogix with a Prosoft MVI Modbus TCP Card. The...
Replies
4
Views
14,464
I noticed in a PLC 5/04 program I have a 1.#QNAN as a value for a floating point number. After some Googling I have come to know that QNAN stand...
Replies
6
Views
12,006
We are trying to poll data coming from a PLC for remote monitoring we have the IP address of the PLC and the default port number and the path is...
Replies
25
Views
414
Hi everyone, this is my first time trying to setup encoder counts and track the traveled distance and speed i am using L27ERM QBFC1B processor...
Replies
12
Views
329
Back
Top Bottom