IBatchControl

Şablon reçete koleksiyonunu almak için kullanılır.

Şablon reçete koleksiyonunu almak için kullanılır.

Ad alanı: Scada.AddIn.Contracts.BatchControl

Assembly: Scada.AddIn.Contracts (Scada.AddIn.Contracts.dll içinde) Version=16.0.0.0

C#

                  public interface IBatchControl : IRuntimeObject

Şablon reçete koleksiyonunu almak için kullanılır.

OrtamKullanılabilirlik
Engineering StudioKullanılabilir
Service EngineSalt okunur
AdAçıklama
ConfigurationBatch (parti) yapılandırmasını döndürür
Parent
AdAçıklama
GetMasterRecipeCollectionAna reçeteler (MasterRecipes) koleksiyonunu döndürür
GetSelectedControlRecipeIdsSeçili kontrol reçetelerinin kimliklerini (Id) döndürür
GetSelectedMasterRecipeIdsSeçili ana reçetelerin kimliklerini (Id) döndürür
AdAçıklama
ControlRecipePhaseEditedBir kontrol reçetesindeki bir faz düzenlendiğinde tetiklenen olay
ControlRecipeSelectionChangedControl Recipe List (kontrol reçetesi listesi) içindeki seçim değiştiğinde tetiklenen olay
MasterRecipesSelectionChangedMaster Recipe List (ana reçete listesi) içindeki seçim değiştiğinde tetiklenen olay
PhaseCommunicationErrorReceivedBir fazın iletişim hatası durumu değiştiğinde tetiklenen olay
PhaseEscapedBir fazın çıkış (escape) durumu değiştiğinde tetiklenen olay
PhaseExecutionErrorReceivedBir fazda yürütme hatası oluştuğunda (zaman aşımı vb.) tetiklenen olay
PhaseModeChangedBir fazın yürütme modu değiştiğinde tetiklenen olay
PhasePlcErrorReceivedBir fazın PLC hatası durumu değiştiğinde tetiklenen olay
PhaseProgressChangedYürütme sırasında bir fazın iç durumunda önemli bir değişiklik olduğunda tetiklenen olay
PhaseRuntimeEventReceivedBir fazın yürütülmesi sırasında Service Engine olayları tetiklendiğinde tetiklenen olay
PhaseStateChangedBir fazın yürütme durumu değiştiğinde tetiklenen olay
RecipeModeChangedBir reçetenin yürütme modu değiştiğinde tetiklenen olay
RecipeStateChangedBir reçetenin yürütme durumu değiştiğinde tetiklenen olay
C#

                  using System.Diagnostics;
using Scada.AddIn.Contracts;
using Scada.AddIn.Contracts.BatchControl;

namespace Samples
{
    [AddInExtension("BatchControl.BatchControl", "Description", "Samples")]
    public class EditorWizardExtension_BatchControl_BatchControl : IEditorWizardExtension
    {
        public void Run(IEditorApplication context, IBehavior behavior)
        {
            IBatchControl batchControl = context.Workspace.ActiveProject.BatchControl;
            //If changes are made in the batch control it is necessary to enable and accept changes
            batchControl.Configuration.EnableChanges();
            //creating units and phases via API is only possible with Xml Import
            batchControl.Configuration.UnitCollection.ImportFromXml(@"C:\MyUnitCollection.xml");

            //if there is no unit in the project we step out of the function
            if(batchControl.Configuration.UnitCollection == null || batchControl.Configuration.UnitCollection.Count<1)
            {
                return;
            }

            batchControl.Configuration.UnitCollection.DeleteById(0);
            batchControl.Configuration.AcceptChanges();

            IUnitCollection unitCollection = batchControl.Configuration.UnitCollection; 
            foreach(IUnit unit in unitCollection)
            {
                Debug.Print("Unit {0} with Id {1}", unit.Name, unit.Id);
            }
        }
    }
}

Bu bölümdeki konular

Bu sayfa, COPA-DATA zenon 16 çevrimiçi yardımının Türkçe çevirisidir. Menü ve ayar adları, programdaki gibi bulmanız için İngilizce bırakılmıştır.