Hi,
I want to be able to disable a datalogger at runtime/via a tag.
Is there a way to do this in a script?
Else is it possible to change the logInterval parameter via scripting?
regards
Hans
disable datalogger
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: disable datalogger
This will disable the datalogger:
Code: Select all
Globals.DataLogger1.IsEnabled = false;
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
-
- Posts: 26
- Joined: Fri Jan 20, 2012 12:55 pm
Re: disable datalogger
I've tried "Globals.DataLogger1.IsEnabled = false;"
but is shows a syntax error with the '='.
but is shows a syntax error with the '='.
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: disable datalogger
That code works on iX Dev 2.0.463. You may not have a datalogger named Datalogger1. Best to consult with a C# programmer that can help you figure out what the error means.
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
-
- Posts: 26
- Joined: Fri Jan 20, 2012 12:55 pm
Re: disable datalogger
With an existing trend "TrendLoggingKort_T2" I tried the following.
namespace Neo.ApplicationFramework.Generated
{
using System.Windows.Forms;
using System;
using System.Drawing;
using Neo.ApplicationFramework.Tools;
using Neo.ApplicationFramework.Common.Graphics.Logic;
using Neo.ApplicationFramework.Controls;
using Neo.ApplicationFramework.Interfaces;
public partial class Logging
{
public void SwitchTrendlogginOff()
{
Globals.TrendLoggingKort_T2.IsEnabled = false;
}
}
}
When compiling I get the message: Property or indexer 'Neo.ApplicationFramework.Tools.Datalogger.IsEnabled' cannot be assigned to -- it is read only.
namespace Neo.ApplicationFramework.Generated
{
using System.Windows.Forms;
using System;
using System.Drawing;
using Neo.ApplicationFramework.Tools;
using Neo.ApplicationFramework.Common.Graphics.Logic;
using Neo.ApplicationFramework.Controls;
using Neo.ApplicationFramework.Interfaces;
public partial class Logging
{
public void SwitchTrendlogginOff()
{
Globals.TrendLoggingKort_T2.IsEnabled = false;
}
}
}
When compiling I get the message: Property or indexer 'Neo.ApplicationFramework.Tools.Datalogger.IsEnabled' cannot be assigned to -- it is read only.