Multiple Steppers

Supporting Visual Studio on Windows
meister
Phidgetsian
Posts: 10
Joined: Wed Jan 23, 2013 2:22 pm
Contact:

Multiple Steppers

Postby meister » Tue Mar 17, 2015 11:17 am

I'm having serious issues trying to attach 2 stepper motors to a project at the same time. No matter what i try either one or both motors fail to attach, and end up killing my app.

This is the kind of thing i'm trying:

Code: Select all

public Carriage(iRuncible passedRuncible)
        {
            iRuncible = passedRuncible;
            IOBoard = iRuncible.IOBoard;

            int mySNY = Convert.ToInt32(YMOTORSERIAL);
            int mySNX = Convert.ToInt32(XMOTORSERIAL);

            stepperY = new Stepper();
            stepperY.Attach += new AttachEventHandler(stepperY_Attach);
            stepperY.Detach += new DetachEventHandler(stepperY_Detach);
            stepperY.PositionChange += new StepperPositionChangeEventHandler(stepperY_PositionChange);
            stepperY.open(mySNY);
           
            stepperX = new Stepper();
            stepperX.Attach += new AttachEventHandler(stepperX_Attach);
            stepperX.Detach += new DetachEventHandler(stepperX_Detach);
            stepperX.PositionChange += new StepperPositionChangeEventHandler(stepperX_PositionChange);
            stepperX.open(mySNX);

            LEFT.Load(); //Placeholder plates, not barcode specific
            RIGHT.Load();

        }

Return to “C#.NET”

Who is online

Users browsing this forum: No registered users and 2 guests