It is currently Fri Aug 01, 2014 4:23 pm




Post new topic Reply to topic  [ 5 posts ] 
 Classic VA Plot 
Author Message
Colonel
Colonel

Joined: Sat Jun 09, 2012 8:02 am
Posts: 140
Post Classic VA Plot
Well i am trying to setup a classic VA plot with the chart control. I have dataset using historical tag with the below settings. I then assigned this dataset to the chart and setup the two axis to numeric. but i am getting now values in the chart. Am i missing something?


Attachments:
dataset settings.PNG
dataset settings.PNG [ 88.49 KiB | Viewed 462 times ]
xy chart.PNG
xy chart.PNG [ 31.18 KiB | Viewed 462 times ]
Mon Jul 16, 2012 4:23 am
Profile
Moderator
Moderator

Joined: Sun Apr 02, 2006 2:46 pm
Posts: 1982
Location: Sacramento, CA
Post Re: Classic VA Plot
Can you post a screenshot of the actual dataset? My guess is the quality of the data is bad or there is no data.

_________________
Travis Cox
Inductive Automation
Technical Support Rep.


Mon Jul 16, 2012 6:23 am
Profile WWW
Colonel
Colonel

Joined: Sat Jun 09, 2012 8:02 am
Posts: 140
Post Re: Classic VA Plot
Dataset is fine. When running the chart as a time base chart it works fine. Also if you copy the data out of dataset into a new dataset and delete the t_stamp column i get the results i would expect. But if you delete the t_stamp column from the dataset linked to the tag history it flases with the correct data but then the t_stamp column gets added back into the dataset.


Attachments:
dataset.PNG
dataset.PNG [ 46.3 KiB | Viewed 428 times ]
Mon Jul 16, 2012 6:52 am
Profile
Colonel
Colonel

Joined: Sat Jun 09, 2012 8:02 am
Posts: 140
Post Re: Classic VA Plot
Travis i was just going to see if you had any ideas on what is going on here or if i need to go about this in a different manner.


Tue Jul 17, 2012 7:06 am
Profile
Moderator
Moderator

Joined: Sun Apr 02, 2006 2:46 pm
Posts: 1982
Location: Sacramento, CA
Post Re: Classic VA Plot
Correct, the tag history binding always adds the t_stamp as the first column. I see what you are trying to do. In this case you have to make a new dataset in scripting since you can't remove the t_stamp column. Do the following:

1) Add a custom property to the root container called origData that is a dataset. Right click and select Customizers > Custom Properties.
2) Bind it to the tag history binding you have right now
3) Right click on the root container and select Event Handlers...
4) Choose the propertyChange event and use code like this:
Code:
if event.propertyName == "origData":
    origData = system.dataset.toPyDataSet(event.newValue)
    newData = []
    for row in origData:
        newData.append([row[1], row[2]])
    event.source.getComponent("Chart").Data = system.dataset.toDataSet(["Col 1 Name", "Col 2 Name"], newData)
Let us know if you have any questions.

_________________
Travis Cox
Inductive Automation
Technical Support Rep.


Tue Jul 17, 2012 7:35 am
Profile WWW
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: