예제 #1
0
        public FormOmronTypeNX1P(PlcOmronTypeNX1PData plcData) : this()
        {
            _plcData              = plcData;
            _plcDriver            = (PlcOmronTypeNX1P)HardwareManage.dicHardwareDriver[_plcData.Name];
            this.panelConfig.Text = plcData.Name;

            ViewInit();
        }
예제 #2
0
        public FormSetValue(PlcOmronTypeNX1P plcDriver, PlcOmronTypeNX1PData plcData, string strItemName)
        {
            InitializeComponent();

            if (plcDriver == null || plcData == null)
            {
                MessageBox.Show("Can not find the plc driver !", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1, MessageBoxOptions.ServiceNotification);
                this.Close();
            }
            if (!plcData.dicScanItems.ContainsKey(strItemName))
            {
                MessageBox.Show("Can not find the item !", "", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1, MessageBoxOptions.ServiceNotification);
                this.Close();
            }

            _plcDriver   = plcDriver;
            _strItemName = strItemName;
            _plcData     = plcData;
        }
예제 #3
0
 public PlcOmronTypeNX1P(PlcOmronTypeNX1PData plcData)
 {
     omronFinsAPI = new OmronFinsAPI();
     this.plcData = plcData;
 }