Hey Everyone,
I’ve been working with ignition for a while, and while I’ve gotten some good tips from the forum, I’ve never posted before. I’ll try to be clear on my problem.
We have a DB table that has measurement values for a variable number of channels, e.g.
In the table above there are 5 channels, but there can be more, so that the count goes up to the max number of channels and restarts from the first one.
The EasyChart I’ve set up has a pen configured for each channel (there is a maximum number of possible channels), so even if the channel doesn’t exist in the table there is a pen configured for its possible existence.
Up to now there are no problems, the EasyChart plots all the channels. The problem comes when I try binding the the NAME to the plotted pens. My current configuration uses the Cell Update–> Cell binding so that:
For Channel 0:
Row=0, Column=NAME, Value = Text object 0
For Channel 1:
Row=1, Column=NAME, Value = Text object 1
and so on…
“Text object 0” being a Text Field that is bound to an SQL query that retrieves the channel name from another table based on the channel number. This solution works to a certain extent…
The problem is that after the initial configuration and running a couple of times the Order of the configured pens changes. That is, instead of being:
Pen 0 when channel 0
Pen 1 when channel 1
Pen 2 when channel 2
etc…
It turns into something random like:
Pen 9 when channel 9
Pen 1 when channel 1
Pen 5 when channel 5
etc…
This results in the configured pens getting the wrong channel name. Put in other words, the cell binding dataset has a random pen order when the Cell bindings conserve the right order.
Do you have any suggestions on how to fix this? I tried using a script to sort the dataset but the function is not available in our version of Ignition(7.3.3). Also, if you can think of a better approach to solve this problem it would greatly appreciated…
Although I doubt I can do any changes to the DB, the whole thing is one big mess…
Hope you can help!
-R