Esempio n. 1
0
 private static object readElementValueFromXmlFile(string opcTagInXmlFile)
 {
     //Value is the value fetched from the XML
     try {
         return(OpcServer.ReadTag(opcServerName, opcTagInXmlFile));
     }
     catch (Exception e) {
         log.ErrorFormat("Tag {0} cannot be read from {1}", opcTagInXmlFile, opcServerName);
         log.ErrorFormat("Error: {0}", e);
         return(null);
     }
 }
Esempio n. 2
0
 public static void ReadFromXmlFileWriteToOpcTag(String agcOpcTag, XmlNode node)
 {
     try
     {
         log.InfoFormat("Writing {0} to {1}", node.InnerText, agcOpcTag);
         OpcServer.WriteTag(opcServerName, agcOpcTag, node.InnerText);
     }
     catch (Exception e)
     {
         log.ErrorFormat("Cannot write {0} to tag {1} cannot be written to {2}", node.InnerText, agcOpcTag, opcServerName);
         log.ErrorFormat("Error: {0}", e);
     }
 }