Datapoint Assignment
-
Iam a beginner, I have a PLC with several datapoints. I need to bind a datapoint to a angularJS variable. I have tried to use the export id but im not doing something right. ultimately I want to perform some operations on the datapoints before charting them and thats the reason for getting the datapoints into a variable i can work with.
-
Can you explain a little bit more about what do you want to accomplish? Can you share the script?
-
I'm afraid there isnt much script to show as I am just beginning to write it and find I am stopped right away with not knowing how to convert the plc raw datapoint into a useable javascript variable. The main thing is I want to get a raw value from the PLC and then scale it and then chart it. The user will be able to input the max scale of the chart pen and chose the conversion factor among other operations. I figure the answer is right there, im just not seeing it.
-
@dgm There are two ways, enable the api menu item and read up on using the ma-fn component and modify values in real time, or use a meta data source and set the point you want to modify as a context point. Then apply the calculation and return the value.
You can then also run the metapoint history so you have all values. Load this new meta point into your chart.I recently discussed this with another user. I think I'll rewrite a component I had made to do this into a more generic format and will release it on this forum for all to use.
Fox
-
Thanks, I will get on it.