Exemplo n.º 1
0
        private static void ExportAllTagTables(PlcSoftware plcSoftware)
        {
            PlcTagTableSystemGroup plcTagTableSystemGroup = plcSoftware.TagTableGroup;

            // Export all tables in the system group
            ExportTagTables(plcTagTableSystemGroup.TagTables);
            // Export the tables in underlying user groups
            foreach (PlcTagTableUserGroup userGroup in plcTagTableSystemGroup.Groups)
            {
                ExportUserGroupDeep(userGroup);
            }
        }
Exemplo n.º 2
0
 internal void LoadSubVartabFoldersViaOpennessDlls(TIAVarTabFolder parent, PlcTagTableSystemGroup blockFolder)
 {
     foreach (var e in blockFolder.Groups)
     {
         var fld = new TIAVarTabFolder(this, parent.ControllerFolder)
         {
             TiaPortalItem = e,
             Name          = e.Name,
             Parent        = parent,
         };
         parent.SubItems.Add(fld);
         LoadSubVartabFoldersViaOpennessDlls(fld, e);
     }
 }
Exemplo n.º 3
0
        //Imports tag tables to the tag system group
        private static void ImportTagTable(PlcSoftware plcSoftware)
        {
            try
            {
                PlcTagTableSystemGroup plcTagTableSystemGroup = plcSoftware.TagTableGroup;
                PlcTagTableComposition tagTables = plcTagTableSystemGroup.TagTables;
                string[] files = Directory.GetFiles(@"C:\testTables\", "*", SearchOption.AllDirectories);

                foreach (var file in files)
                {
                    tagTables.Import(new FileInfo(file), ImportOptions.Override);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Chyba: " + ex.Message);
            }
        }