public Form1() { InitializeComponent(); int iIdx; m_b5000 = true; // set to true for module on ADAM-5000; set to false for module on ADAM-5000/TCP if (m_b5000) { m_iCom = 2; // using COM2 adamCom = new AdamCom(m_iCom); adamCom.Checksum = false; // disbale checksum } else { m_szIP = "172.18.3.179"; adamSocket = new AdamSocket(); adamSocket.SetTimeout(1000, 1000, 1000); // set timeout } m_iAddr = 1; // the slave address is 1 m_iSlot = 0; // the slot index of the module m_iCount = 0; // the counting start from 0 m_bStart = false; m_Adam5000Type = Adam5000Type.Adam5080; // the sample is for ADAM-5080 m_iChTotal = Counter.GetChannelTotal(m_Adam5000Type); for (iIdx = 0; iIdx < m_iChTotal; iIdx++) { cbxChannel.Items.Add(iIdx.ToString()); } txtModule.Text = m_Adam5000Type.ToString(); }
public Form1() { InitializeComponent(); m_b5000 = true; // set to true for module on ADAM-5000; set to false for module on ADAM-5000/TCP if (m_b5000) { m_iCom = 4; // using COM4 adamCom = new AdamCom(m_iCom); adamCom.Checksum = false; // disbale checksum } else { m_szIP = "172.18.3.179"; adamSocket = new AdamSocket(); adamSocket.SetTimeout(1000, 1000, 1000); // set timeout } m_iAddr = 3; // the slave address is 1 m_iSlot = 0; // the slot index of the module m_iCount = 0; // the counting start from 0 m_bStart = false; m_Adam5000Type = Adam5000Type.Adam5017H; // the sample is for ADAM-5017H //m_Adam5000Type = Adam5000Type.Adam5017UH; // the sample is for ADAM-5017UH //m_Adam5000Type = Adam5000Type.Adam5018P; // the sample is for ADAM-5018P m_iChTotal = AnalogInput.GetChannelTotal(m_Adam5000Type); m_byRange = new byte[m_iChTotal]; txtModule.Text = m_Adam5000Type.ToString(); // if (m_Adam5000Type == Adam5000Type.Adam5018P) { chkboxCh7.Visible = false; txtAIValue7.Visible = false; } }
public Form1() { InitializeComponent(); m_b5000 = true; // set to true for module on ADAM-5000; set to false for module on ADAM-5000/TCP if (m_b5000) { m_iCom = 2; // using COM2 adamCom = new AdamCom(m_iCom); adamCom.Checksum = false; // disbale checksum } else { m_szIP = "172.19.1.234"; adamSocket = new AdamSocket(); adamSocket.SetTimeout(1000, 1000, 1000); // set timeout } m_iAddr = 1; // the slave address is 1 m_iSlot = 1; // the slot index of the module m_iCount = 0; // the counting start from 0 m_bStart = false; //m_Adam5000Type = Adam5000Type.Adam5050; // the sample is for ADAM-5050 m_Adam5000Type = Adam5000Type.Adam5051; // the sample is for ADAM-5051 //m_Adam5000Type = Adam5000Type.Adam5052; // the sample is for ADAM-5052 //m_Adam5000Type = Adam5000Type.Adam5055; // the sample is for ADAM-5055 //m_Adam5000Type = Adam5000Type.Adam5056; // the sample is for ADAM-5056 //m_Adam5000Type = Adam5000Type.Adam5060; // the sample is for ADAM-5060 //m_Adam5000Type = Adam5000Type.Adam5068; // the sample is for ADAM-5068 //m_Adam5000Type = Adam5000Type.Adam5069; // the sample is for ADAM-5069 m_iChTotal = DigitalInput.GetChannelTotal(m_Adam5000Type) + DigitalOutput.GetChannelTotal(m_Adam5000Type); txtModule.Text = m_Adam5000Type.ToString(); }
public Form1() { // // Required for Windows Form Designer support // InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // int iIdx; adamCtl = new AdamControl(); m_iSlot = 2; // the slot index of the module m_iCount = 0; // the counting start from 0 m_bStart = false; adamCtl = new AdamControl(); m_Adam5000Type = Adam5000Type.Adam5024; // the sample is for ADAM-5024 m_iChTotal = AnalogOutput.GetChannelTotal(m_Adam5000Type); m_byRange = new byte[m_iChTotal]; for (iIdx = 0; iIdx < m_iChTotal; iIdx++) { cbxChannel.Items.Add(iIdx.ToString()); } txtModule.Text = m_Adam5000Type.ToString(); }
public Form1() { // // Required for Windows Form Designer support // InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // m_iSlot = 1; // the slot index of the module m_iCount = 0; // the counting start from 0 m_bStart = false; adamCtl = new AdamControl(); //m_Adam5000Type = Adam5000Type.Adam5013; // the sample is for ADAM-5013 //m_Adam5000Type = Adam5000Type.Adam5017; // the sample is for ADAM-5017 m_Adam5000Type = Adam5000Type.Adam5018; // the sample is for ADAM-5018 m_iChTotal = AnalogInput.GetChannelTotal(m_Adam5000Type); txtModule.Text = m_Adam5000Type.ToString(); // if (m_Adam5000Type == Adam5000Type.Adam5013) { chkboxCh3.Visible = false; txtAIValue3.Visible = false; chkboxCh4.Visible = false; txtAIValue4.Visible = false; chkboxCh5.Visible = false; txtAIValue5.Visible = false; chkboxCh6.Visible = false; txtAIValue6.Visible = false; chkboxCh7.Visible = false; txtAIValue7.Visible = false; } else if (m_Adam5000Type == Adam5000Type.Adam5018) { chkboxCh7.Visible = false; txtAIValue7.Visible = false; } }
public Form1() { // // Required for Windows Form Designer support // InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // m_iSlot = 4; // the slot index of the module m_iCount = 0; // the counting start from 0 m_bStart = false; adamCtl = new AdamControl(); m_Adam5000Type = Adam5000Type.Adam5017UH; // the sample is for ADAM-5017UH m_iChTotal = AnalogInput.GetChannelTotal(m_Adam5000Type); m_byRange = new byte[m_iChTotal]; txtModule.Text = m_Adam5000Type.ToString(); }