.

MPX Structure - Objects

MPX is implemented as a hierarchy of objects. These objects group together related methods (the .NET term for a function) and properties (the .NET term for a variable) to simplify the access to the control.

The Controller

At the top of this hierarchy is the Controller object. This encompasses the motion controller providing methods and properties to start using a SynqNet motion controller and configure quantities affecting the whole controller such as the sample rate. The controller object contains multiple Axis and Motion objects.

The Axis Object

Axis objects represent the drive interfaces (the DAC, encoder, digital inputs, and digital outputs) and the associated software to control the single motor (control algorithm). There is one axis object per set of physical hardware signals.

The Motion Object

Motion objects group single or multiple axes together allowing coordinated motion to be performed on the axes and error conditions to be shared between the axes. The motion objects provide all the methods to start any motion and also methods and properties to monitor and control axes as a group.

The Relationship Between Axis and Motion Objects

Before any motion can be initiated, a motion object has to be instructed which axis or axes it is going to coordinate. The following diagram shows Motion 0 using Axis 0, and Motion 1 using Axis 1 and Axis 2.

The following examples show two different ways to set up the motion controller as shown in the previous diagram.

Visual Basic

' Example 1 
Controller.Motion(0).AxesClear()
Controller.Motion(0).AxisAdd(0)

Controller.Motion(1).AxesClear()
Controller.Motion(1).AxisAdd(1) 
Controller.Motion(1).AxisAdd(2) 

Controller.Motion(2).AxesClear()

' Example 2
Controller.Motion(0).Axes = New Int32() {0}

Controller.Motion(1).AxisAdd(1) = New Int32() {1, 2}

Controller.Motion(2).AxesClear()

C#

// Example 1 
Controller.Motion[0].AxesClear();
Controller.Motion[0].AxisAdd(0);

Controller.Motion[1].AxesClear();
Controller.Motion[1].AxisAdd(1); 
Controller.Motion[1].AxisAdd(2);

Controller.Motion[2].AxesClear();

// Example 2
Controller.Motion[0].Axes = New Int32() {0};

Controller.Motion[1].AxisAdd(1) = New Int32() {1, 2};

Controller.Motion[2].AxesClear();

 

In this example if an error occurs on Axis 1 causing an error state then Motion 1 will propagate this new state to Axis 2. The sharing of state allows automatic actions, such as hardware limits that E-Stop one axis will immediately E-Stop all the other associated axes.

See Also

MPX Software Documentation

 

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering