FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
02-05-2024 09:50 AM
Is it possible to plot data like Diagrams value y over value x, y(x) Not time based?
In my understanding the trend widget can only plot a value over time. Is their any solution to plot not time based?
Solved! Go to Solution.
02-05-2024 10:10 AM
You can use ChartJS for example: https://demo.smart-hmi.com/chart-demo/
02-06-2024 02:14 PM
Ok i tested it. But i am not able to plot a nice graph.
I like to plot 150 points from PLC. So i have to generate an array to plot? How can i do this in webiq?
For example like this
[300;30]
[310;31]
[320;32]
....150 values
02-06-2024 02:26 PM
WebIQ does not support arrays as a structure, so you need to have each array element addressable as individual item - then you can simply do that. You can simply connect 150 items to the ChartJS widget and choose the line chart.
"But i am not able to plot a nice graph"
What's the error you are facing?
02-06-2024 02:39 PM
i can not plot a nice graph, because this chart does not plot y(x), it only plot x values. So it is not useable for my case.
02-06-2024 02:44 PM
In this case you have to modify the ChartJS widget to implement the desired functionality.
02-07-2024 10:03 AM - edited 02-07-2024 10:05 AM
In our template Template-for-cartesian-handling-systems-V1-20-0 you can find an example, which does this job. (Example of an oscilloscophe) I created a widget, which displays array content recorded/created on PLC side. The PLC code converts the data into JSON, which is interpreted by the WebIQ widget to display the data. Currently the package is only available in our template, but I plan to ship the package in the fourm with example code and documentation in the next weeks.
At the moment read the documentation of the template, which tells you where you find the PLC code. You need the packages: