private void IOControl_Load(object sender, EventArgs e)
        {
            if (m_io == null)
            {
                Close();
                return;
            }

            DIOBase io = (DIOBase)m_io;

            m_io.LoadIOMap(DefPath.IOMap);
            for (int i = 0; i < m_io.GetInputCount(); i++)
            {
                ListViewItem item = new ListViewItem(String.Format("{0}", i));
                item.SubItems.Add(io.ListInputNames[i]);
                item.BackColor = Color.White;
                listView_input.Items.Add(item);
            }

            for (int i = 0; i < m_io.GetOutputCount(); i++)
            {
                ListViewItem item = new ListViewItem(String.Format("{0}", i));
                item.SubItems.Add(io.ListOutputNames[i]);
                item.BackColor = Color.White;
                listView_output.Items.Add(item);
            }
        }
Exemplo n.º 2
0
        public AddSeqIO()
        {
            InitializeComponent();

            m_io = DIOBase.GetInstanceInterface();
            if (m_io != null)
            {
                int outCount = m_io.GetOutputCount();
                for (int i = 0; i < outCount; i++)
                {
                    comboBox_index.Items.Add(i);
                }
                if (outCount > 0)
                {
                    comboBox_index.SelectedIndex = 0;
                }
            }
        }
Exemplo n.º 3
0
        public void StopSequence()
        {
            m_bSeqContinuous = false;
            m_bSequenceLive  = false;
            if (m_mot != null)
            {
                m_mot.AllStop();
            }

            if (m_io != null)
            {
                int outSize = m_io.GetOutputCount();
                for (int i = 0; i < outSize; i++)
                {
                    m_io.WriteOutBit(i, 0U);
                }
            }
        }