Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

Close
Important Announcement: WELCOME to the Schneider Electric Community! We have moved to a new address: community.se.com — bookmark it today and contact SchneiderCommunity.Support@se.com if you have any questions!
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
82753members
350531posts

How to read INT64 data type of PM5350 into 3rd party system?

Metering & Power Quality

Collaborate with multiple experts and discuss various topics about Power Meters and Power Quality. From design & implementation to troubleshooting and more, get support from experts and share your experiences by subscribing to the Schneider Electric Exchange forum today.

Solved
yp_yoon_pq-ride
Lieutenant JG
Lieutenant JG
0 Likes
6
922

How to read INT64 data type of PM5350 into 3rd party system?

Hi, All

I have a simple question.

Energy data type of pm5350 are 64bit. Does it have a formula how to read for 64 bit data type?

5344

For example, PM870 has a formula how to read it.

5351


Accepted Solutions
sesa186702
Schneider Alumni (Retired)
Schneider Alumni (Retired)
0 Likes
0
796

Re: How to read INT64 data type of PM5350 into 3rd party system?

There are 02 option for you.

1. If you're using a SCADA with PLC ( M340, Premium, Quantum...) as a Slave and PLS 7.2 is a Master, you can implement this Structure Text code in Unity Pro as below

(* Use register from communication with pm5350 or iEM *)

Word_1 := INT_TO_WORD (INT_1);

Word_2 := INT_TO_WORD (INT_2);

Word_3 := INT_TO_WORD (INT_3);

Word_4 := INT_TO_WORD (INT_4);

(* udint1 is the low parts 64 bits value *)

(* udint2 is the high parts 64 bits value *)

udint_1 := WORD_AS_UDINT (WORD_2, WORD_1);

udint_2 := WORD_AS_UDINT (WORD_4, WORD_3);

real_1:=udint_to_real(udint_2);

real_2:=udint_to_real(udint_1);

(* Energy value from represented as kVh real value *)

real_kWh:= real_2 * 4294967.296 + (real_1 / 1000.0)

2. If you're using SCADA as a Master and Power Meter as Slave ( connect via Gateway or Serial port ), you can implement Cicode as below

REAL FUNCTION

ENERGY(INT E1, INT E2, INT E3, INT E4)

REAL E;

E=(E1)*(2E0) + (E2)*(2E16/1000) + (E3)*(2E32/1000) + (E4)*(2E64/1000);

RETURN E;

END

////tag1,2,3,4 is 4 INT for Energy

FUNCTION CALC_ENERGY()

kwh_power_meter_a=ENERGY(tag 1, tag 2, tag3, tag4);

end

The limit is all will be calculated as Kwh. I think it's accepted

Regards

See Answer In Context

6 Replies 6
sesa186702
Schneider Alumni (Retired)
Schneider Alumni (Retired)
0 Likes
3
796

Re: How to read INT64 data type of PM5350 into 3rd party system?

Dear Yeo-Pyyoung Yoon,

Please refer this article:

By the same way, you can do it by other software...I think it will work

Regards

Hal_Etheridge
Janeway Janeway
Janeway
0 Likes
0
796

Re: How to read INT64 data type of PM5350 into 3rd party system?

For PME modbus devices check out the Mod10k formats.  There are different variants depending on the number of modbus registers used and the byte ordering.

The little endian versions of the 64 bit Mod10k format seems to be missing (it will be added soon) but versions are already available for all other sizes and byte swap variants.

dborle
Lt. Commander
Lt. Commander
0 Likes
0
796

Re: How to read INT64 data type of PM5350 into 3rd party system?

Hi Yeo-Pyoung,

Be careful: INT64 is not the same as MOD10000 is. For INT64 you will have to use 4 registers in sequence to give you one number and for MOD10000 you will have to do a calculation as in your description. For exemple you have 4 consecutive registers containing the following values in HEX (DEC):

Register 0: '0B1A'     (2842)

Register 1: '033A'     (826)

Register 2: '14DD'     (5341)

Register 3: '0001'     (0001)

This gives 153,418,262,842 for a MOD10000 value and '000114DD033A0B1A' HEX or 304,414,451,174,170 DEC for an INT64 value.

Here the examples from MDI (for unsigned values):

MOD10000

5361

And INT64 (big and little endian formats -> depends on the order the registers will have to be interpreted):

5367

5366

I hope, that I could clarify a little bit the difference of these two formats.

Daniel

yp_yoon_pq-ride
Lieutenant JG
Lieutenant JG
0 Likes
1
796

Re: How to read INT64 data type of PM5350 into 3rd party system?


Good day, Dang-Minh Tri.

I can't access link.

5368

Thanks!

sesa186702
Schneider Alumni (Retired)
Schneider Alumni (Retired)
0 Likes
0
797

Re: How to read INT64 data type of PM5350 into 3rd party system?

There are 02 option for you.

1. If you're using a SCADA with PLC ( M340, Premium, Quantum...) as a Slave and PLS 7.2 is a Master, you can implement this Structure Text code in Unity Pro as below

(* Use register from communication with pm5350 or iEM *)

Word_1 := INT_TO_WORD (INT_1);

Word_2 := INT_TO_WORD (INT_2);

Word_3 := INT_TO_WORD (INT_3);

Word_4 := INT_TO_WORD (INT_4);

(* udint1 is the low parts 64 bits value *)

(* udint2 is the high parts 64 bits value *)

udint_1 := WORD_AS_UDINT (WORD_2, WORD_1);

udint_2 := WORD_AS_UDINT (WORD_4, WORD_3);

real_1:=udint_to_real(udint_2);

real_2:=udint_to_real(udint_1);

(* Energy value from represented as kVh real value *)

real_kWh:= real_2 * 4294967.296 + (real_1 / 1000.0)

2. If you're using SCADA as a Master and Power Meter as Slave ( connect via Gateway or Serial port ), you can implement Cicode as below

REAL FUNCTION

ENERGY(INT E1, INT E2, INT E3, INT E4)

REAL E;

E=(E1)*(2E0) + (E2)*(2E16/1000) + (E3)*(2E32/1000) + (E4)*(2E64/1000);

RETURN E;

END

////tag1,2,3,4 is 4 INT for Energy

FUNCTION CALC_ENERGY()

kwh_power_meter_a=ENERGY(tag 1, tag 2, tag3, tag4);

end

The limit is all will be calculated as Kwh. I think it's accepted

Regards

Kamal
Schneider Alumni (Retired)
Schneider Alumni (Retired)

Re: How to read INT64 data type of PM5350 into 3rd party system?

Correct Answer :

Hi Yeo-Pyoung Yoon,

Energy Formula for 64bit INT :

Energy starting register is : 3204

You need to read register 3204 and 3206 in UINT32

Formula :

For  lower 32 bit value =  register value of 3206

For Higher 32 bit value=  register value of 3204

( lower 32bit value )+( Higher 32bit value *4294967296)= Energy in 64bit

This formula is working fine in customer BMS system also.

Kamal Kumar