Jump to content

¿DTI to Trend or XYTrend or Trend Live?


xXJEQTXx

Recommended Posts

  • 7 months later...

hi e janssens

I don't know what exactly is your needs but I think that you can use the XYTrend where you have 2 tags: data and position; "data" is the value of the curve (Y coordinates) "position" is the quantity of the data that you want show (X coordinates).

so you have to enable the sampling then read the number in the specific rows of the DT then stop to sampling...obviously you have to consider the "functions" and "limits" of XYTrend.

hope that is clear enough...

Link to comment
Share on other sites

I would be interested if there is a way to do this as well though I dont know of a solution myself, specifically whether one can take values from an old data set (FIle or UDTF) and view that information in a graph form. I believe you can load the the DTI from a file (Convert CSV to File or Load DTI from File) and view that data table on screen (Data Table). What I dont know, is whether this can be loaded in a graph format similar to what was suggested using the data sampler and XYTrend to view historical data after it has been saved. 

If simply looking to graph data live on the HMI screen, then I agree, the data sampler definitely is the ay to do this.

Link to comment
Share on other sites

hi tonnerre

maybe I am misunderstanding your mail but let me say that the "source" where you take the information (datas and position) is not so important...at the end you will pass these information at the trend structure that you must create to manage the XYTrend...so...as i wrote...when you star then stop the sampling a file (trend) will be saved...if the file has always the same name it will be overwrite; if the file name change every sampling campain you will be able to navigate in the history....if I well remember...but I have to check...the XYTrend just show all information in the specific space of "one chart"...

Link to comment
Share on other sites

@ORSO2001, sorry, I should have explained my use case in the post above and I dont mean to  hijack the post. Maybe it is similar to what xXJEQTXx is doing. I use data tables to log data and store it to a file rather than the data sampler since I am also recording other information that as far as I know the data sampler cannot record (user name, custom ascii text that the user enters, time and date stamp, etc.) and this based on events (triggers), not time intervals. At the end of the run, it may be useful to look at some of the numerical data (say a pressure, or temperature variation over time).  So I was wondering if it is possible to parse out that data (I can think of some ways to do that) and graph it on an xy graph (unsure if this is possible) since a line graph is easier to review than a long data table.

Link to comment
Share on other sites

Hi @ORSO2001 thanks for your reply, I start trying this way, sampling a DTI file.
I'm designing a smarthome application, reading en storing Active power from a Power sensor and the solar panel energy, steering the loading of the electical car,  boiler, heating system, ...
And to calculate finally the electrical capacity of the power consumption (in Belgium a high elektrical capacity will be charged, I have to pay aboout 160 euro extra yearly and this shall increase the comming years.
To make the historical Active power visible, I tought to visualize the stored DTI's in daily, weekly, monthly and yearly graphs to see the electrical savings resulting from the smarthome functions.

Link to comment
Share on other sites

ya...designed by me...i created two customs controls...one for the month and one for the day...if selected day is "0" i show the monthly info if the day is not "0" i show the daily info; at the CC i pass the info take by the DT...one of these is the MAX value "found" to define what is the Y range...also I decide that if the MAX is less than 10 KW i show the value in Watt ...

yes I can share these...but at the end is not so difficult done these...the most important thing is the "logic" that works "under the wood"...where and how store the data (what is the amount of it?) and when and how "read" the info...

ok...seems that I can't post by the size problem...I will try to post on my own place...

 

 

 

Link to comment
Share on other sites

@Cara Bereck Levy & @Joe Tauser thanks.

so below the Custom Controls about the daily and monthly graph; also the HMI page where I use those.

I don't know if the ladder functions that I use could be helpful...as said I created a struc  with date (string), motor1, motor2 etc and a ID position of the day...this last is from 1 to 6 for the time slots and ID 7 for the TOT of the day....so I will search for the date string and the ID from 1 to 6 for daily; just 7 for the monthly.

if needed I could share alse the LF.

 

Energy.ulhe Energy_Day.uluce Energy_Month.uluce

Link to comment
Share on other sites

Hi @ORSO2001, working with 'meters' was too time consuming having 96 samples in one graph. So I did it with an XY trend, read a DTI data row in a R/W struct and using the bit "force sampling"  to read this struct in the sampling database. 
It worked fine (see the printscreen)

image.jpeg.476ef10b25bd050a43fb60cd8e4fdbd7.jpeg

But now I have, when starting sampling, a black HMI and after reboot the error status -6 on Data Sampling , a new sampling doesn't start, and nothing in the helpfile, nor on the internet, have you an idea what this status means?

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...