Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

Join our "Ask Me About" community webinar on May 20th at 9 AM CET and 5 PM CET to explore cybersecurity and monitoring for Data Center and edge IT. Learn about market trends, cutting-edge technologies, and best practices from industry experts.
Register and secure your Critical IT infrastructure

EGX300 - How to display Float32 measurements in a Custom Page

Gateways and Energy Servers

Schneider Electric support forum to share knowledge about product selection, installation and troubleshooting for EcoStruxure Panel Server, PowerTag, Com'X, Link150…

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • EcoStruxure Power & Grid
  • Gateways and Energy Servers
  • EGX300 - How to display Float32 measurements in a Custom Page
Options
  • Subscribe to RSS Feed
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
Romain_Polette
Spock Romain_Polette Spock
96
Randi_Dolan
Commander Randi_Dolan Commander
46
Guillaume_Evrard
Commander Guillaume_Evrard Commander
41
Thierry_Baudard
Commander Thierry_Baudard Commander
30
View All

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Back to Gateways and Energy Servers
Adrian_Dicea
Janeway Adrian_Dicea Janeway
Janeway

Posted: ‎2015-11-06 07:55 AM

1 Like
0
449
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2015-11-06 07:55 AM

EGX300 - How to display Float32 measurements in a Custom Page

There are several resources describing how to create custom pages to display multiple devices in a same page, how to troubleshoot, how to dynamically display device registers without reloading the whole html page:

FA242825

63230-319-230a1.pdf

examplePLTags.shtml

exampleXMLHTTP.shtml

FA180074

FA273167

What I'm going to show here is not described in any documents up to now.

All the examples are referring to simple measurements of 1 register. This register is converted to a float value using another single register containing the scaling factor.

There are devices which use Float32 measurements, so that takes 2 registers. (1 register means 1 Modbus Register = 1 Holding Register = 16 bits).

So, the JavaScript code has to read 2 consecutive registers for each Float32 value, then it has to use EGX300's embedded JavaScript code to convert each group of 2 Registers into Float32 Data Values.

Here is an example of a static shtml page (refreshed by the meta tag every 2 seconds) that reads 3 values from a PM3255 meter which has Slave Address 14.

<html>

<head>

<meta http-equiv="refresh" content="2">

<title>PM3255 - Slave ID = 14</title>

<script language="javascript" type="text/javascript" src="/realtimedata.js"></script>

</head>

<body style="font-family:Arial" onLoad="updateData();">

        <form name="view_form">

            <table border="1" cellspacing="0" style="width: 600px; marginleft: auto; margin-right:auto">

                <tr>

                    <td colspan="3" style="background-color: #A9A39C; width: 600px; text-align: center; font-weight: bold; font-size: x-large">PM3255 - Slave ID = 14</td>

                </tr>

                <tr>

                    <td style="width: 300px; text-align: center; font-weight: bold;">Frequency</td>

                    <td style="width: 90px; text-align: center" id="frequency"></td>

                    <td style="width: 100px; text-align: center">Hz</td>

                </tr>

                <tr>

                    <td style="width: 300px; text-align: center; font-weight: bold;">Current</td>

                    <td style="width: 90px; text-align: center" id="current"></td>

                    <td style="width: 100px; text-align: center">Amps</td>

                </tr>

                <tr>

                     <td style="width: 300px; text-align: center; font-weight: bold;">Voltage</td>

                     <td style="width: 90px; text-align: center" id="voltage"></td>

                    <td style="width: 100px; text-align: center">Volts</td>

                </tr>

                <tr>

            </table>

        </form>

        <br />

        <hr align="left" width="600px"/>

        <div style="textalign: auto; font-size: small">&copy; 2015 Schneider Electric. All rights reserved.</div>

      

<script type="text/javascript">

function updateData()

{

// Read Registers (this is actually done when the page is served by the EGX300)

Registers =[PL__14^3010,3011,3036,3037,3110,3111__PL];

// Convert each group of 2 Registers into Float32 Data Values

CurrentAvg = ConvertIEE754(Registers[0],Registers[1]);

VoltageAvg = ConvertIEE754(Registers[2],Registers[3]);

Frequency = ConvertIEE754(Registers[4],Registers[5]);

// Put data on the page, formatting the text to fixed number of decimals

document.getElementById("current").innerHTML = CurrentAvg.toFixed(3);

document.getElementById("voltage").innerHTML = VoltageAvg.toFixed(1);

document.getElementById("frequency").innerHTML = Frequency.toFixed();

}

</script>

</body>

</html>

I hope this helps as a starting example for more complex scripts.

______________________________________________________

Created on 6th NOV 2015 by

Adrian Dicea

Global Expert Technical Support Engineer - Support Prime PSE / EGX

Tags (1)
  • Tags:
  • custom pages float32 egx300
Reply
  • All forum topics
  • Previous Topic
  • Next Topic
Replies 0
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

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.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of