Jump to content

Advanced web server graphs and Arduino help


Recommended Posts

Hi

I have Unitronics V570 controlling my home's central heating system and I would like to make a webpage, that I can visit on my computer to see values from controller. But the thing is that I want to have a line graph to show temperatures from the past measurements. I have no clue on how to do so, because as far as I understand, you can't get values from data table(which probably will be stored on SD card) to your webpage, you can only get things like MIs and MBs and such. Only way I have figured out to get said graphs is to download data table from controller to computer and then do some magic, but that is not the solution I am looking for.

 

Other question I have is how to connect Arduino board to PLC in a way, that I can get values from PLC's MIs to Arduino.I want to have remote temperature controller in other room with small screen. Can I somehow send serial values from PLC to Arduino or do I need CanBUS module for my Arduino?

 

Thanks in advance.

Link to comment
Share on other sites

Hi,

 

For the graph, it may be do-able but all the magic would have to be down in the HTML.  The controller will only be able to share operands, you would need to write a script to accumulate the values over time and then display them in graph form.

 

For the audrino you can connect to it using RS232 and send information using the FB protocol, CANbus will work as well but serial should be cheaper and easier IMHO.

 

Sounds like a interesting project

  • Upvote 1
Link to comment
Share on other sites

  • 2 weeks later...
  • MVP 2023

Take a look at the Advanced Webserver documentation - the datatable data type is not supported.  You'll have to create an array of MI's and read it from there.  

 

I have looked into displaying a graph on the webpage and Ryan is correct - you'll have to create the graph with javascript code embedded in the webpage itself.

 

Joe T.

  • Upvote 1
Link to comment
Share on other sites

Hi,

 

You can create a link to a file which is on the SD card. Then you can either download or open the file.

In the advacned webserver example there is a link to download PDF file and UDT file. 

can you please send me a link about the advanced webserver example? Cause I can find it anywhere on the Unitronics website

Link to comment
Share on other sites

Hi,

 

For the graph, it may be do-able but all the magic would have to be down in the HTML.  The controller will only be able to share operands, you would need to write a script to accumulate the values over time and then display them in graph form.

 

For the audrino you can connect to it using RS232 and send information using the FB protocol, CANbus will work as well but serial should be cheaper and easier IMHO.

 

Sounds like a interesting project

One comment regarding RS232 and Arduino:

To communicate between Vision and Arduino controllers via serial connection, it is needed to use an RS232 to TTL convertor. You can find more information regarding the differences in the next link: https://www.sparkfun.com/tutorials/215

  • Upvote 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

Where can I find the IP, mask and gateway of my PLC. I have it connected to my network hub but so far I haven't found the right IP by trial and error.

If it is a touch screen PLC do the following:

Press any point on the screen for about 5 seconds. A password screen will pop up --> the default password is 1111. Then press Ethernet and you will be able to see you network properties. 

In non-touch screens, first press the (i) button for more than 5 seconds. The rest is the same...

Link to comment
Share on other sites

Managed to somehow find my IP but now I ran into next problem. My html file needs to have a variable, that is longer than 35 but compiler doesn't allow it.

 

 

Is there no way of using large variables in JavaScript then? I really need that variable to draw that graph.

In general, the compiler doesn't check the Java script code but only the HTML part.

What exactly are you trying to do? 

Link to comment
Share on other sites

I am trying to display a graph on webpage. I use Highgraph libraries to draw it. But highgraph needs a table in javascript to get the information about how graph looks, its labels and its values and such. It works perfectly, when I run it on my computer but if it is displayed by plc it doesn't work.

In general, the compiler doesn't check the Java script code but only the HTML part.

What exactly are you trying to do? 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...