Dufour.alexandre
Member
Hi guys,
My customer asked to be have only one trend display and then be able to select which pen should appear on it. I found a way using comboboxes and the code supplied by RA on the "KB 51769 Lab".
I created 5 comboboxes with each having every analog values available (26) so he can choose w/e he wants to appear (Datalog model is setup and working fine)
In the trend properties I have the 26 pens assignated to the Datalog model.
As soon as I open the trend display, the comboboxes are cleared and the 26 pens are displayed properly with historical data. The problem comes as soon as I choose pens with a combo box then press "refresh", the display shows the selected pens but restarts the datalogging at 0 so I lose all previously saved points. Then it works fine even if I change the display etc.. until I change pens and refresh again.
The "KB 51769 Lab" code is TechConnect level is I'm not gonna post it all but here's the generic line I use to display the selected pen using the first combobox as example:
If Pen1_ComboBox.Value > " " Then
Trend1.Pens.Add "{" & Pen1_ComboBox.Value & "}", Pen1_ComboBox.Value, "eu", 0, 100, "[Datalog model - LETHS]", False, True
End If
Does anyone know what should I do to prevent the datalogging to stop and restart?
My customer asked to be have only one trend display and then be able to select which pen should appear on it. I found a way using comboboxes and the code supplied by RA on the "KB 51769 Lab".
I created 5 comboboxes with each having every analog values available (26) so he can choose w/e he wants to appear (Datalog model is setup and working fine)
In the trend properties I have the 26 pens assignated to the Datalog model.
As soon as I open the trend display, the comboboxes are cleared and the 26 pens are displayed properly with historical data. The problem comes as soon as I choose pens with a combo box then press "refresh", the display shows the selected pens but restarts the datalogging at 0 so I lose all previously saved points. Then it works fine even if I change the display etc.. until I change pens and refresh again.
The "KB 51769 Lab" code is TechConnect level is I'm not gonna post it all but here's the generic line I use to display the selected pen using the first combobox as example:
If Pen1_ComboBox.Value > " " Then
Trend1.Pens.Add "{" & Pen1_ComboBox.Value & "}", Pen1_ComboBox.Value, "eu", 0, 100, "[Datalog model - LETHS]", False, True
End If
Does anyone know what should I do to prevent the datalogging to stop and restart?