예제 #1
0
        static void Main(string[] args)
        {
            IO_401 ioUnit = new IO_401();

            ioUnit.canHardwareConnect(0, 125000);

            ioUnit.startupNode(7);

            Thread.Sleep(100000);
        }
        protected void btnRestartSystem_Click(object sender, EventArgs e)
        {
            ioUnit.canHardwareDisconnect();

            ioUnit = null;

            ioUnit = new IO_401();

            ioUnit.canHardwareConnect(0, 125000);

            ioUnit.startupNode(7);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack == true)
            {
                return;
            }

            if (ioUnit == null)
            {
                ioUnit = new IO_401();
            }
            else
            {
                return;
            }

            ioUnit.canHardwareConnect(0, 125000);

            can_monitor = new CanMonitor_NET();

            can_monitor.canHardwareConnect(0, 125000);

            can_monitor.canDispatcherPerformance(5, 5);

            can_monitor.registerCanReceiveCallback((Object)this, new CanReceiveDelegate(canReceiveCallback));

            CanGrid.DataSource = frames;

            ioUnit.startupNode(7);

            receive_pdo = new ReceivePDO_NET();

            receive_pdo.canHardwareConnect(0, 125000);

            receive_pdo.setCobid(0x207);

            receive_pdo.registerReceivePdoMessageCallBack((object)this, receive_pdo_callback);
        }