Jump to content

bwdavis

Members
  • Posts

    5
  • Joined

  • Last visited

bwdavis's Achievements

Newbie

Newbie (1/4)

0

Reputation

  1. Saragani, The suggestion you gave worked perfectly. It is important to note that the setting of PLCFactory.WorkWithXmlInternally = true MUST happen prior to the call to GetPLC. I had tried setting it inside the try block with no success, but as it appears below, it works perfectly on Windows 10 build 1607. Many thanks for your attention. Kind Regards Bruce private void Connect_Click(object sender, EventArgs e) { PLCFactory.WorkWithXmlInternally = true; Ethernet ethernet = new Ethernet("10.10.11.25", 20256, EthProtocol.TCP, 3, 3000); try { plc = PLCFactory.GetPLC(ethernet, 0); // <-- Add boolean so it will build plc.EventAbortCompleted += new PLC.AbortCompletedDelegate(plc_EventAbortCompleted); setButtonsEnableState(true); PlcVersion version = plc.Version; txtModel.Text = version.OPLCModel; txtHW.Text = version.HWVersion; txtOS.Text = version.OSVersion; txtBoot.Text = version.Boot; txtBinLib.Text = version.BinLib; txtFactoryBoot.Text = version.FactoryBoot; try { txtPlcName.Text = plc.PlcName; } catch { } } catch (Exception m) { MessageBox.Show(m.Message); setButtonsEnableState(false); ethernet.Disconnect(); System.Windows.Forms.MessageBox.Show("Could not establish a connection to the PLC"); } }
  2. I will try this when I return to my office March 8th and let you know. Thank you for your help. Bruce
  3. Hi, I'm trying to communicate with a unitronics plc and am using the C# sample code provided by an email from Unitronics, Boston Support as below:
×
×
  • Create New...