Metering & Power Quality
Schneider Electric support forum about Power Meters (ION, PowerTag, PowerLogic) and Power Quality from design, implementation to troubleshooting and more.
Posted: 2014-12-01 05:10 PM
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
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
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
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.
Link copied. Please paste this link to share this article on your social media post.
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
And INT64 (big and little endian formats -> depends on the order the registers will have to be interpreted):
I hope, that I could clarify a little bit the difference of these two formats.
Daniel
Posted: 2014-12-03 11:42 PM
Link copied. Please paste this link to share this article on your social media post.
Good day, Dang-Minh Tri.
I can't access link.
Thanks!
Link copied. Please paste this link to share this article on your social media post.
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
Link copied. Please paste this link to share this article on your social media post.
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
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.