MPX Software Documentation Home

The MEI ActiveX control (MPX) provides a hierarchy of objects. These objects group together related methods (the ActiveX term for a function) and properties (the ActiveX term for a variable) to simplify the access to the control. See the overview of each object for more details.

Axis | Map
Can | Motion
CanNode | Recorder
Controller | SqNode
Enumerations | SynqNet


MPX Sample Applications

LabView
Sub-VIs
Event Wait
Event Wait From Multiple
Remote Connect

VIs
Settling

Visual Basic
 AxisIo
EventView
Home1
PID Tuner
Recorder1

Visual Basic Script
ControllerInfo
Version


MPX Sample Application: Event Wait

Name: Event Wait

Description:

Similar to LabVIEW's standard Wait on ActiveX Event VI, except this VI returns event information in individual variables rather than packed into an array.

Download

MPX Event Wait.vi


MPX Sample Application: Event Wait From Multiple VIs

Name: Event Wait From Multiple VIs

Description:

Similar to LabVIEW's standard Wait on ActiveX Event From Multiple VI, except this VI returns event information in individual variables rather than packed into an array.

Download

MPX Event Wait From Multiple VIs.vi


MPX Sample Application: MPX Remote Connect

Name: MPX Remote Connect

Description:

This VI allows an MPX control to connect to a controller on a remote computer.

Notes

This VI simplifies diagrams by allowing all connection information to specified in a single function block - normally, one would need to set all connection information through separate ActiveX properties.

Download

MPX Remote Connect.vi


MPX Sample Application: Settling

Name: Settling

Description:

This VI demonstrates how one can use MPX events to track how long it takes an axis to settle at the end of a motion.

Notes

This VI displays a histogram of settling times for a particular axis. The number of histogram intervals may be changed by the user while the VI is executing.

Download

Settling.vi


MPX Sample Application: ControllerInfo

Name: ControllerInfo

Description:

This script displays a variety of information about the controller through a popup window.

Download

ControllerInfo.vbs


MPX Sample Application: Version

Name: Version

Description:

This script displays version information about the controller through a popup window.

Download

Version.vbs


MPX Sample Application: AxisIo

Name: AxisIo

Description:

This application allows a user to view an axis' digital inputs and outputs as well as change the state of the axis' digital outputs.

Download

AxisIo.zip

Includes the following files:
AxisIo.frm
AxisIo.frx
AxisIo.vbp


MPX Sample Application: EventView

Name: EventView

Description:

This application will display all the events generated by a controller.

Notes

This application is useful for diagnostics and as a general MPX example. It is not meant to run for extended periods of time, because it will consume too much system memory in an attempt to keep a full log of events.

Download

EventView.zip

Includes the following files:
EventView.frm
EventView.frx
EventView.vbp


MPX Sample Application: Home1

Name: Home1

Description:

This application shows an example of how to home an axis.

Notes

This application does not contain a general purpose homing routine. It assumes that the home location is located at the rising edge of the home input and requires the user to specify what direction to move the axis.

Download

Home1.zip

Includes the following files:
Home1.frm
Home1.frx
Home1.vbp


MPX Sample Application: PIDTuner

Name: PIDTuner

Description:

This application allows the user to enter PID tuning parameters for an axis.

Download

PIDTuner.zip

Includes the following files:
PIDTuner.frm
PIDTuner.frx
PIDTuner.vbp


MPX Sample Applications: Recorder1

Name: Recorder1

Description:

This application allows a user to view a motor's DAC command and display it to an edit box.

Download

Recorder1.zip

Includes the following files:
Form1.frm
Form1.frx
Project1.vbp
Project1.vbw


MPX Software Concepts

Topics
Flash Memory
Initialization
Objects Structure
Point-to-Point Motion
Position Units
Servo Configuration
Servo Control
Variant Data Types
Velocity Motion
Errors
Synchronized Attributes

Events
 Events Overview
Event Handlers
Event Sequence
Motion Related Events
 Event Descriptions


Errors

When using the methods or properties of MEI's MPX control, many checks are performed on the supplied data, internal configuration, and state of the motion controller. Examples of such errors are, trying to set a read only property such as Motion.State. If any of these checks fail, the MPX control will generate an error. These errors are returned using the conventions of ActiveX controls that allow languages such as Visual Basic to use their native error handling schemes. For example, it is not necessary to check the error codes returned after every call to the MPX control.

Events also report some error conditions that are detected and reported independently of what the host application is doing. The Events section describes these errors in more detail.

When errors are reported an error number is reported along with a brief textual description of the error. You should use the meiError enumeration if you want to test for a specific error, not the actual value, since the numbers used for the error codes may be different with different versions.

See Also

meiError


Amplifier Fault

Description

Every axis has an amplifier fault event which is generated when the drive is in a fault state.

On SynqNet drive nodes this signal is internal to the drive unit and is not available as a physical I/O line, for all other cases the amplifier fault is a dedicated digital input. The sense of the input that generates the amplifier fault is specified by the Axis.AmpFaultInvert property and the Axis.AmpFaultDuration property allows you to change how long the amplifier fault has to be present before the event is generated.

Axis.Status (meiStatusAmpFault) will return TRUE after this event has been generated. Once this event has been generated, it cannot be generated again until a Motion.Reset command has been issued.

Event Info

The following table summarizes the extra event info that is recorded when this event is generated.

Index | Description
0 | Sample Counter
1 | Encoder Position
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |

See Also

Axis Object
 AmpFaultInvert
AmpFaultDuration
Status

Motion Object
Reset


Event Descriptions

Amplifier Fault
Encoder Fault

Home

Negative Hardware Limit
Negative Software Limit

Position Error Limit
Positive Hardware Limit
Positive Software Limit
Power Fail Event


Encoder Fault

Description

The encoder interface on XMP controllers is able to detect several different problems with the connection to the encoder. The Axis.EncoderFaultTrigger property allows the different conditions to be disabled when generating this event. When this event is generated, Axis.EncoderFaultAction specifies which action is automatically performed.

Axis.Status(meiStatusEncoderFault) will return TRUE after this event has been generated. Once this event has been generated it cannot be generated again until a Motion.Reset command has been issued.

Event Info

The following table summarizes the extra event info that is recorded when this event is generated.

Index | Description
0 | Sample Counter
1 | Encoder Position
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |

See Also

Axis Object
 EncoderFaultAction
EncoderFaultTrigger
Status

Motion Object
Reset


Event Handlers

The MPX control provides three event handlers that allow code to be executed when an event has been generated.

  • OnAnyEvent
  • OnErrorEvent
  • OnMotionEvent

All events will call the OnAnyEvent handler, and may call either the OnErrorEvent or OnMotionEvent handlers, depending on the type of event.

For example, the following function created in a Visual Basic program will be executed on every event that is generated on the controller.

Sub Controller_OnAnyEvent(ByVal EventType As MPX.meiEventType,
ByVal Number As Long,
ByVal Info As Variant)

'Any instructions here is executed after an event is generated.
EndSub

The event code receives three arguments that give the type of event that has been generated, the number of the axis or motion object that generated the event and an array of integers. The array of ten extra Info numbers are a set of numbers captured when the original event was detected. The data captured in the Info array is different for each type of event and is described in the description of each event.

The Info array holds data captured when the event was generated. The data captured and copied into this array is different for each type of event as described in that event's documentation.

See Also

Event Descriptions

Controller Object
OnAnyEvent
OnErrorEvent
OnMotionEvent


Home

Description

The home event is designed to be used along with the other commands to create a homing sequence. Each axis has a digital input that is dedicated to being used as a home input.

The home event is generated either by the hardware home input or in response to the hardware capture unit. Axis.HomeSource is used to select which source is used. The sense of the input that generates the home event is specified by the Axis.HomeInvert property. The Axis.HomeDuration property allows you to change how long the home input must be present before the event is generated.

Axis.Status(meiStatusHome) will return TRUE after this event has been generated.

Event Info

The following table summarizes the extra event info that is recorded when this event is generated.

Index | Description
0 | Sample Counter
1 | Encoder Position
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |

See Also

Axis Object
 HomeSource
HomeInvert
HomeDuration
Status


Motion Related Events

Description

There are five motion related events--two generated by the Motion object and three generated by the Axis object:

Event | Object
meiEventTypeAtTarget | Axis
meiEventTypeInCoarsePosition | Axis
meiEventTypeSettled | Axis
meiEventTypeDone | Motion
meiEventTypeAtVelocity | Motion

The event meiEventTypeAtTarget is generated near the end of a move when an axis's command position has stopped changing at the end of a move (when the command position has reached the target position and is no longer changing).

The event meiEventTypeInCoarsePosition is generated the first time the condition is satisfied during a move.

The event, meiEventTypeSettled is generated any time an axis changes from a non-settled state to a settled state. An axis is considered to be settled when:

  • The absolute value of PositionError is less than or equal to TolerancePositionFine
  • The absolute value of ActualVelocity is less than or equal to the ToleranceVelocity
  • Both of the above criteria has been satisfied for the settling time. Whenever either of the above criteria is not satisfied, the Fine Position Status is cleared and the settling timer is reset.

After a move is commanded, the event meiEventTypeSettled is first generated when the motion is complete.

The event meiEventTypeSettled is generated the when all axes associated with a Motion object have finished commanding motion and have settled. If events of type meiEventTypeSettled are enabled, then one can expect an meiEventTypeSettled event to be generated at the same time as a meiEventTypeDone event.

The event meiEventTypeAtVelocity is generated when all axes associated with a Motion object have settled at the final velocity of a velocity move. meiEventTypeAtVelocity can be thought of as "meiEventTypeDone for velocity moves."

See Also


Negative Hardware Limit

Description

Every axis has two digital inputs that are dedicated to being used for hardware over-travel inputs. The motion controller generates the positive and negative hardware limit events independently using these digital inputs and the velocity of the axis.

The negative hardware limit is generated when the digital input detects the over-travel and the command velocity is less than zero for a time specified by Axis.LimitHwNegDuration. The velocity test can be disabled by clearing the Axis.LimitHwNegDirectionSensitive property. When this event is generated Axis.LimitHwNegAction specifies which action is automatically performed.

Axis.Status(meiStatusLimitHwPos) will return TRUE after this event has been generated.

Info Data

The following table summarizes the extra event info that is recorded when this event is generated.

Index | Description
0 | Sample Counter
1 | Encoder Position
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |

See Also

Axis Object
 LimitHwNegDuration
LimitHwNegDirectionSensitive
LimitHwNegAction
Status


Negative Software Limit

Description

Every axis can generate two software limits. These are similar to the hardware limits, but use the position of the axis instead of a physical hardware switch. These limits are used in many situations where hardware switches are not fitted and an end-of-travel needs to be ensured.

A negative software limit is generated when the position for the axis is less than the position threshold set by Axis.LimitSwNeg and the Command Velocity is less than zero for a time specified by Axis.LimitSwNegDuration. The velocity test can be disabled by clearing the Axis.LimitSwNegDirectionSensitive property. When this event is generated, Axis.LimitSwNegAction specifies which action is automatically performed.

Axis.Status(meiStatusLimitSwNeg) will return TRUE after this event has been generated.

Info Data

The following table summarizes the extra event info that is recorded when this event is generated.

Index | Description
0 | Sample Counter
1 | Encoder Position
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |

See Also

Axis Object
 LimitSwNeg
LimitSwNegDuration
LimitSwNegDirectionSensitive
LimitSwNegAction
Status


Events Overview

Events are asynchronous (can be generated at any time, independently of what the main program is doing) conditions that are generated by the firmware executing on the motion controller.

  • Event Sequence
  • Event Handlers

The following table lists all the different type of events that can be generated by a controller:

Event Name | Enumeration | Source | Event Handler | Configurable?
Position Error Limit | meiEventTypeLimitPositionError | Axis | OnErrorEvent | Yes
Positive Hardware Limit | meiEventTypeLimitHwPos | Axis | OnErrorEvent | Yes
Negative Hardware Limit | meiEventTypeLimitHwNeg | Axis | OnErrorEvent | Yes
Positive Software Limit | meiEventTypeLimitSwPos | Axis | OnErrorEvent | Yes
Negative Software Limit | meiEventTypeLimitSwNeg | Axis | OnErrorEvent | Yes
Amplifier Fault | meiEventTypeAmpFault | Axis | OnErrorEvent | Yes
Encoder Fault | meiEventTypeEncoderFault | Axis | OnErrorEvent | Yes
Home | meiEventTypeHome | Axis | OnMotionEvent | Yes
In Coarse Position Tolerance | meiEventTypeInPositionCoarse | Axis | OnMotionEvent | Yes
Axis Settled | meiEventTypeSettled | Axis | OnMotionEvent | Yes
At Target | meiEventTypeAtTarget | Axis | OnMotionEvent | Yes
Motion Done | meiEventTypeDone | Motion | OnMotionEvent | Yes
Axis at Final Velocity | meiEventTypeAtVelocity | Motion | OnMotionEvent | Yes
Supply Voltage Low | meiEventTypePowerFault | Controller | OnAllEvents | Yes

Event Name | Enumeration | Source | Event Handler | Configurable?
Torque Limit | meiEventTypeLimitTorque | Axis | On All Events | No
User Limit 0 | meiEventTypeUserLimit0 | Axis | On All Events | No
User Limit n | meiEventTypeUserLimitn | Axis | On All Events | No
User Limit 15 | meiEventTypeUserLimit15 | Axis | On All Events | No
Frame Event | meiEventTypeFrame | Motion | On All Events | No
Out of Frames | meiEventTypeOutOfFrames | Motion | On All Events | No
Recorder Full | meiEventTypeRecorderFull | Object not accessible by the MPX | On All Events | No
Recorder Done | meiEventTypeRecorderDone | Object not accessible by the MPX | On All Events | No
External Event | meiEventTypeExternal | Object not accessible by the MPX | On All Events | No
SynqNet network is dead | meiEventTypeSynqNetDead | SynqNet | OnErrorEvent | No
SynqNet network data receive error | meiEventTypeSynqNetRxFailure | SynqNet | OnErrorEvent | No
SynqNet network data transmit error | meiEventTypeSynqNetTxFailure | SynqNet | OnErrorEvent | No
SynqNet node failure | meiEventTypeSynqNetNodeFailure | SynqNet | OnErrorEvent | No
SynqNet network recovery | meiEventTypeSynqNetRecovery | SynqNet | OnErrorEvent | No
SynqNet node I/O abort | meiEventTypeSqNodeIoAbort | SqNode | OnErrorEvent | No
SynqNet node disabled | meiEventTypeSqNodeDisable | SqNode | OnErrorEvent | No
SynqNet node alarm | meiEventTypeSqNodeAlarm | SqNode | OnErrorEvent | No
SynqNet node power fault | meiEventTypeSqNodePowerFault | SqNode | OnErrorEvent | No
SynqNet node user fault | meiEventTypeSqNodeUserFault | SqNode | OnErrorEvent | No
SynqNet node failure | meiEventTypeSqNodeFailure | SqNode | OnErrorEvent | No
 | meiEventTypeCanBusState | Can | TBD | No
CAN receive buffer overrun | meiEventTypeCanRxOverrun | Can | OnErrorEvent | No
CAN network emergency | meiEventTypeCanEmergency | Can | OnErrorEvent | No
 | meiEventTypeCanNodeBoot | Can | TBD | No
 | meiEventTypeCanHealth | Can | TBD | No
CAN digital input state has changed | meiEventTypeCanDigitalIn | Can | OnAnyEvent | No
CAN digital output state has changed | meiEventTypeCanDigitalOut | Can | OnAnyEvent | No

See Also


Position Error Limit

Description

The position error event is generated when the absolute value of the position error exceeds the LimitPositionError threshold for a duration set by Axis.LimitPositionErrorDuration. When this event is generated, Axis.LimitPositionErrorAction specifies what action is automatically performed.

Axis.Status(meiStatusLimitPositionError) will return true after this event has been generated. Once this event has been generated, it cannot be generated again until a Motion.Reset command has been issued.

Info Data

The following table summarizes the extra event info that is recorded when this event is generated.

Index | Description
0 | Sample Counter
1 | Encoder Position
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |

See Also

Axis Object
 LimitPositionErrorDuration
LimitPositionErrorAction
Status

Motion Object
Reset


Positive Hardware Limit

Every axis has two digital inputs that are dedicated to being used for hardware over-travel inputs. The motion controller generates the positive and negative hardware limit events independently using these digital inputs and the velocity of the axis.

The positive hardware limit is generated when the digital input detects the over-travel and the command velocity is greater than zero for a time specified by Axis.LimitHwPosDuration. The velocity test can be disabled by clearing the Axis.LimitHwPosDirectionSensitive property. When this event is generated, Axis.LimitHwPosAction specifies which action is automatically performed.

Axis.Status(meiStatusLimitHwPos) will return TRUE after this event has been generated.

Info Data

The following table summarizes the extra event info that is recorded when this event is generated.

Index | Description
0 | Sample Counter
1 | Encoder Position
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |

See Also

Axis Object
 LimitHwPosDuration
LimitHwPosDirectionSensitive
LimitHwPosAction
Status


Positive Software Limit

Description

Every axis can generate two software limits: positive and negative. These are similar to the hardware limits but use the position of the axis instead of a physical hardware switch as one of the triggering conditions. These limits are used in many situations where hardware switches are not fitted and an end-of-travel needs to be ensured.

A positive software limit is generated when the position for the axis exceeds the position threshold set by Axis.LimitSwPos and the Command Velocity is greater than zero for a time specified by Axis.LimitSwPosDuration. The velocity test can be disabled by clearing the Axis.LimitSwPosDirectionSensitive property. When this event is generated, Axis.LimitSwPosAction specifies which action is automatically performed.

Axis.Status(meiStatusLimitSwPos) will return TRUE after this event has been generated.

Info Data

The following table summarizes the extra event info that is recorded when this event is generated.

Index | Description
0 | Sample Counter
1 | Encoder Position
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |

See Also

Axis Object
 LimitSwPos
LimitSwPosDuration
LimitSwPosDirectionSensitive
LimitSwPosAction
Status


Power Fail Event

Description

This event is generated when the power supply monitor on the controller senses that either the +12V or -12V on either the main or any optional expansion cards is less than 10V. These voltages are provided by the backplane and this fault commonly indicates a problem with the host's power supply or the interconnections to the motion controller.

Axis.Status(meiStatusPowerFault) will return TRUE after this event has been generated. Once this event has been generated, it can only be cleared by powering down the controller.

Event Info

The following table summarizes the extra event info that is recorded when this event is generated.

Index | Description
0 | Sample Counter
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |

See Also

Axis Object
 Status


Events Sequence

  1. The motion controller's firmware detects a condition that will trigger an event.
  2. The EventState for this event is immediately set. The event state will remain set until it is cleared. This property can be periodically monitored to know if an event has happened without needing any of the subsequent steps.
  3. If this event has a default action property then the appropriate object will perform the specified default action changing the motion object's state. This allows the motion controller to react to events very quickly without needing to perform any operations on the host.
  4. Each event has an "Event Enable" property. If this enable property is true then the notification of this event is sent to the MPX control. It is common to only enable events that are required in the users application, thereby reducing the processor loading on the host (by not handling unused events). The MPX control will send a message to the host program allowing it to interrupt the task it is currently performing and make the appropriate action.
  5. The MEI's MPX control will call the users OnErrorEvent, OnMotionEvent functions.

See Also


Flash Memory

Every MEI motion controller contains flash memory. Flash memory is a non-volatile (preserves its contents when the power is removed) memory technology that can be reprogrammed without removing it from the controller. The XMP controller family uses the flash memory to store:

  • The firmware that the processor on the motion controller card uses. The configuration of each of the objects.
  • The configuration held in flash is the configuration that each object starts with once the controller is powered on.

The controller methods FirmwareUpload and FirmwareDownload allow the complete firmware image and configuration to be uploaded from or download to a .bin file on the host. This allows the firmware to be changed in the field with needing to physically touch the card.

Each object has a FlashSave method that saves the current configuration of that object to flash memory. After an object's FlashSave method has been called every time the controller powers up or the Controller object's Reset method is executed, the object will have the same configuration as when the FlashSave was originally executed. For example, all an axis objects gains are preserved.

The controller object has the FlashSaveAll method that allows the complete configuration of the controller object and all its axis and motion objects preserved to flash memory.

See Also

Controller Object
FirmwareUpload
FirmwareDownload
FlashSave
FlashSaveAll
Reset

Axis Object
FlashSave

Motion Object
FlashSave


Initialization

The controller properties Type, Number, Address, and Port specify which XMP each controller object addresses. The default controller is controller zero on the local machine.

Where there are multiple motion controller cards in a system, multiple MPX Controller objects would be created to address each of the motion controller cards individually.

When programming using Visual Basic, you are able to modify these properties using the properties list window when you are designing your program. When the Visual Basic program starts to execute the controller automatically, it uses the type, number, address and port properties specified in the properties page to communicate with the controller.

When your program is executing, you are able to modify the Type, Number, Address and Port properties, but these new values will not be used until the Init method is called. For example, the following piece of Visual Basic shows how you would change to using the controller number 1 on the local machine.

Controller.Type = meiControllerTypeLocal
Controller.Number = 1
Controller.Init

See Also

Controller Object
Address
Number
Port
Type
Init


MPX Object Structure

MPX Structure - Objects

MPX is implemented as a hierarchy of objects. These objects group together related methods (the ActiveX term for a function) and properties (the ActiveX 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 an MEI 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 Axes(1) and Axis(2).

The Motion.Axes property is used to specify which axes a motion object uses.

For example, the following two Visual Basic instructions set up the motion controller as shown in the previous diagram.

Controller.Motion(0).Axes = 0
Controller.Motion(1).Axes = Array(1,2)
Controller.Motion(2).Axes = Empty

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


Point-to-Point Motion

Point to point motion will start a move on all the axes mapped to the Motion object from the current command position to a new position. There are three different methods that will start start a point-to-point motion, each taking a different set of arguments and generating different velocity profiles as the axis/axes are moving.

Trapezoidal | The type of motion has a trapezoidal shape for the velocity with constant acceleration and deceleration phases.
SCurve | This type of move has an "S" shape to the acceleration and deceleration phases. This method uses the JerkPercent argument to decide how much of the acceleration and deceleration phases is curved. A JerkPercent of zero produces a trapezoidal profile.
SCurveJerk | This type of move has an "S" shape to the acceleration and deceleration phases. This is the same velocity profile as the SCurve move but this method has arguments to specify the jerk that is to be used during the acceleration and deceleration phases.

Trapezoidal

SCurve

SCurveJerk

The following table summarizes the arguments that each of the methods take. The Position argument is always required, but all the other arguments are optional.

 | Position | Speed | Accel | Decel | JerkPercent | AccelJerk | DecelJerk | Attributes
Trapezoidal | * | x | x | x | . | . | . | x
SCurve | * | x | x | x | x | . | . | x
SCurveJerk | * | x | x | x | . | x | x | x

If an optional argument is omitted then the value used is taken from the corresponding properties starting with Default in either the Axis or Motion objects.

The Attributes argument modifies the default behavior of each of these motions enabling a great many variations of the basic motion to be generated. The Attributes argument does not have a corresponding default property and must be specified for each motion.

For example

Before a motion object can be used for any motion it needs to be mapped to an axis (or axes). This can be done with the following Visual Basic instruction to allow Motion object 0 to use axis 0.

Controller.Motion(0).Axes = 0

Default properties are zero at controller initialization and need to be given values before any motion will start. The following code sets up the default motion parameters for a trapezoidal move. These instructions only need to be issued once, commonly as the Visual Basic program starts, and are used by all the subsequent motion commands.

Controller.Motion(0).DefaultSpeed = 10000
Controller.Motion(0).DefaultAccel = 100000
Controller.Motion(0).DefaultDecel = 100000

The following Visual Basic code will start a trapezoidal move on the axis mapped to motion object 0.

Controller.Motion(0).Trapezoidal 1000

The default motion parameters can be overwritten for specific move using the following type of instruction.

Controller.Motion(0).Trapezoidal 2000, Speed:=20000

The attributes argument can be used to modify the motion, the following command changes the motion to a relative move.

Controller.Motion(0).Trapezoidal 500, _
Attributes=meiMoveAttrRelative

See Also


Position Units

MPX uses the unit of counts as its basic unit of position. A count is the smallest unit of position that can be used and is directly related to the type of encoder interface that is used.

Quadrature Encoders

When standard quadrature encoders are being used, the following diagram shows the relationship between the A and B signals from the encoder and the counts used by the controller. For MEI products, the positive count direction is when A leads B (A rising, B rising, A falling etc.) by default, but this can be reversed using a software flag.

Analog Encoders

An optional add-on module can be fitted to an XMP controller which allows it to interface to analog encoder signals. This is the Sinusoidal / Scale Interpolation module (SIM). For more information please see the SIM4 Application Note.

Analog encoder interfaces are commonly used on linear scales and interferometers, but are also used on some rotary encoders. This type of encoder interface supplies two sinusoidal signals with a phase difference of 90°. With this type of encoder signal, the position count is extracted from the analog signals giving 4096 counts per cycle.


Servo Configuration

All the axes on an MEI motion controller close their servo loops at the same rate. This rate is configured with the SampleRate property.

Two controller properties, AxisCountMax and MotionCountMax, return the maximum number of axes and motion objects that the motion controller can support. In some applications not all the axes or motion objects are required and the number of active axis or motion objects can be reduced. Reducing the number of active objects on a controller reduces the number of control loop computations that need to be performed each servo loop period and can allow the sample rate to be increased.

The controller properties, AxisCount and MotionCount are used to change the number of active servo loops. The controller only uses the axis object 0 to AxisCount -1 and motion objects 0 to MotionCount -1. Trying to use axis or motion objects whose number is greater than or equal to AxisCount or MotionCount will not work correctly.

See Also


Servo Control

Each axis object executes a servo loop at a constant rate. The following diagram represents the calculations being performed in each of these loop periods.

The following steps briefly summarize the sequence of operations that are performed each servo loop period:

  1. The encoder interface calculates the actual position and velocity of the axis using the information captured from the position sensor.
  2. A new command position and velocity is calculated from the trajectory data from a Motion object.
  3. A position error is calculated from the difference between the Command and Actual positions.
  4. A filter algorithm calculates the demand signal that is applied to the drive.

See Also


Synchronized Attributes

The motion of each axis is defined with separate arguments, with individual speeds, accelerations etc. These arguments for the Trapezoidal, SCurve, SCurveJerk, Velocity and VelocityJerk methods now require arrays of speeds etc. specifying the speeds etc. for each axis. If any of these speed, accel etc. arguments are omitted then the default values are read from the DefaultSpeed, DefaultAccel etc. properties of the connected axes.

Use of the meiMoveAttrSyncEnd attribute is not allowed for Velocity and VelocityJerk moves.

Sync Start ‡ | Sync End ‡‡ | Trajectory Parameter Data Types ‡‡‡ | Defaults from | Description
 |  | Double | motion object | A new axis (labeled x' in the diagram below) is defined by the start and end point of the motion. A Cartesian coordinate system is assumed. All trajectory parameters (speed, accel, decel, ...) are used to produce motion on this axis. That is why only one value is needed for each trajectory parameter.
Yes |  | Array of Double | axis objects | All the axes start at the same time.
 | Yes | Array of Double | axis objects | All the axes stop at the same time.
Yes | Yes | Array of Double | axis objects | All the axes start and stop at the same time; the faster axes are slowed down to match the time of the slowest axis. Axes whose motion completes too quickly are slowed down so that all axes will complete their motion at the same time.
 |  |  | ‡ - meiMoveAttrSynqStart ‡‡ - meiMoveAttrSynqEnd ‡‡‡ - include Speed, Accel, Decel, JerkPercent, AccelJerk, and DecelJerk.

Trajectory Examples

Visual Basic Example

The following code will move axes 3 and 4 to position 1000,2000.

Controller1.Motion(3).Axes = Array(3,4)
Controller1.Motion(3).Trapezoidal Array(1000,2000),
Attribues = meiMoveAttrSyncStart


Variant Data Types

The MPX control makes use of the variant data type. Variant data is part of the ActiveX standard and any language that supports ActiveX controls, (including Visual Basic and LabView) also supports the variant data type.

A variable that is defined as variant does not have an predetermined type (integer, double, string). Rather, it adapts as it is being used. Consider a variant variable X defined with:

Dim X

This variable can store any type of data depending on how it is used. The following code snippet shows X first being used as an integer and then as a string.

X = 2
Y = X + 2

X = "MEI"
Text1.Text = X

The MPX control uses variant data to simplify properties and methods. For example, the Motion.Axes property of the motion object is a variant type and can either be a single integer, an array of integers or Empty (a special type indicating that the property contains no data).


Velocity Motion

Velocity motion accelerates the axis/axes to a specified velocity. The axes will continue to move at the specified velocity until a new velocity is commanded (by calling the method again with the meiMoveAttrModify attribute). The move is finished by using the Motion.Stop command.

Velocity | This type of move has an "S" shape to the acceleration phase. This method uses the JerkPercent argument to decide how much of the acceleration phase is curved. A JerkPercent of zero produces a trapezoidal velocity profile.
VelocityJerk | This type of move has an "S" shape to the acceleration phase. This is the same velocity profile as the Velocity move but this method method has arguments to specify the jerk that is to be used during the acceleration phase.

The following table summarizes the arguments that each of the methods take. The Velocity argument is always required but all the other arguments are optional.

 | Velocity | Accel | JerkPercent | AccelJerk | Attributes
Velocity | * | x | x |  | x
VelocityJerk | * | x |  | x | x

If an optional argument is omitted, the value used is taken from the corresponding properties starting with Default in either the Axis or the Motion objects.

The Attributes argument modifies the default behavior of each of these motions enabling a wide range of variations of the basic motion to be generated. The Attributes argument does not have a corresponding default property and must be specified for each motion.

For example

Before a motion object can be used for any motion it must first be mapped to an axis (or axes). This can be done with the following Visual Basic instruction to allow Motion object 0 to use axis 0.

Controller1.Motion(0).Axes = 0

Initially, the default speed, accel etc. are all zero and need to be given values before any motion will start. The following code sets up the default motion parameters for a velocity move. These instructions only need to be issued once, commonly as the Visual Basic program starts, and are used by all the subsequent motion commands.

Controller1.Motion(0).DefaultAccel = 100000
Controller1.Motion(0).JerkPercent = 50

The following Visual Basic code will start a velocity move on the axis mapped to motion object 0.

Controller1.Motion(0).Velocity 1000

The speed can be changed at any time by issuing the command again using the modify attribute. The acceleration and Jerk Percent used for this change in speed are the defaults set up previously.

Controller1.Motion(0).Velocity 500, attributes:=meiMoveAttrModify

The following stop command will bring the axis to a standstill before terminating the velocity motion. The stop command could be used by itself but the Motion.StopTime property would determine the deceleration.

Controller1.Motion(0).Velocity 0, attributes:=meiMoveAttrModify
Controller1.Motion(0).Stop

See Also


Axis Object

The Axis object represents the software responsible for controlling a single physical motor. The following figure shows the functionality that the Axis object performs.

Trajectory / Positions
 | ActualPosition ActualVelocity CommandAccel CommandJerk CommandPosition CommandVelocity PositionError Origin
Filter Algorithm
 | FilterAlgorithm FilterCoeff GainTable
Amplifier Enable
 | AmpEnable AmpEnableInvert *
Capture
 | CaptureArm CaptureEdge CaptureIsGlobalTrigger CapturePosition CaptureReset CaptureSourceEnable CaptureSourceLevel CaptureState CaptureType †
Demand
 | DemandLevel
Default Motion Parameters
 | DefaultAccel DefaultDecel DefaultAccelJerk DefaultDecelJerk DefaultJerkPercent DefaultSpeed

Status
 | Status
Events
 | AmpFaultConfig † EncoderFaultSource † EventEnable EventEnableAll EventEnableNone NodeFailureAction †
Firmware
 | DriveFirmwareDownload †
I/O
 | DigitalIn DigitalOut DigitalOutInvert IoConfig
Monitors
 | Monitor † MonitorLocation † MonitorType †
Motor
 | MotorType StepLoopback* StepPulseWidth*
Encoder
 | SimEnable *
Flash
 | FlashSave

Limits
 | AmpFaultAction AmpFaultDuration AmpFaultInvert EncoderFaultAction EncoderFaultTrigger * HomeAction HomeSource HomeDuration HomeInvert LimitHwNegAction LimitHwNegDirectionSensitive LimitHwNegDuration LimitHwNegInvert LimitHwPosAction LimitHwPosDirectionSensitive LimitHwPosDuration LimitHwPosInvert LimitPositionError LimitPositionErrorAction LimitPositionErrorDuration LimitSwNeg LimitSwNegAction LimitSwNegDirectionSensitive LimitSwNegDuration LimitSwPos LimitSwPosAction LimitSwPosDirectionSensitive LimitSwPosDuration
Settling
 | SettlingTime TolerancePositionCoarse TolerancePositionFine ToleranceVelocity
 | Version
 | DriveFirmwareVer †
 | * - Not supported in SynqNet Phase II. † - Supported only with SynqNet Phase II.


Can Object

A Can object allows the user easy access to the I/O nodes connected to a controller's CANOpen interface. If a controller does not support the CANOpen interface, attempts to access the Can object will result in the occurrence of an meiErrorCanFirmware error.

Network / Bus
 | BitRate BusRate CyclicPeriod HealthPeriod InhibitTime MasterId
Topology
 | NodeCount NodeList RefreshNetwork

Status
 | Clock MsgRate HwOverflow SwOverflow RxErrorCount TxErrorCount
Version
 | BootloaderVersion FirmwareVersion

Events
 | EventsEnable EventsEnableAll EventsEnableNone
Flash
 | FlashSave
Firmware
 | FirmwareDownload FirmwareErase FirmwareUpload
Sub-objects
 | Node CanNode Object Documentation


CanNode Object

A CanNode object represents a CANOpen I/O node and allows the user easy access to the node's input and output states.

I/O

AnalogIn
AnalogOut
DigitalIn
DigitalOut
DigitalInWord
 DigitalOutWord

Node Configuration
 | AnalogInTxType AnalogOutTxType DigitalInTxType DigitalOutTxType
Node Information


Controller Object

Each instance of a Controller object represents a single MEI motion controller card. This object has a number of properties and methods that affect the controller as a whole. The Axis and Motion sub-objects provide the properties and methods used to configure and generate motion on the axes.

Initialization
 | Address Number Port Type Init Reset
Configuration
 | SampleRate AxisCount AxisCountMax CanCount CanCountMax MotionCount MotionCountMax RecoderCount RecorderCountMax SqNodeCount † SqNodeCountMax † SynqNetCount † SynqNetCountMax † FlashSave FlashSaveAll

Actions
 | Abort EStop EStopAbort
Firmware
 | MPIVersion FirmwareVersion FirmwareUpload FirmwareDownload
Enuerations
 | Enum

Events
 | OnAnyEvent OnErrorEvent OnMotionEvent OnRecorderBufferDone
Sub-objects
 | Axis Can Map Motion Recorder SqNode† SynqNet † Axis Object Documentation Can Object Documentation Map Object Documentation Motion Object Documentation Recorder Object Documentation SqNode Object Documentation † SynqNet Object Documentation †
 | † - Supported only with SynqNet Phase II.


Enumerations Home

Enumerations

meiAction
meiAmpFaultSrc
meiCableStatus
meiCanBusState
meiCanNmtState
meiCanNodeHealthType
meiCanTxType
meiCaptureEdge
meiCaptureSource
meiCaptureState
meiControllerType
meiDemand
meiEncoderFaultSrc
meiEncoderFaultTrigger
meiError
meiEventType
meiFilterAlgorithm
meiFilterCoeff
meiHomeSource
meiInput
meiIoConfig
meiMap
meiMotorIo
meiMotorType
meiMoveAttr
meiOutput
meiRecorderMessage
meiSqNodeFpgaType
meiState
meiStatus
meiSynqNetRecoveryMode
meiSynqNetState
meiSqNodeAlarmSrc
meiWordBit

See Also:

Controller.Enum


Map Object

The Map object allows a user to obtain the default data type and controller memory location of commonly used controller variables.

Data Location
String
Data Type
DataType


Motion Object

A motion object is responsible for initiating all motion on any single axis or group of axes. Before any motion can be initiated the motion object has to know which axes it is going to use; the Axes property is used to perform this mapping. This mapping action allows separate motion objects to be created for each of the primary components on a machine, e.g. an X-Y table or an in-feed belt. The motion object is then be used as the primary way of commanding motion to this component within the machine. The second responsibility of the motion object is to allow errors within a group of axes to be propagated between the axes. Motion objects also allow operations to affect all the axes within an axis group. for example is several axes are mapped to a single motion object, if a fault is detected on one axis that aborts the motion on that axis the other axes would also have their motions aborted.

Mapping
 | Axes Refresh
Move
 | Trapezoidal SCurve SCurveJerk Velocity VelocityJerk
Trajectory Information
 | ActualPosition ActualVelocity CommandPosition CommandVelocity PositionError

Amplifier Enable
 | AmpEnable
State
 | State
Actions
 | Reset Abort EStop EStopAbort StopTime EStopTime Stop Resume
Defaults
DefaultSpeed
DefaultAccel
DefaultDecel
DefaultJerkPercent
DefaultAccelJerk
DefaultDecelJerk
Flash
FlashSave
Status
Status
Events


Recorder Object

The Recorder object allows applications to capture a set of data points every sample or every n milliseconds. This allows data to be to be analyzed and/or plotted real-time.

Configuration

PointCount
PointCountMax
PointSource
PointDataType
PointMask

Period

Actions

Start
Stop

AddBuffer
RemoveBuffers

Status
 | Status
Events
 | EventEnable EventEnableAll EventEnableNone

Relevant Sample Applications

Recorder1


SqNode Object

An SqNode object manages a single node connected to a SynqNet network. It contains information about the node, as well as its status and configuration information. It also provides an interface to any drives connected to the node.

During network initialization, SynqNet nodes are discovered and mapped to a SynqNet object. Each node connected to a SynqNet network is assigned a number in the order it is discovered, starting with zero. The node number is used to index the SqNode objects from SynqNet objects.

Network Error Reporting
 | CrcErrorCount FailLimit FaultLimit PacketErrorCount PacketErrorRate Status AlarmSource
Relational Properties
 | AxisCount AxisOffset DriveCount

Version
 | FpgaVersion
Identification
 | Model Name SerialNumber SwitchId UniqueId
Events
EventEnable
EventEnableAll
EventsEnableNone
EventReset

Flash
FlashSave
Fpga


SynqNet Object

A SynqNet object manages a single SynqNet network connected to a motion controller. It contains information about the network state, number of nodes, and network status.

A SynqNet network can have one or more SqNode objects associated with it. The SynqNet network provides read and write access to each node. During network initialization, SynqNet nodes are discovered and mapped to the SynqNet object.

Configuration
 | RecoveryMode
Relational Properties
 | NodeCount
Status
 | Status FailedNodes IdleCable IdleCableStatus

State
 | State
Initialization
 | Init Shutdown
Topology
 | TopologyClear TopologySave

Events
 | EventEnable EventEnableAll EventEnableNone EventReset
Flash
 | FlashSave


Axis.AmpEnable

Description

The state of the axis' amplifier enable output. AmpEnable is also changed indirectly by the an Abort call from a Motion object or an Abort action in response to an event.

This property cannot be saved to flash memory.

Type

Boolean

AmpEnable | Description
False | Axis' amplifier is not enabled
True | Axis' amplifier is enabled

Visual Basic Example

Controller.Axis(0).AmpEnable = True

x = Controller.Axis(0).AmpEnable

Syntax

Visual Basic

Property AmpEnable As Boolean
IDL Interface

[propget] HRESULT AmpEnable([out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT AmpEnable([in] VARIANT_BOOL newVal)

See Also

AmpEnableInvert


Axis.AmpEnableInvert

Description

Determines whether the controller should invert the logic of the amplifier enable output signal.

AmpEnableInvert | Meaning
False | Normal
True | Inverted

Type

Boolean

Visual Basic Example

x = Controller.Axis(0).AmpEnableInvert

Controller.Axis(0).AmpEnableInvert = True

Syntax

Visual Basic

AmpEnableInvert As Boolean
IDL Interface

[propget] HRESULT AmpEnableInvert([out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT AmpEnableInvert([in] VARIANT_BOOL newVal)

See Also

AmpEnable


Axis.CaptureArm

Description

Specifies whether the axis is ready to capture an encoder position.

This property cannot be saved to flash memory.

For more information about position captures, refer to the Position Capture section of the Encoder Inputs page. See below for link.

Arguments

Argument | Description | Default Value
captureNumber | The number of the capture whose arm state is accessed | 0

Type

Boolean

Visual Basic Example

Controller.Axis(0).CaptureArm Syntax

Syntax

Visual Basic

Property CaptureArm(captureNumber As Long = 0) As Boolean
IDL Interface

HRESULT CaptureArm([in, defaultvalue(0)] long captureNumber,
[out, defaultvalue(0)] VARIANT_BOOL *pVal)

HRESULT CaptureArm([in] boolean newVal,
[in, defaultvalue(0)] long captureNumber)

See Also

CaptureState

Encoder Inputs: Postion Capture


Axis.CaptureEdge

Description

Sets the the edge of the capture trigger state on which the capture engine will record the encoder position. See diagram below.

Arguments

Argument | Description | Default Value
captureNumber | The number of the capture to be accessed. | 0

Type

meiCaptureEdge

Visual Basic Example

Controller.Axis(0).CaptureEdge = meiCaptureEdgeRising

Syntax

Visual Basic

Property CaptureEdge(captureNumber As Long = 0) As meiCaptureEdgeRising
IDL Interface

[propget] HRESULT CaptureEdge([in, defaultvalue(0)] long captureNumber,
[out, retval] meiCaptureEdge *pVal)

[propput] HRESULT CaptureEdge([in, defaultvalue(0)] long captureNumber,
[in] meiCaptureEdge newVal)

See Also


Axis.CaptureIsGlobalTrigger

Description

Determines whether the global trigger bit is determined from the capture trigger state. See diagram below.

Arguments

Argument | Description | Default Value
captureNumber | The number of the capture to be accessed | 0

Type

Boolean

Visual Basic Example

Controller.Axis(0).CaptureIsGlobalTrigger = True

Syntax

Visual Basic

Property CaptureEdge(captureNumber As Long = 0) As Boolean
IDL Interface

[propget] HRESULT CaptureIsGlobalTrigger([in, defaultvalue(0)] long captureNumber,
[out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT CaptureIsGlobalTrigger([in, defaultvalue(0)] long captureNumber,
[in] VARIANT_BOOL newVal)

See Also

CaptureReset


Axis.CapturePosition

Description

The encoder position value that was captured when the axis' position capture conditions were met. The captured encoder position can be used in conjunction with the Origin property to:

  • set a the zero position (home position)
  • calculate the ActualPosition value corresponding to the captured encoder position

This property cannot be saved to flash memory.

For more information about position captures, refer to the Position Capture section of the Encoder Inputs page. See below for link.

Arguments

Argument | Description | Default Value
captureNumber | The number of the capture whose position is to be read | 0

Type

Double (read only)

Visual Basic Example

x = Controller.Axis(0).CapturePosition

Syntax

Visual Basic

Property CapturePosition(captureNumber As Long = 0) As Double
IDL Interface

[propget] HRESULT CapturePosition([in, defaultvalue(0)]long captureNumber,
[out, retval] double *pVal)

See Also

CaptureState
Origin

Encoder Inputs: Postion Capture


Axis.CaptureReset

Description

CaptureReset perfoms the following:

  • Disarms the capture
  • If enabled, disables the triggering of the global trigger bit
  • Sets all capture source levels to false
  • Disables all capture sources
  • Sets the capture edge to meiCaptureEdgeRising

Arguments

Argument | Description | Default Value
captureNumber | The number of the capture to be reset. | 0

Visual Basic Example

Controller.Axis(0).CaptureReset

Syntax

Visual Basic

CaptureReset(captureNumber As Long = 0)
IDL Interface

HRESULT CaptureReset([in, defaultvalue(0)] long captureNumber)

See Also


Axis.CaptureSourceEnable

Description

Enables or disables a particular capture source. See diagram below.

Arguments

Argument | Description | Default Value
meiCaptureSource | The capture source to be accessed. | N/A
captureNumber | The number of the capture to be accessed | 0

Type

Boolean

Visual Basic Example

Controller.Axis(0).CaptureSourceEnable(meiCaptureSourceHome) = True

Syntax

Visual Basic

Property CaptureEdge(meiCaptureSource source, captureNumber As Long = 0) As Boolean
IDL Interface

[propget] HRESULT CaptureSourceEnable([in] meiCaptureSource source,
[in, defaultvalue(0)] long captureNumber,
[out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT CaptureSourceEnable([in] meiCaptureSource source,
[in, defaultvalue(0)] long captureNumber,
[in] VARIANT_BOOL newVal)

See Also

meiCaptureSource


Axis.CaptureSourceLevel

Description

Sets the level a particular capture source contributes to the capture trigger state. See diagram below.

Arguments

Argument | Description | Default Value
meiCaptureSource | The capture source to be accessed. | N/A
captureNumber | The number of the capture to be accessed. | 0

Type

Boolean

Visual Basic Example

Controller.Axis(0).CaptureSourceLevel(meiCaptureSourceHome) = True

Syntax

Visual Basic

Property CaptureEdge(meiCaptureSource source, captureNumber As Long = 0) As Boolean
IDL Interface

[propget] HRESULT CaptureSourceLevel([in] meiCaptureSource source,
[in, defaultvalue(0)] long captureNumber,
[out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT CaptureSourceLevel([in] meiCaptureSource source,
[in, defaultvalue(0)] long captureNumber,
[in] VARIANT_BOOL newVal)

See Also


Axis.CaptureState

Description

The state of an axis' position capture engine.

This property cannot be saved to flash memory.

For more information about position captures, refer to the Position Capture section of the Encoder Inputs page. See below for link.

Arguments

Argument | Description | Default Value
captureNumber | The capture number whose state is to be read | 0

Type

meiCaptureState (read only)

Visual Basic Example

x = Controller.Axis(0).CaptureState
axis.CaptureState = x

Syntax

Visual Basic

Property CaptureState(captureNumber As Long = 0) As meiCaptureState

IDL Interface

[propget] HRESULT CaptureState([in, defaultvalue(0)] long captureNumber,
[out, retval] meiCaptureState *pVal)

See Also

CaptureArm
meiCaptureState

Encoder Inputs: Postion Capture


Axis.CaptureType

Description

The method of high-speed position capture that an Axis object uses to capture position. The capture type specifies whether the position-based capture engine or time-based capture engine is to be used.

NOTE: Position-based capture is more accurate for quadrature feedback. Time-based is more accurate for absolute or serial encoders.

Type

meiCaptureType

Visual Basic Example

x = Controller.Can(0).Node(5).CaptureType

Syntax

Visual Basic

Property CaptureType As meiCaptureType
IDL Interface

[propget] HRESULT CaptureType([out, retval] meiCaptureType *pVal)

[propput] HRESULT CaptureType([in] meiCaptureType newVal)

See Also

CaptureArm
CaptureEdge
CaptureIsGlobalTrigger
CapturePosition
CaptureReset
CaptureSourceEnable
CaptureSourceLevel
CaptureState

meiCaptureType


Axis.DefaultAccel

Description

The default acceleration for an axis during synchronized moves.

This property cannot be saved to flash memory.

Units

counts/sec2

Type

Double

Default

0.0

Visual Basic Example

Controller.Axis(0).DefaultAccel = 50000.0

Syntax

Visual Basic

Property DefaultAccel As Double
IDL Interface

[propget] HRESULT DefaultAccel([out, retval] double *pVal)

[propput] HRESULT DefaultAccel([in] double newVal)

See Also

Motion Object:
SCurve
SCurveJerk
Trapezoidal
Velocity
VelocityJerk

Axis Object:
DefaultSpeed
DefaultDecel
DefaultJerkPercent
DefaultAccelJerk
DefaultDecelJerk


Axis.DefaultAccelJerk

Description

The default acceleration jerk for an axis during synchronized SCurveJerk and VelocityJerk moves.

This property cannot be saved to flash memory.

Units

counts/sec3

Type

Double

Default

0.0

Visual Basic Example

Controller.Axis(0).DefaultAccelJerk = 50000.0

Syntax

Visual Basic

Property DefaultAccelJerk As Double
IDL Interface

[propget] HRESULT DefaultAccelJerk([out, retval] double *pVal)

[propput] HRESULT DefaultAccelJerk([in] double newVal)

See Also

Axis Object:
DefaultSpeed
DefaultAccel
DefaultDecel
DefaultJerkPercent
DefaultDecelJerk

Motion Object:
SCurveJerk
VelocityJerk


Axis.DefaultDecel

Description

The default deceleration for an axis during synchronized Trapezoidal, SCurve, and SCurveJerk moves.

This property cannot be saved to flash memory.

Units

counts/sec2

Type

Double

Default

0.0

Visual Basic Example

Controller.Axis(0).DefaultDecel = 50000.0

Syntax

Visual Basic

Property DefaultDecel As Double
IDL Interface

[propget] HRESULT DefaultDecel([out, retval] double *pVal)

[propput] HRESULT DefaultDecel([in] double newVal)

See Also

Axis Object:
DefaultSpeed
DefaultAccel
DefaultJerkPercent
DefaultAccelJerk
DefaultDecelJerk

Motion Object:
SCurve
SCurveJerk
Trapezoidal


Axis.DefaultDecelJerk

Description

The default deceleration jerk for an axis during synchronized SCurveJerk moves.

This property cannot be saved to flash memory.

Units

counts/sec3

Type

Double

Default

0.0

Visual Basic Example

Controller.Axis(0).DefaultDecelJerk = 50000.0

Syntax

Visual Basic

Property EncoderFaultTrigger(trigger As meiEncoderFaultTrigger) As Boolean
IDL Interface

[propget] HRESULT EncoderFaultTrigger([in] meiEncoderFaultTrigger trigger,
[out, retval] bool *pVal)

[propput] HRESULT EncoderFaultTrigger([in] meiEncoderFaultTrigger trigger,
[in] bool newVal)

See Also

Axis Object:
DefaultSpeed
DefaultAccel
DefaultDecel
DefaultJerkPercent
DefaultAccelJerk

Motion Object:
SCurveJerk


Axis.DefaultJerkPercent

Description

The default jerk percent for an axis during synchronized SCurve and Velocity moves. The valid range for DefaultJerkPercent is [0, 100].

This property cannot be saved to flash memory.

Type

Double

Default

0.0

Visual Basic Example

Controller.Axis(0).DefaultJerkPercent = 50.0

Syntax

Visual Basic

Property DefaultJerkPercent As Double
IDL Interface

[propget] HRESULT DefaultJerkPercent([out, retval] double *pVal)

[propput] HRESULT DefaultJerkPercent([in] double newVal)

See Also

Axis Object:
DefaultSpeed
DefaultAccel
DefaultDecel
DefaultAccelJerk
DefaultDecelJerk

Motion Object:
SCurve
Velocity


Axis.DefaultSpeed

Description

The default maximum speed for an axis during single axis and synchronized Trapezoidal, SCurve, and SCurveJerk moves.

This property cannot be saved to flash memory.

Units

counts/sec

Type

Double

Default

0.0

Visual Basic Example

Controller.Axis(0).DefaultSpeed = 5000.0

Syntax

Visual Basic

Property EncoderFaultTrigger(trigger As meiEncoderFaultTrigger) As Boolean
IDL Interface

[propget] HRESULT EncoderFaultTrigger([in] meiEncoderFaultTrigger trigger,
[out, retval] bool *pVal)

[propput] HRESULT EncoderFaultTrigger([in] meiEncoderFaultTrigger trigger,
[in] bool newVal)

See Also

Axis Object:
DefaultAccel
DefaultDecel
DefaultJerkPercent
DefaultAccelJerk
DefaultDecelJerk

Motion Object:
SCurve
SCurveJerk
Trapezoidal


Axis.DemandLevel

Description

The range of the demand output is [-32768, 32767].

This property cannot be saved to flash memory.

Units

1/3276.8 Volt for analog controllers.

Arguments

Argument | Type | Description
demand | meiDemand | The demand output to reset

Type

Double (read only)

Sample Code

x = Controller.Axis(0).DemandLevel

Syntax

Visual Basic

Property DemandLevel(demand = meiDemandOutput As meiDemand) As Double
IDL Interface

[propget] HRESULT DemandLevel(
[in, defaultvalue(meiDemandOutput)] meiDemand demand,
[out, retval] double *pVal)

See Also

meiDemand


Axis.SimEnable

Description

Specifies whether the Sim4 (an optional sinusoidal interpolation module for encoders) is enabled. When a Sim module is enabled, the encoder position is determined from the Sim module, not the controller's quadrature decoder.

Please refer to the SIM4 Application Note for more information on the operation of a SIM4 module.

Type

Boolean

Visual Basic Example

' Enable Sim Module
Controller.Axis(0).SimEnable = True

Syntax

Visual Basic

Property SimEnable As Boolean
IDL Interface

[propget] HRESULT SimEnable([out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT SimEnable([in] VARIANT_BOOL pVal)

See Also

SIM4 Application Note


Axis.AmpFaultConfig

Description

This property determines what inputs will contribute to the amplifier fault state of axis. If any input bit is active, the amp fault state will be set to active. Supported fault bits are node/drive-specific. During SynqNet network initialization, Axis.AmpFaultConfig is automatically configured based on the node type. See the node/drive manufacturer's documentation for details.

NOTE: This feature is only available for SynqNet controllers.

Arguments

Argument | Type | Description
Source | meiAmpFaultSrc | The source whose contribution to the amplifier fault state is to be accessed.

Type

Boolean

Visual Basic Example

' Have the drive fault state contribute to the state of the ampfilier Controller.Axis(0).AmpFaultConfig(meiAmpFaultSrcDrive) = True

Syntax

Visual Basic

Property AmpFaultConfig(source As meiAmpFaultSrc) As Boolean
IDL Interface

[propget] HRESULT AmpFaultConfig([in] meiAmpFaultSrc source,
[out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT AmpFaultConfig([in] meiAmpFaultSrc source,
[in] VARIANT_BOOL newVal)

See Also

Node Faults Diagram


Axis.EncoderFaultSource

Description

The source of encoder faults. Encoder faults are associated with either a single encoder or multiple encoders.

NOTE: The way encoder faults are reported has changed from analog and SynqNet Phase I XMP controllers and SynqNet Phase II XMP controllers. Axis.EncoderFaultSrc is only implemented for SynqNet Phase II. The corresponding analog and SynqNet Phase I property is EncoderFaultTrigger and is not implemented for SynqNet Phase II.

Type

meiEncoderFaultSrc

Visual Basic Example

x = Controller.Axis(0).EncoderFaultSource

Syntax

Visual Basic

Property EncoderFaultSource As meiEncoderFaultSrc
IDL Interface

[propget] HRESULT EncoderFaultSource([out, retval] meiEncoderFaultSrc *pVal)

[propput] HRESULT EncoderFaultSource([in] meiEncoderFaultSrc newVal)

See Also

EncoderFaultAction
EncoderFaultTrigger

meiEncoderFaultSrc


Axis.EventEnable

Description

Enables or disables any of the events that are generated by the axis object from being reported to the host. Please refer to the events overview section for a list of events generated by the axis object.

Arguments

Argument | Type | Description
eventType | meiEventType | The type of event to be accessed

Type

Boolean

Visual Basic Example

Controller.Axis(0).EventEnable(meiEventTypeLimitHwPos) = True

Syntax

Visual Basic

Property EventEnable(eventType As meiEventType) As Boolean
IDL Interface

[propget] HRESULT EventEnable([in] meiEventType eventType,
[out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT EventEnable([in] meiEventType eventType,
[in] VARIANT_BOOL newVal)

See Also


Axis.EventEnableAll

Description

Enables reporting of all events generated by the axis object to the host. Please refer to the events overview section for a list of events generated by the axis object.

Visual Basic Example

Controller.Axis(0).EventEnableAll

Syntax

Visual Basic

Sub EventEnableAll
IDL Interface

HRESULT EventEnableAll()

See Also

EventEnable
EventEnableNone

meiEventType

Events Overview


Axis.EventEnableNone

Description

Disables reporting of all events generated by the axis object to the host. Please refer to the events overview section for a list of events generated by the axis object.

Visual Basic Example

Controller.Axis(0).EventEnableNone

Syntax

Visual Basic

Sub EventEnableNone
IDL Interface

HRESULT EventEnableNone()

See Also

EventEnable
EventEnableAll

meiEventType

Events Overview


Axis.NodeFailureAction

Description

The action to be taken when the SynqNet node associated with the Axis object fails.

Type

meiAction

Visual Basic Example

Controller.Axis(0).NodeFailureAction = meiActionAbort

Syntax

Visual Basic

Property NodeFailureAction As meiAction
IDL Interface

[propget] HRESULT NodeFailureAction([out, retval] meiAction *pVal)

[propput] HRESULT NodeFailureAction([in] meiAction newVal)

See Also

meiAction


Axis.FilterAlgorithm

Description

The servo filter algorithm of an axis. Servo filter algorithms require a number of user specified parameters. Systems must be tuned to find the proper parameters for a particular algorithm. Please refer to the Servo Algorithm Overview and Tuning Guides for more information.

Value | Description
meiFilterAlgorithmNone | No control algorithm. Can use with stepper motors.
meiFilterAlgorithmPID | PID algorithm
meiFilterAlgorithmPIV | PIV algorithm
meiFilterAlgorithmUser | User algorithm implemented with the Firmware Development Kit

Type

meiFilterAlgorithm

Visual Basic Example

Controller.Axis(0).FilterAlgorithm = meiFilterAlgorithmPID

x = Controller.Axis(0).FilterAlgorithm

Syntax

Visual Basic

Property FilterAlgorithm As meiFilterAlgorithm
IDL Interface

[propget] HRESULT FilterAlgorithm([out, retval] meiFilterAlgorithm *pVal)

[propput] HRESULT FilterAlgorithm([in] meiFilterAlgorithm newVal)

See Also

FilterCoeff
GainTable

meiFilterAlgorithm

XMP Servo Algorithms


Axis.FilterCoeff

Description

Specifies the value for a particular control algorithm coefficient of an axis. Systems must be tuned to find the proper parameters for a particular algorithm. Please refer to the Servo Algorithm Overview and Tuning Guides for more information.

Arguments

Argument | Type | Description
coeff | meiFilterCoeff | The algorithm coefficient to be accessed
gainTable | Long | The gain table of the coefficient to be accessed

Type

Double

Visual Basic Example

x = Controller.Axis(0).FilterCoeff(meiFilterCoeffPidKp)

Controller.Axis(0).FilterCoeff(meiFilterCoeffPidKp) = x

Syntax

Visual Basic

Property FilterCoeff(coeff As meiFilterCoeff,
gainTable As Long = 0) As Double

IDL Interface

[propget] HRESULT FilterCoeff([in] meiFilterCoeff coeff,
[in, defaultvalue(0)] long gainTable,
[out, retval] double *pVal)

[propput] HRESULT FilterCoeff([in] meiFilterCoeff coeff,
[in] double newVal,
[in, defaultvalue(0)] long gainTable)

See Also

FilterAlgorithm
GainTable

meiFilterCoeff

XMP Servo Algorithms


Axis.GainTable

Description

Specifies the table of gains to be used by the PID and PIV filter algorithm. Please refer to the Servo Algorithm Overview and Tuning Guides for more information.

Type

Long

Visual Basic Example

oldTable = Controller.Axis(0).GainTable

Controller.Axis(0).GainTable = newTable

Syntax

Visual Basic

Property GainTable As Long
IDL Interface

[propget] HRESULT GainTable([out, retval] long *pVal)

[propput] HRESULT GainTable([in] long newVal)

See Also

FilterAlgorithm
FilterCoeff

XMP Servo Algorithms

Tuning Overview


Axis.DriveFirmwareDownload

Description

Downloads firmware to the drive interface of a SynqNet node that is associated with the Axis object. If there is no SynqNet node associated with the Axis object, accessing this property will produce an meiErrorAxisNotMappedToSqNode error.

NOTE: Some SynqNet nodes also allow firmware to be downloaded to the node interface. The method SqNode.FpgaDownload performs this functionality.

Arguments

Argument | String | Description
filename | String | The name of the file which contains the firmware image to be downloaded.

Visual Basic Example

Controller.Axis(0).DriveFirmwareDownload "nodeFirmware.bin"

Syntax

Visual Basic

Sub DriveFirmwareDownload(fileName As String)
IDL Interface

HRESULT DriveFirmwareDownload([in] BSTR fileName)

See Also

SqNode.FpgaDownload

SynqNet Overview


Axis.FlashSave

Description

Saves the current axis object settings to flash memory. This configuration will be loaded onto the controller during the next power up or controller reset.

Visual Basic Example

Controller.Axis(0).FlashSave

Syntax

Visual Basic

Sub FlashSave()
IDL Interface

HRESULT FlashSave()

See Also

Controller Object:
FlashSave
FlashSaveAll

Motion Object:
FlashSave


Axis.DigitalIn

Description

The state of an axis input.

This property cannot be saved to flash memory.

Arguments

Argument | Type | Description
bit | meiInput | The axis input bit whose state is to be read

Type

Boolean (read only)

Sample Code

x = Controller.Axis(0).DigitalIn(meiInputIo3)

Syntax

Visual Basic

Property DigitalIn(bit As meiInput) As Boolean

IDL Interface

[propget] HRESULT DigitalIn([in] meiInput bit,
[out, retval] VARIANT_BOOL *pVal)

See Also


Axis.DigitalOut

Description

The state of an axis output.

This property cannot be saved to flash memory.

Arguments

Argument | Type | Description
bit | meiOutput | The axis output bit whose state is to be accessed

Type

Boolean

Sample Code

Controller.Axis(0).DigitalOut(meiOutputIo3) = False

Syntax

Visual Basic

Property DigitalOut(bit As meiOutput) As Boolean
IDL Interface

[propget] HRESULT DigitalOut([in] meiOutput bit,
[out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT DigitalOut([in] meiOutput bit,
[in] VARIANT_BOOL newVal)

See Also


Axis.DigitalOutInvert

Description

Determines whether the controller should invert the logic of the specified output signal.

DigitalOutInvert | Meaning
False | signal not inverted
True | signal inverted

Arguments

Argument | Type | Description
bit | meiOutput | The axis output bit whose inverted state is to be accessed

Type

Boolean

Visual Basic Example

Controller.Axis(0).DigitalOutInvert(meiOutputIo0) = False

Syntax

Visual Basic

Property DigitalOutInvert(bit As meiOutput) As Boolean
IDL Interface

[propget] HRESULT DigitalOutInvert([in] meiOutput bit,
[out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT DigitalOutInvert([in] meiOutput bit,
[in] VARIANT_BOOL newVal)

See Also


Axis.IoConfig

Description

Specifies the configuration of general purpose motor I/O.

Arguments

Argument | Type | Meaning
bit | meiMotorIo | The I/O bit whose configuration is to be read or written

Type

meiIoConfig

Visual Basic Example

Controller.Axis(0).IoConfig(meiMotorIo0) = x

x = Controller.Axis(0).IoConfig(meiMotorIo0)

Syntax

Visual Basic

Property IoConfig(bit As meiMotorIo) As meiIoConfig
IDL Interface

[propget] HRESULT IoConfig([in] meiMotorIo bit,
[out, retval] meiXcvrConfig *pVal)

[propput] HRESULT IoConfig([in] meiMotorIo bit,
[in] meiIoConfig newVal)

See Also


Axis.AmpFaultAction

Description

The action to be taken when AmpFault status changes from false to true.

Type

meiAction

Sample Code

' Make sure amplifier fault action
        is not none
If Controller.Axis(0).AmpFaultAction = meiActionNone
Then Controller.Axis(0).AmpFaultAction = meiActionAbort
End If

Syntax

Visual Basic

Property AmpFaultAction As meiAction
IDL Interface

[propget] HRESULT AmpFaultAction([out, retval] meiAction *pVal)

[propput] HRESULT AmpFaultAction([in] meiAction newVal)

See Also

meiAction


Axis.AmpFaultDuration

Description

The amount of time that the amplifier fault input must be true before AmpFault status becomes true and an event of type meiEventTypeAmpFault is generated.

Units

seconds

Type

Double

Visual Basic Example

Controller.Axis(0).AmpFaultDuration = .05

Syntax

Visual Basic

Property AmpFaultDuration As Double
IDL Interface

[propget] HRESULT AmpFaultDuration([out, retval] double *pVal)

[propput] HRESULT AmpFaultDuration([in] double newVal)

See Also

AmpFaultAction


Axis.AmpFaultInvert

Description

Determines whether the controller should invert the logic of the amplifier fault input signal.

AmpFaultInvert | Meaning
True | Inverted
False | Normal

Type

Boolean

Visual Basic Example

Controller.Axis(0).AmpFaultInvert = True
x = Controller.Axis(0).AmpFaultInvert

Syntax

Visual Basic

Property AmpFaultInvert As Boolean
IDL Interface

[propget] HRESULT AmpFaultInvert([out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT AmpFaultInvert([in] VARIANT_BOOL newVal)

See Also

AmpFaultAction


Axis.EncoderFaultAction

Description

The action to be taken when EncoderFault status changes from false to true.

Type

meiAction

Visual Basic Example

Controller.Axis(0).EncoderFaultAction = meiActionAbort

Syntax

Visual Basic

Property EncoderFaultAction As meiAction
IDL Interface

[propget] HRESULT EncoderFaultAction([out, retval] meiAction *pVal)

[propput] HRESULT EncoderFaultAction([in] meiAction newVal)

See Also

meiAction


Axis.EncoderFaultTrigger

Description

Specifies which encoder events will generate an encoder fault event.

Arguments

trigger | Description
meiEncoderFaultTriggerBrokenWire | Determines whether one of the encoder lines is broken or not connected to either the encoder of controller
meiEncoderFaultTriggerIllegalState | Determines whether the states of the A and B encoder signals change simultaneously
meiEncoderFaultTriggerAbsolute | Determines whether an absolute encoder has produced a fault

Type

Boolean

Visual Basic Example

xAxis.EncoderFaultTrigger(meiEncoderFaultTriggerAbsolute) = False

Syntax

Visual Basic

Property EncoderFaultTrigger(trigger As meiEncoderFaultTrigger) As Boolean

IDL Interface

[propget] HRESULT EncoderFaultTrigger([in] meiEncoderFaultTrigger trigger,
[out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT EncoderFaultTrigger([in]meiEncoderFaultTrigger trigger,
[in] VARIANT_BOOL newVal)

See Also


Axis.HomeAction

Description

The action to be taken when Home status changes from false to true.

Type

meiAction

Visual Basic Example

Controller.Axis(0).HomeAction = meiActionEStop

Syntax

Visual Basic

Property HomeAction As meiAction
IDL Interface

[propget] HRESULT HomeAction([out, retval] meiAction *pVal)

[propput] HRESULT HomeAction([in] meiAction newVal)

See Also


Axis.HomeDuration

Description

The amount of time that home event condition must be true before Home status becomes true and an event of type meiEventTypeHome is generated.

Units

seconds

Type

Double

Visual Basic Example

Controller.Axis(0).HomeDuration = .05

Syntax

Visual Basic

Property HomeDuration As Double

IDL Interface

[propget] HRESULT HomeDuration([out, retval] double *pVal)

[propput] HRESULT HomeDuration([in] double newVal)

See Also

HomeAction


Axis.HomeInvert

Description

Determines whether the controller should invert the logic of the home input signal.

HomeInvert | Meaning
False | Normal
True | Inverted

NOTE: HomeInvert cannot be set to fasle when HomeSource = meiHomeSourceCapture.

Type

Boolean

Visual Basic Example

Controller.Axis(0).HomeInvert = False

Syntax

Visual Basic

Property HomeInvert As Boolean
IDL Interface

[propget] HRESULT HomeInvert([out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT HomeInvert([in] VARIANT_BOOL newVal)

See Also

HomeAction


Axis.HomeSource

Description

Specifies whether the home status should be determined from the home input or the capture state.

Configuration | Description
meiHomeSourceCapture | Home status is synonymous to CaptureState. HomeInvert has no effect in this configuration.
meiHomeSourceIo | Home status is determined from the home input and HomeInvert.

NOTE: Setting HomeSource to meiHomeSourceCapture will set HomeInvert to true.

Type

meiHomeSource

Visual Basic Example

Controller.Axis(0).HomeSource = meiHomeSourceIo

Syntax

Visual Basic

Property HomeSource As meiHomeSource
IDL Interface

[propget] HRESULT HomeSource([out, retval] meiHomeSource *pVal)

[propput] HRESULT HomeSource([in] meiHomeSource newVal)

See Also


Axis.LimitHwNegAction

Description

The action to be taken when LimitHwNeg status changes from false to true.

Type

meiAction

Visual Basic Example

Controller.Axis(0).LimitHwNegAction = meiActionEStopAbort

Syntax

Visual Basic

Property LimitHwNegAction As meiAction

IDL Interface

[propget] HRESULT LimitHwNegAction([out, retval] meiAction *pVal)

[propput] HRESULT LimitHwNegAction([in] meiAction newVal)

See Also

meiAction


Axis.LimitHwNegDirectionSensitive

Description

Determines whether the negative hardware limit should be direction sensitive. If LimitHwNegDirectionSensitive is False, then LimitHwNegAction will need to be set to meiActionNone in order to back out of the negative hardware limit.

Type

Boolean

Visual Basic Example

Controller.Axis(0).LimitHwNegDirectionSensitive = False

Syntax

Visual Basic

Property LimitHwNegDirectionSensitive As Boolean
IDL Interface

[propget] HRESULT LimitHwNegDirectionSensitive([out, retval]
VARIANT_BOOL *pVal)

[propput] HRESULT LimitHwNegDirectionSensitive([in] VARIANT_BOOL newVal)

See Also


Axis.LimitHwNegDuration

Description

The amount of time that the negative hardware limit input must be true before LimiHwNeg status becomes true and an event of type meiEventTypeLimitHwNeg is generated.

Units

seconds

Type

Double

Visual Basic Example

Controller.Axis(0).LimitHwNegDuration = .05

Syntax

Visual Basic

Property LimitHwNegDuration As Double
IDL Interface

[propget] HRESULT LimitHwNegDuration([out, retval] double *pVal)

[propput] HRESULT LimitHwNegDuration([in] double newVal)

See Also

LimitHwNegAction


Axis.LimitHwNegInvert

Description

Determines whether the controller should invert the logic of the negative hardware limit input signal.

LimitHwNegInvert | Meaning
False | Normal
True | Inverted

Type

Boolean

Visual Basic Example

Controller.Axis(0).LimitHwNegInvert = True

Syntax

Visual Basic

Property LimitHwNegInvert As Boolean
IDL Interface

[propget] HRESULT LimitHwNegInvert([out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT LimitHwNegInvert([in] VARIANT_BOOL newVal)

See Also

LimitHwNegAction


Axis.LimitHwPosAction

Description

The action to be taken when LimitHwPos status changes from false to true.

Type

meiAction

Visual Basic Example

Controller.Axis(0).LimitHwPosAction = meiActionEStopAbort

Syntax

Visual Basic

Property LimitHwPosAction As meiAction
IDL Interface

[propget] HRESULT LimitHwPosAction([out, retval] meiAction *pVal)

[propput] HRESULT LimitHwPosAction([in] meiAction newVal)

See Also

meiAction


Axis.LimitHwPosDirectionSensitive

Description

Determines whether the positive hardware limit should be direction sensitive.

If LimitHwPosDirectionSensitive is False, then LimitHwPosAction will need to be set to meiActionNone in order to back out of the positive hardware limit.

Type

Boolean

Visual Basic Example

Controller.Axis(0).LimitHwPosDirectionSensitive = False

Syntax

Visual Basic

Property LimitHwPosDirectionSensitive As Boolean
IDL Interface

[propget] HRESULT LimitHwPosDirectionSensitive([out, retval]
VARIANT_BOOL *pVal)

[propput] HRESULT LimitHwPosDirectionSensitive([in] VARIANT_BOOL newVal)

See Also


Axis.LimitHwPosDuration

Description

The amount of time that the positive hardware limit input must be true before LimitHwNeg status becomes true and an event of type meiEventTypeLimitHwNeg is generated.

Units

seconds

Type

Double

Visual Basic Example

Controller.Axis(0).LimitHwPosDuration = .05

Syntax

Visual Basic

Property LimitHwPosDuration As Double
IDL Interface

[propget] HRESULT LimitHwPosDuration([out, retval] double *pVal)

[propput] HRESULT LimitHwPosDuration([in] double newVal)

See Also

LimitHwNegAction


Axis.LimitHwPosInvert

Description

Determines whether the controller should invert the logic of the positive hardware limit input signal.

LimitHwPosInvert | Meaning
False | Normal
True | Inverted

Type

Boolean

Visual Basic Example

Controller.Axis(0).LimitHwPosInvert = True

Syntax

Visual Basic

Property LimitHwPosInvert As Boolean
IDL Interface

[propget] HRESULT LimitHwPosInvert([out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT LimitHwPosInvert([in] VARIANT_BOOL newVal)

See Also

LimitHwPosAction


Axis.LimitPositionError

Description

The magnitude limit of valid values for PositionError. If the absoluter value of PositionError exceeds this value, then LimitPositionError status is true, otherwise LimitPositionError status is false.

Type

Double

Visual Basic Example

Controller.Axis(0).LimitPositionError = 5000.0

Syntax

Visual Basic

Property LimitPositionError As Double
IDL Interface

[propget] HRESULT LimitPositionError([out, retval] double *pVal)

[propput] HRESULT LimitPositionError([in] double newVal)

See Also


Axis.LimitPositionErrorAction

Description

The action to be taken when LimitPositionError status changes from false to true.

Type

meiAction

Visual Basic Example

Controller.Axis(0).LimitPositionErrorAction = meiActionEStopAbort

Syntax

Visual Basic

Property LimitPositionErrorAction As meiAction
IDL Interface

[propget] HRESULT LimitPositionErrorAction([out, retval] meiAction *pVal)

[propput] HRESULT LimitPositionErrorAction([in] meiAction newVal)

See Also


Axis.LimitPositionErrorDuration

Description

The amount of time that PositionError must exceed LimitPositionError before LimitPositionError status becomes true and an event of type meiEventTypeLimitError is generated.

Units

seconds

Type

Double

Visual Basic Example

Controller.Axis(0).LimitPositionErrorDuration = .05

Syntax

Visual Basic

Property LimitPositionErrorDuration As Double
IDL Interface

[propget] HRESULT LimitPositionErrorDuration([out, retval] double *pVal)

[propput] HRESULT LimitPositionErrorDuration([in] double newVal)

See Also

LimitPositionErrorAction


Axis.LimitSwNeg

Description

The lower limit of valid values for ActualPosition. If ActualPosition exceeds this value, then LimitSwNeg status is true, otherwise LimitSwNeg status is false.

Type

Double

Visual Basic Example

Controller.Axis(0).LimitSwNeg = -50000000.0

Syntax

Visual Basic

Property LimitSwNeg As Double
IDL Interface

[propget] HRESULT LimitSwNeg([out, retval] double *pVal)

[propput] HRESULT LimitSwNeg([in] double newVal)

See Also


Axis.LimitSwNegAction

Description

The action to be taken when the state of the meiInputLimitSwNeg status changes from False to True.

Type

meiAction

Visual Basic Example

Controller.Axis(0).LimitSwNegAction = meiActionEStopAbort

Syntax

Visual Basic

Property LimitSwNegAction As meiAction
IDL Interface

[propget] HRESULT LimitSwNegAction([out, retval] meiAction *pVal)

[propput] HRESULT LimitSwNegAction([in] meiAction newVal)

See Also


Axis.LimitSwNegDirectionSensitive

Description

Determines whether the negative software limit should be direction sensitive.

If LimitSwNegDirectionSensitive is False, then LimitHwNegAction will need to be set to meiActionNone in order to back out of the negative software limit.

Type

Boolean

Visual Basic Example

Controller.Axis(0).LimitSwNegDirectionSensitive = False

Syntax

Visual Basic

Property LimitSwNegDirectionSensitive As Boolean
IDL Interface

[propget] HRESULT LimitSwNegDirectionSensitive([out, retval]
VARIANT_BOOL *pVal)

[propput] HRESULT LimitSwNegDirectionSensitive([in] VARIANT_BOOL newVal)

See Also

LimitSwNegAction


Axis.LimitSwNegDuration

Description

The amount of time that ActualPosition must exceed LimitSwNeg before LimitSwNegState becomes true and an event of type meiEventTypeLimitSwNeg is generated.

Units

seconds

Type

Double

Visual Basic Example

Controller.Axis(0).LimitSwNegDuration = .05

Syntax

Visual Basic

Property LimitSwNegDuration As Double
IDL Interface

[propget] HRESULT LimitSwNegDuration([out, retval] double *pVal)

[propput] HRESULT LimitSwNegDuration([in] double newVal)

See Also

LimitSwNegAction


Axis.LimitSwPos

Description

The upper limit of valid values for ActualPosition.

If ActualPosition exceeds this value, then LimitSwPos status is true, otherwise LimitSwPos status is false.

Type

Double

Visual Basic Example

Controller.Axis(0).LimitSwPos = 50000000.0

Syntax

Visual Basic

Property LimitSwPos As Double
IDL Interface

[propget] HRESULT LimitSwPos([out, retval] double *pVal)

[propput] HRESULT LimitSwPos([in] double newVal)

See Also


Axis.LimitSwPosAction

Description

The action to be taken when LimitSwPosState changes from false to true.

Type

meiAction

Visual Basic Example

Controller.Axis(0).LimitSwPosAction = meiActionEStopAbort

Syntax

Visual Basic

Property LimitSwPosAction As meiAction
IDL Interface

[propget] HRESULT LimitSwPosAction([out, retval] meiAction *pVal)

[propput] HRESULT LimitSwPosAction([in] meiAction newVal)

See Also


Axis.LimitSwPosDirectionSensitive

Description

Determines whether the positive software limit should be direction sensitive.

If LimitSwPosDirectionSensitive is False, then LimitHwNegAction will need to be set to meiActionNone in order to back out of the positive software limit.

Type

Boolean

Visual Basic Example

Controller.Axis(0).LimitSwPosDirectionSensitive = False

Syntax

Visual Basic

Property EncoderFaultTrigger(trigger As meiEncoderFaultTrigger) As Boolean
IDL Interface

[propget] HRESULT EncoderFaultTrigger([in] meiEncoderFaultTrigger trigger,
[out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT EncoderFaultTrigger([in] meiEncoderFaultTrigger trigger,
[in] VARIANT_BOOL newVal)

See Also

LimitSwPosAction


Axis.LimitSwPosDuration

Description

The amount of time that ActualPosition must exceed LimitSwPos before LimitSwPos status becomes true and an event of type meiEventTypeLimitSwPos is generated.

Units

seconds

Type

Double

Visual Basic Example

Controller.Axis(0).LimitSwPosDuration = .05

Syntax

Visual Basic

Property LimitSwPosDuration As Double
IDL Interface

[propget] HRESULT LimitSwPosDuration([out, retval] double *pVal)

[propput] HRESULT LimitSwPosDuration([in] double newVal)

See Also

LimitSwPosAction


Axis.Monitor

Description

This property represents a monitor field of a SynqNet drive. If there is no SynqNet node associated with the Axis, then accessing this property will produce an meiErrorAxisNotMappedToSqNode error.

This property cannot be saved to flash memory.

Arguments

Argument | Description
Index | The index of the drive monitor field to be read.

Type

Long (read only)

Visual Basic Example

x = Controller.Axis(0).Monitor(0)

Syntax

Visual Basic

Property Monitor(Index As Long) As Long
IDL Interface

[propget] HRESULT Monitor([in] long Index,
[out, retval] long *pVal)

See Also

MonitorLocation
MonitorType

SynqNet Overview


Axis.MonitorLocation

Description

The location of the monitor data.

If Axis.MonitorType is meiMonitorTypeAddress, then Axis.MonitorLocation will be the memory address of the monitor value.

If Axis.MonitorType is meiMonitorTypeIndex, then Axis.MonitorLocation will be the index of predefined monitor values.

If there is no SynqNet node associated with the Axis, then the accessing of this property will produce an meiErrorAxisNotMappedToSqNode error.

Arguments

Argument | Description
Index | The index of the drive monitor location to be accessed.

Type

Long

Visual Basic Example

x = Controller.Axis(0).MonitorLocation(0)

Syntax

Visual Basic

Property MonitorLocation(Index As Long) As Long
IDL Interface

[propget] HRESULT MonitorLocation([in] long Index,
[out, retval] long *pVal)

[propput] HRESULT MonitorLocation([in] long Index,
[in] long newVal)

See Also

Monitor
MonitorType

SynqNet Overview


Axis.MonitorType

Description

The type of monitor data.

If Axis.MonitorType is meiMonitorTypeAddress, then Axis.MonitorLocation will be the memory address of the monitor value.

If Axis.MonitorType is meiMonitorTypeIndex, then Axis.MonitorLocation will be the index of predefined monitor values.

If there is no SynqNet node associated with the Axis, then accessing this property will produce an meiErrorAxisNotMappedToSqNode error.

Arguments

Argument | Description
Index | The index of the drive monitor location to be accessed.

Type

meiMotorType

Visual Basic Example

ntroller.Axis(0).MonitorType(0) = meiMonitorTypeIndex

Syntax

Visual Basic

Property MonitorType(Index As Long) As meiMonitorType
IDL Interface

propget] HRESULT MonitorType([in] long Index,
[out, retval] meiMonitorType *pVal)

[propput] HRESULT MonitorType([in] long Index,
[in] meiMonitorType newVal)

See Also

Monitor
MonitorLocation

SynqNet Overview


Axis.MotorType

Description

The type of motor to be controlled Servo motors must be tuned and sercos drives configured before they will function properly. Configuring an axis for use as a stepper motor in step loopback mode is a useful way of simulating an axis without a motor. When MotorType is set to meiMotorTypeStepper, any axis control algorithm will still execute sending the output to the DACs on analog controllers.

NOTE: Having the control algorithm still running does not affect the stepper motor outputs. Please refer to the tuning overview, the overview of stepper motor connections, and the Sercos application note for more information.

Type

meiMotorType

Visual Basic Example

' Configure axis to use a stepper motor
Controller.Axis(0).MotorType = meiMotorTypeStepper

Syntax

Visual Basic

Property MotorType As meiMotorType
IDL Interface

[propget] HRESULT MotorType([out, retval] meiMotorType *pVal)

[propput] HRESULT MotorType([in] meiMotorType newVal)

See Also


Axis.StepLoopback

Description

Specifies whether the controller will use the stepper motor outputs as virtual encoder feedback. Configuring an axis for use as a stepper motor in step loopback mode is a useful way of simulating an axis without a motor.

Please refer to the overview of stepper motor connections for more information.

Type

Boolean

Visual Basic Example

' Configure axis to use stepper motor loopback
Controller.Axis(0).StepLoopback = True

Syntax

Visual Basic

Property StepLoopback As Boolean
IDL Interface

[propget] HRESULT StepLoopback([out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT StepLoopback([in] VARIANT_BOOL newVal)

See Also

MotorType
StepPulseWidth

Overview of Stepper Motor Connections


Axis.StepPulseWidth

Description

Specifies the pulse widths of stepper clockwise, counter-clockwise, and step outputs.

Please see the specifications for Step/Dir & CW/CCW pulses for more information.

Type

Double

Visual Basic Example

' Configure axis to use a stepper pulse width of 1us
Controller.Axis(0).StepPulseWidth = .000001;

Syntax

Visual Basic

Property StepPulseWidth As Double
IDL Interface

[propget] HRESULT StepPulseWidth([out, retval] double *pVal)

[propput] HRESULT StepPulseWidth([in] double newVal)

See Also

MotorType
StepLoopback

Stepper Motor Pulse Specifications


Axis.SettlingTime

Description

The time for which all settling conditions must be met before a motion for an axis is considered complete.

Units

seconds

Type

Double

Visual Basic Example

Controller.Axis(0).SettlingTime = .005 '5 milliseconds

Syntax

Visual Basic

Property SettlingTime As Double
IDL Interface

[propget] HRESULT SettlingTime([out, retval] double *pVal)

[propput] HRESULT SettlingTime([in] double newVal)

See Also


Axis.TolerancePositionCoarse

Description

An axis will generate an event of type meiEventTypeInPositionCoarse when the absolute value of PositionError is less than or equal to TolerancePositionCoarse.

Units

counts

Type

Double

Visual Basic Example

Controller.Axis(0).TolerancePositionCoarse = 200

Syntax

Visual Basic

Property TolerancePositionCoarse As Double
IDL Interface

[propget] HRESULT TolerancePositionCoarse([out, retval] double *pVal)

[propput] HRESULT TolerancePositionCoarse([in] double newVal)

See Also

TolerancePositionFine
ToleranceVelocity

Motion Related Events


Axis.TolerancePositionFine

Description

An axis will generate an event of type meiEventTypeSettled when the absolute value of PositionError is less than or equal to TolerancePositionCoarse and ActualVelocity is less than or equal to ToleranceVelocity.

Units

counts

Type

Double

Visual Basic Example

Controller.Axis(0).TolerancePositionFine = 100

Syntax

Visual Basic

Property TolerancePositionFine As Double
IDL Interface

[propget] HRESULT TolerancePositionFine([out, retval] double *pVal)

[propput] HRESULT TolerancePositionFine([in] double newVal)

See Also

TolerancePositionCoarse
ToleranceVelocity

Motion Related Events


Axis.ToleranceVelocity

Description

The maximum velocity at which:

  • An axis can report an in fine position event
  • An axis can settle

Units

counts/sec

Type

Double

Visual Basic Example

Controller.Axis(0).ToleranceVelocity = 5000.0

Syntax

Visual Basic

Property ToleranceVelocity As Double
IDL Interface

[propget] HRESULT ToleranceVelocity([out, retval] double *pVal)

[propput] HRESULT ToleranceVelocity([in] double newVal)

See Also


Axis.Status

Description

Reports whether the conditions necessary for generating the specified event are met or have been met. The status of some events latch meaning that Status will report if the event's conditions have been met. The status of other events are real time meaning that Status will report if the event's conditions are currently being met.

NOTE: Many events have actions associated with them. Event reporting does not have to be enabled in order for these actions to be generated on the controller. In other words, it is possible to not report a home event, but to generate a STOP command when the home event's conditions are met.

This property cannot be saved to flash memory.

Arguments

Argument | Type | Description
Type | meiStatus | The type of event whose related status bit is being read.

Type

Boolean (read only)

Visual Basic Example

x = Controller.Axis(3).Status(meiStatusHome)

Syntax

Visual Basic

Property Status(Type As meiStatus) As Boolean
IDL Interface

[propget] HRESULT Status([in] meiStatus Type,
[out, retval] VARIANT_BOOL *pVal)

See Also


Axis.ActualPosition

Description

The position feedback of the axis. When one writes to ActualPosition, the Origin is changed to produce the desired result. This way the position error will remain constant.

This property cannot be saved to flash memory.

Units

Counts

Type

Double

Visual Basic Example

' Set the current position to 0 (Home)
Controller.Axis(0).ActualPosition = 0

' Update display
lblActualPosition.Caption = Controller.Axis(0).ActualPosition

Syntax

Visual Basic

Property ActualPosition As Double
IDL Interface

[propget] HRESULT ActualPosition([out, retval] double *pVal)

[propput] HRESULT ActualPosition([in] double newVal)

See Also


Axis.ActualVelocity

Description

The velocity feedback of an axis. This quantity is defined as the change in ActualPosition between servo cycles multiplied by the sample rate.

This property cannot be saved to flash memory.

Units

counts/sec

Type

Double (read only)

Visual Basic Example

' Update display
lblActualVelocity.Caption = Controller.Axis(0).ActualVelocity

Syntax

Visual Basic

Property ActualPosition As Double
IDL Interface

[propget] double ActualVelocity([out, retval] double *pVal)

See Also


Axis.CommandAccel

Description

The command acceleration of an axis.

This property cannot be saved to flash memory.

Units

counts/sec2

Type

Double (read only)

Visual Basic Example

' Update display
lblCommandAccel.Caption = Controller.Axis(0).CommandAccel

Syntax

Visual Basic

Property CommandAccel As Double
IDL Interface

[propget] HRESULT CommandAccel([out, retval] double *pVal)

See Also


Axis.CommandJerk

Description

The command jerk of an axis.

This property cannot be saved to flash memory.

Units

counts/sec3

Type

Double (read only)

Visual Basic Example

' Update display
lblCommandJerk.Caption = Controller.Axis(0).CommandJerk

Syntax

Visual Basic

Property CommandJerk As Double
IDL Interface

[propget] HRESULT CommandJerk([out, retval] double *pVal)

See Also

CommandAccel


Axis.CommandPosition

Description

The commanded position of the axis. This quantity represents the current desired position of the axis. It does not represent the target (end) position of a move. When one writes to CommandPosition, it results in a step change of CommandPosition and PositionError.

This property cannot be saved to flash memory.

Units

counts

Type

Double

Visual Basic Example

' Update display
lblCommandPosition.Caption = Controller.Axis(0).CommandPosition

Syntax

Visual Basic

Property CommandPosition As Double
IDL Interface

[propget] HRESULT CommandPosition([out, retval] double *pVal)

[propput] HRESULT CommandPosition([in] double newVal)

See Also


Axis.CommandVelocity

Description

The command velocity of an axis.

This property cannot be saved to flash memory.

Units

counts/sec

Type

Double (read only)

Visual Basic Example

' Update display
lblCommandVelocity.Caption = Controller.Axis(0).CommandVelocity

Syntax

Visual Basic

Property CommandVelocity As Double
IDL Interface

[propget] HRESULT CommandVelocity([out, retval] double *pVal)

See Also


Axis.Origin

Description

The encoder position where the actual position reads zero. Settting Origin will result in changes to both ActualPosition and CommandPosition, but will not result in any change of PositionError. Please refer to the origin overview in the software manual for more information.

This property cannot be saved to flash memory.

Units

counts

Type

Double

Visual Basic Example

' Have the actual position be identical to the encoder position Controller.Axis(0).Origin = 0

Syntax

Visual Basic

Property Origin As Double
IDL Interface

[propget] HRESULT Origin([out, retval] double *pVal)

[propput] HRESULT Origin([in] double newVal)

See Also


Axis.PositionError

Description

The difference between the current command and actual positions.

This property cannot be saved to flash memory.

Units

counts

Type

Double (read only)

Visual Basic Example

lblPositionError.Caption = Controller.Axis(0).PositionError

Syntax

Visual Basic

Property PositionError As Double
IDL Interface

[propget] HRESULT PositionError([out, retval] double *pVal)

See Also


Axis.DriveFirmwareVer

Description

Returns the version of the firmware of an axis' corresponding SynqNet driveIf there is no SynqNet node associated with the Axis, then the accessing this property will produce an meiErrorAxisNotMappedToSqNode error.

This property cannot be saved to flash memory.

Type

String (read only)

Visual Basic Example

x = Controller.Axis(0).DriveFirmwareVer

Syntax

Visual Basic

Property DriveFirmwareVer As String
IDL Interface

[propget] HRESULT DriveFirmwareVer([out, retval] BSTR *pVal)

See Also

DriveFirmwareDownload


CanNode.AnalogIn

Description

The state of a CAN node analog input.

This property cannot be saved to flash memory.

Arguments

Argument | Type | Description
Node | Long | The node to which the analog input belongs.
Bit | Long | The index of the analog input whose state is to be read.

Type

Double (read only)

Visual Basic Example

x = Controller.Can(0).Node(5).AnalogIn(11, 7)

Syntax

Visual Basic

Property DigitalIn(node As Long, bit As Long) As Double

IDL Interface

[propget] HRESULT AnalogIn([in] long node,
[in] long bit,
[out, retval] double *pVal)

See Also

AnalogOut


CanNode.AnalogOut

Description

The state of a CAN node analog output.

This property cannot be saved to flash memory.

Arguments

Argument | Type | Description
Node | Long | The node to which the analog output belongs.
Bit | Long | The index of the analog ouput whose state is to be accessed.

Type

Double

Visual Basic Example

Controller.Can(0).Node(5).AnalogOut(3, 2) = .571

Syntax

Visual Basic

Property AnalogOut(node As Long, bit As Long) As Double
IDL Interface

[propget] HRESULT AnalogOut([in] long node,
[in] long bit,
[out, retval] double *pVal)

[propput] HRESULT AnalogOut([in] long node,
[in] long bit,
[in] double newVal)

See Also

AnalogIn


CanNode.DigitalIn

Description

The state of a CAN node digital input.

This property cannot be saved to flash memory.

Arguments

Argument | Type | Description
Node | Long | The node to which the digital input belongs.
Bit | Long | The input bit whose state is to be read.

Type

Boolean (read only)

Visual Basic Example

x = Controller.Can(0).Node(5).DigitalIn(11, 7)

Syntax

Visual Basic

Property DigitalIn(node As Long, bit As Long) As Boolean

IDL Interface

[propget] HRESULT DigitalIn([in] long node,
[in] long bit,
[out, retval] VARIANT_BOOL *pVal)

See Also


CanNode.DigitalInWord

Description

The states of a set of 32 CAN node digital inputs. This property is used to read multiple digital inputs with a single CANOpen command. This is quicker than reading multiple individual bits with Can.DigitalIn.

The values of the digital inputs are the values of the respective bits in the word returned by the DigitalInWord property. Digital input zero will be the least significant bit while digital input 31 will be the most significant bit.

This property cannot be saved to flash memory.

Arguments

Argument | Type | Description | Default Value
Node | Long | The node to which the digital inputs belong. | None
Word | Long | The index of the word whose digital input states are to be read. | 0

Type

Long (read only)

Visual Basic Example

x = Controller.Can(0).Node(5).DigitalInWord(11)

Syntax

Visual Basic

Property DigitalInWord(node As Long, word = 0 As Long) As Boolean

IDL Interface

[propget] HRESULT DigitalInWord([in] long node,
[in, defaultvalue(0)] long word,
[out, retval] VARIANT_BOOL *pVal)

See Also


CanNode.DigitalOut

Description

The state of a CAN node digital output.

This property cannot be saved to flash memory.

Arguments

Argument | Type | Description
Node | Long | The node to which the digital output belongs.
Bit | Long | The input bit whose state is to be accessed.

Type

Boolean

Visual Basic Example

Controller.Can(0).Node(5).DigitalOut(3, 2) = False

Syntax

Visual Basic

Property DigitalOut(node As Long, bit As Long) As Boolean
IDL Interface

[propget] HRESULT DigitalOut([in] long node,
[in] long bit,
[out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT DigitalOut([in] long node,
[in] long bit,
[in] VARIANT_BOOL newVal)

See Also


CanNode.DigitalOutWord

Description

The states of a set of 32 CAN node digital outputs. This property is used to access multiple digital inputs with a single CANOpen command. This is quicker than accessing multiple individual bits with Can.DigitalOut.

The values of the digital outputs are the values of the respective bits in the word returned by the DigitalOutWord property. Digital output zero will be the least significant bit while digital output 31 will be the most significant bit.

This property cannot be saved to flash memory.

Arguments

Argument | Type | Description | Default Value
Node | Long | The node to which the digital outputs belong. | None
Word | Long | The index of the word whose digital output states are to be read. | 0

Type

Long

Visual Basic Example

Controller.Can(0).Node(5).DigitalOutWord(3) = wordOfBits

Syntax

Visual Basic

Property DigitalOut(node As Long, bit As Long) As Boolean
IDL Interface

[propget] HRESULT DigitalOutWord([in] long node,
[in, defaultvalue(0)] long word,
[out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT DigitalOutWord([in] long node,
[in, defaultvalue(0)] long word,
[in] VARIANT_BOOL newVal)

See Also


CanNode.AnalogInTxType

Description

The transmission type used for communication of the analog inputs on the CANOpen node associated with the CanNode object.

Type

meiCanTxType

Visual Basic Example

Controller.Can(0).Node(5).AnalogInTxType = meiCanTxTypeEvent

Syntax

Visual Basic

Property AnalogInTxType As meiCanTxType
IDL Interface

[propget] HRESULT AnalogInTxType([out, retval] meiCanTxType *pVal)

[propput] HRESULT AnalogInTxType([in] meiCanTxType newVal)

See Also

AnalogOutTxType
DigitalInTxType
DigitalOutTxType

meiCanTxType

Can Overview


CanNode.AnalogOutTxType

Description

The transmission type used for communication of the analog outputs on the CANOpen node associated with the CanNode object.

Type

meiCanTxType

Visual Basic Example

Controller.Can(0).Node(5).AnalogOutTxType = meiCanTxTypeCyclic

Syntax

Visual Basic

Property AnalogOutTxType As meiCanTxType
IDL Interface

[propget] HRESULT AnalogOutTxType([out, retval] meiCanTxType *pVal)

[propput] HRESULT AnalogOutTxType([in] meiCanTxType newVal)

See Also

AnalogInTxType
DigitalInTxType
DigitalOutTxType

meiCanTxType

Can Overview


CanNode.DigitalInTxType

Description

The transmission type used for communication of the digital inputs on the CANOpen node associated with the CanNode object.

Type

meiCanTxType

Visual Basic Example

Controller.Can(0).Node(5).DigitalInTxType = meiCanTxTypeEvent

Syntax

Visual Basic

Property DigitalInTxType As meiCanTxType
IDL Interface

[propget] HRESULT DigitalInTxType([out, retval] meiCanTxType *pVal)

[propput] HRESULT DigitalInTxType([in] meiCanTxType newVal)

See Also

AnalogInTxType
AnalogOutTxType
DigitalOutTxType

meiCanTxType

Can Overview


CanNode.DigitalOutTxType

Description

The transmission type used for communication of the digital outputs on the CANOpen node associated with the CanNode object.

Type

meiCanTxType

Visual Basic Example

Controller.Can(0).Node(5).DigitalOutTxType = meiCanTxTypeCyclic

Syntax

Visual Basic

Property DigitalInTxType As meiCanTxType
IDL Interface

[propget] HRESULT DigitalInTxType([out, retval] meiCanTxType *pVal)

[propput] HRESULT DigitalInTxType([in] meiCanTxType newVal)

See Also

AnalogInTxType
AnalogOutTxType
DigitalInTxType

meiCanTxType

Can Overview


CanNode.Alive

Description

This property reads True if the CANOpen node is alive, False if the CANOpen node is dead.

This property cannot be saved to flash memory.

Type

Boolean (read only)

Visual Basic Example

x = Controller.Can(0).Node(5).Alive

Syntax

Visual Basic

Property Alive As Boolean
IDL Interface

[propget] HRESULT Alive([out, retval] VARIANT_BOOL *pVal)

See Also

Can Overview


CanNode.AnalogInCount

Description

The number of analog inputs on the CANOpen node associated with a CanNode object.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.Can(0).Node(5).AnalogInCount

Syntax

Visual Basic

Property AnalogInCount As Long
IDL Interface

[propget] HRESULT AnalogInCount([out, retval] long *pVal)

See Also

AnalogOutCount
DigitalInCount
DigitalOutCount

Can Overview


CanNode.AnalogOutCount

Description

The number of analog outputs on the CANOpen node associated with a CanNode object.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.Can(0).Node(5).AnalogOutCount

Syntax

Visual Basic

Property AnalogOutCount As Long
IDL Interface

[propget] HRESULT AnalogOutCount([out, retval] long *pVal)

See Also

AnalogInCount
DigitalInCount
DigitalOutCount

Can Overview


CanNode.DigitalInCount

Description

The number of digital inputs on the CANOpen node associated with a CanNode object.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.Can(0).Node(5).DigitalInCount

Syntax

Visual Basic

Property DigitalInCount As Long
IDL Interface

[propget] HRESULT DigitalInCount([out, retval] long *pVal)

See Also

AnalogInCount
AnalogOutCount
DigitalOutCount

Can Overview


CanNode.DigitalOutCount

Description

The number of digital outputs on the CANOpen node associated with a CanNode object.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.Can(0).Node(5).DigitalOutCount

Syntax

Visual Basic

Property DigitalOutCount As Long
IDL Interface

[propget] HRESULT DigitalOutCount([out, retval] long *pVal)

See Also

AnalogInCount
AnalogOutCount
DigitalInCount

Can Overview


CanNode.HealthType

Description

The type of health checking protocol being used with the CANOpen node associated with the CanNode object.

Type

meiCanNodeHealthType (read only)

Visual Basic Example

x = Controller.Can(0).Node(5).HealthType

Syntax

Visual Basic

Property HealthType As meiCanNodeHealthType
IDL Interface

[propget] HRESULT HealthType([out, retval] meiCanNodeHealthType *pVal)

See Also

meiCanNodeHealthType

Can Overview


CanNode.NmtState

Description

The NMT (network management) states of a node on a CANOpen network. The CAN controller will automatically put all nodes into the meiCanNodeNmtStateOperational state during the initialization of the network.

Type

meiCanNodeNmtState (read only)

Visual Basic Example

x = Controller.Can(0).Node(5).NmtState

Syntax

Visual Basic

Property NmtState As meiCanNodeNmtState
IDL Interface

[propget] HRESULT NmtState([out, retval] meiCanNodeNmtState *pVal)

See Also

meiCanNodeNmtState

Can Overview


Can.EventEnable

Description

Enables or disables any of the events that are generated by the Can object from being reported to the host. Please refer to the Events Overview section for a list of events generated by the Can object.

Arguments

Argument | Type | Description
eventType | meiEventType | The type of event to be accessed.

Type

Boolean

Visual Basic Example

Controller.Can(0).EventEnable(meiEventTypeCanBusState) = True

Syntax

Visual Basic

Property EventEnable(eventType As meiEventType) As Boolean
IDL Interface

[propget] HRESULT EventEnable([in] meiEventType eventType,
[out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT EventEnable([in] meiEventType eventType,
[in] VARIANT_BOOL newVal)

See Also

EventEnableAll
EventEnableNone

meiEventType

Events Overview


Can.EventEnableAll

Description

Enables reporting of all events generated by the Can object to the host. Please refer to the Events Overview section for a list of events generated by the Can object.

Visual Basic Example

Controller.Can(0).EventEnableAll

Syntax

Visual Basic

Sub EventEnableAll
IDL Interface

HRESULT EventEnableAll()

See Also

EventEnable
EventEnableNone

meiEventType

Events Overview


Can.EventEnableNone

Description

Disables reporting of all events generated by the Can object to the host. Please refer to the Events Overview section for a list of events generated by the Can object.

Visual Basic Example

Controller.Can(0).EventEnableNone

Syntax

Visual Basic

Sub EventEnableNone
IDL Interface

HRESULT EventEnableNone()

See Also

EventEnable
EventEnableAll

meiEventType

Events Overview


Can.FirmwareDownload

Description

Downloads new firmware to the CAN controller.

NOTE: This operation takes approximately 10 to 30 seconds to complete the download.

Arguments

Argument | Type | Description
filename | String | The name of the file which contains the firmware image to be downloaded.

Visual Basic Example

Controller.Can(0).FirmwareDownload "canFirmware.bin"

Syntax

Visual Basic

Sub FirmwareDownload(fileName As String)
IDL Interface

HRESULT FirmwareDownload([in] BSTR fileName)

See Also

FirmwareErase
FirmwareUpload

CANOpen Overview


Can.FirmwareErase

Description

Erases the firmware on the CAN controller.

NOTE: This operation will disable the CAN controller from operating properly.

Visual Basic Example

Controller.Can(0).FirmwareErase

Syntax

Visual Basic

Sub FirmwareErase()
IDL Interface

HRESULT FirmwareErase()

See Also

FirmwareUpload
FirmwareDownload

CANOpen Overview


Can.FirmwareUpload

Description

Uploads a firmware from the CAN controller to the host computer.

NOTE: This operation will take some time to perform the upload process, usually 10 to 30 seconds.

Arguments

Argument | Type | Description
filename | String | The name of the file to create. This is where the firmware image will be stored.

Visual Basic Example

Controller.Can(0).FirmwareUpload "canFirmware.bin"

Syntax

Visual Basic

Sub FirmwareUpload(fileName As String)
IDL Interface

HRESULT FirmwareUpload([in] BSTR fileName)

See Also

FirmwareErase
FirmwareDownload

CANOpen Overview


Can.FlashSave

Description

Saves the current Can object settings to flash memory. This configuration will be loaded onto the controller during the next power up or controller reset.

Visual Basic Example

Controller.Can(0).FlashSave

Syntax

Visual Basic

Sub FlashSave()
IDL Interface

HRESULT FlashSave()

See Also

Controller Object:
FlashSave
FlashSaveAll

Axis Object:
 FlashSave

Motion Object:
 FlashSave

SqNode Object:
 FlashSave

SynqNet Object:
 FlashSave


Can.BitRate

Description

The bit rate of the CANOpen network corresponding to the Can object. The CANOpen standard defines a set of bit rates that can be supported (see table below). Any CANOpen node must support at least one of these bit rates. All the nodes on the CAN network must be operating at the same bit rate. Any of these standard bit rates can be used with the XMP.

Due to the electrical characteristics of a CAN network, the maximum length of a CAN network (and the corresponding drop lengths) is dependent upon the bit rate that is chosen. See the table below.

Bit Rate | Max Bus Length (m) | Max Drop Length (m) | Max Cumulative Drop Length (m)
1M | 25* | 2 | 10
800k | 50* | 3 | 15
500k | 100 | 6 | 30
250k | 250 | 12 | 60
125k | 500 | 24 | 120
50k | 1000 | 60 | 300
20k | 2500 | 150 | 750
10k | 5000 | 300 | 1500

Type

Long

Visual Basic Example

x = Controller.Can(0).BitRate

Syntax

Visual Basic

Property BitRate As Long
IDL Interface

[propget] HRESULT BitRate([out, retval] long *pVal)
[propput] HRESULT BitRate([in] long newVal)

See Also

Can Overview


Can.BusState

Description

The bus state the CANOpen controller.

This property cannot be saved to flash memory.

Type

meiCanBusState (read only)

Visual Basic Example

x = Controller.Can(0).BusState

Syntax

Visual Basic

Property BusState As meiCanBusState
IDL Interface

[propget] HRESULT BusState([out, retval] meiCanBusState *pVal)

See Also

Can Overview


Can.CyclicPeriod

Description

The period in seconds between sending consecutive SYNC messages. A value of zero will disable CANOpen SYNC messages from being produced.

Units

Seconds

Type

Double

Visual Basic Example

x = Controller.Can(0).CyclicPeriod

Syntax

Visual Basic

Property CyclicPeriod As Double
IDL Interface

[propget] HRESULT CyclicPeriod([out, retval] double *pVal)

[propput] HRESULT CyclicPeriod([in] double newVal)

See Also

Can Overview


Can.HealthPeriod

Description

The period in seconds between when checks of node health will occur. A value of zero will disable the health checking protocol. For nodes that use the node guarding protocol, this is the node guarding period. For nodes that use the heartbeating protocol, this is the heartbeat consumer time.

Units

Seconds

Type

Double

Visual Basic Example

x = Controller.Can(0).HealthPeriod

Syntax

Visual Basic

Property HealthPeriod As Double
IDL Interface

[propget] HRESULT HealthPeriod([out, retval] double *pVal)

[propput] HRESULT HealthPeriod([in] double newVal)

See Also

Can Overview


Can.InhibitTime

Description

The minimum time between two successive Process Data Object (PDO) messages.

A PDO is a CAN message that contains operational data. If the source node’s events occur at a very fast rate, the number of messages generated can swamp the network and block out other messages. To prevent an excess of messages, nodes can optionally support inhibit times for their transmit PDOs.

Units

Seconds

Type

Double

Visual Basic Example

x = Controller.Can(0).InhibitTime

Syntax

Visual Basic

Property InhibitTime As Double
IDL Interface

[propget] HRESULT InhibitTime([out, retval] double *pVal)

[propput] HRESULT InhibitTime([in] double newVal)

See Also

Can Overview


Can.MasterId

Description

The node number of the controller on the CAN network. CANOpen requires that the master node has a valid node number to implement the heartbeat protocol.

Type

Long

Visual Basic Example

Controller.Can(0).MasterId = 1

Syntax

Visual Basic

Property MasterId As Long
IDL Interface

[propget] HRESULT MasterId([out, retval] long *pVal)

[propput] HRESULT MasterId([in] long newVal)

See Also

Can Overview


Can.Clock

Description

This value is incremented by the CANOpen controller every millisecond.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.Can(0).Clock

Syntax

Visual Basic

Property Clock As Long
IDL Interface

[propget] HRESULT Clock([out, retval] long *pVal)

See Also

Can Overview


Can.HwOverflow

Description

This property will be set to True if the CAN interface hardware has detected an overflow.

This property cannot be saved to flash memory.

Type

Boolean (read only)

Visual Basic Example

x = Controller.Can(0).HwOverflow

Syntax

Visual Basic

Property HwOverflow As Boolean
IDL Interface

[propget] HRESULT HwOverflow([out, retval] VARIANT_BOOL *pVal)

See Also

SwOverview

Can Overview


Can.MsgRate

Description

The number of messages received and transmitted per second.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.Can(0).MsgRate

Syntax

Visual Basic

Property MsgRate As Long
IDL Interface

[propget] HRESULT MsgRate([out, retval] long *pVal)

See Also

Can Overview


Can.RxErrorCount

Description

The current value of the CAN controller's receive error counter.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.Can(0).RxErrorCount

Syntax

Visual Basic

Property RxErrorCount As Long
IDL Interface

[propget] HRESULT RxErrorCount([out, retval] long *pVal)

See Also

TxErrorCount

Can Overview


Can.SwOverflow

Description

This property will be set to True if the software receive buffer has overflowed. This property can be cleared (set back to False) by performing an meiCanCmdStatusClear.

This property cannot be saved to flash memory.

Type

Boolean (read only)

Visual Basic Example

x = Controller.Can(0).SwOverflow

Syntax

Visual Basic

Property SwOverflow As Boolean
IDL Interface

[propget] HRESULT SwOverflow([out, retval] VARIANT_BOOL *pVal)

See Also

HwOverview
Command

Can Overview


Can.TxErrorCount

Description

The current value of the CAN controller's transmit error counter.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.Can(0).TxErrorCount

Syntax

Visual Basic

Property TxErrorCount As Long
IDL Interface

[propget] HRESULT TxErrorCount([out, retval] long *pVal)

See Also

RxErrorCount

Can Overview


Can.Node

Description

A CanNode sub-object of the Can object. The CanNode object represents a node on the CANOpen network associated with the Can object.

This property cannot be saved to flash memory.

Arguments

Argument | Description
Index | The index of the CanNode object to be accessed.

Type

MPX CanNode (read only)

Visual Basic Example

Set canNode5 = Controller.Can(0).Node(5)

Syntax

Visual Basic

Property Node(Index As Long) As MPXCtl.CanNode
IDL Interface

[propget] HRESULT Node([in] long Index,
[out, retval] ICanNode** ppNode)

See Also

CanNode Object


Can.NodeCount

Description

This property identifies how many compatible CAN nodes are on the controller's CANOpen network.

This property is determined at the initialization of the Can object and can be refreshed by calling the Can.RefreshNetwork method.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.Can(0).NodeCount

Syntax

Visual Basic

Property NodeCount As Long
IDL Interface

[propget] HRESULT NodeCount([out, retval] long *pVal)

See Also


Can.NodeList

Description

This property lists the CAN identification numbers of the compatible CAN nodes that are on the controller's CANOpen network. The length of the list is equal to Can.NodeCount.

This property is determined at the initialization of the Can object and can be refreshed by calling the Can.RefreshNetwork method.

This property cannot be saved to flash memory.

Type

Array of Long (read only)

Visual Basic Example

x = Controller.Can(0).NodeList

Syntax

Visual Basic

Property NodeList() As Long
IDL Interface

[propget] HRESULT NodeList(([out, retval] SAFEARRAY(long)* pVal)

See Also


Can.RefreshNetwork

Description

This discovers the compatible nodes on the controller's CANOpen network and updates the Can.NodeCount and Can.NodeList properties.

This property cannot be saved to flash memory.

Visual Basic Example

x = Controller.Can(0).Clock

Syntax

Visual Basic

Sub RefreshNetwork
IDL Interface

[propget] HRESULT RefreshNetwork()

See Also


Can.BootloaderVersion

Description

Returns the boot loader version of the Can network controller.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.Can(0).BootloaderVersion

Syntax

Visual Basic

Property BootloaderVersion As Long
IDL Interface

propget] HRESULT BootloaderVersion([out, retval] long *pVal)

See Also

Can Overview


Can.FirmwareVersion

Description

Returns the version of the firmware for the Can network controller.

The string returned will include the version, revision, and sub-revision of the current firmware (ex: 2A3).

This property cannot be saved to flash memory.

Type

String (read only)

Visual Basic Example

x = Controller.Can(0).FirmwareVersion

Syntax

Visual Basic

Property FirmwareVersion As String
IDL Interface

[propget] HRESULT FirmwareVersion([out, retval] BSTR *pVal)

See Also


Controller.Abort

Description

Performs an Abort command on all the motion sub-objects of the controller.

Visual Basic Example

Controller.Abort

Syntax

Visual Basic

Sub Abort(
IDL Interface

HRESULT Abort()

See Also

Motion Object:
Abort


Controller.EStop

Description

Performs an EStop command on all the motion sub-objects of the controller.

Visual Basic Example

Controller.Abort

Syntax

Visual Basic

Sub EStop()
IDL Interface

HRESULT EStop()

See Also

Motion Object:
Estop


Controller.EStopAbort

Description

This method will perform an EStopAbort command on all the motion sub-objects on this Controller.

Visual Basic Example

Controller.EStopAbort

Syntax

Visual Basic

Sub EStopAbort( )
IDL Interface

HRESULT EStopAbort()

See Also

Motion Object:
EStopAbort


Controller.AxisCount

Description

The number of axes this controller is currently controlling.

The motion controller closes the control loops on axes zero through (AxisCount - 1) All the other axes are not controlled. The maximum value this property can take is AxisCountMax.

This property is commonly used to reduce the number of axes being controlled to allow the controller's sample rate to be increased.

Type

Long

Visual Basic Example

x = Controller.AxisCount

Controller.AxisCount = 5

Syntax

Visual Basic

Property AxisCount As Long
IDL Interface

[propget] HRESULT AxisCount([out, retval] long *pVal)

[propput] HRESULT AxisCount([in] long newVal)

See Also

AxisCountMax

Axis Object


Controller.AxisCountMax

Description

The maximum number of axis software objects the controller can support.

This property may be larger than the actual number of axes that can be connected to the controller.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.AxisCountMax

Syntax

Visual Basic

Property AxisCountMax As Long
IDL Interface

[propget] HRESULT AxisCountMax([out, retval] long *pVal)

See Also

AxisCount

Axis Object


Controller.CanCount

Description

The number of Can objects currently allowed to be configured and accessed on the controller.

The motion controller will only use Can objects zero through (CanCount - 1). All the other Can objects are not controlled. The maximum value this property can take is CanCountMax.

NOTE: For the XMP family of controllers, this property is fixed at a value of 1 and cannot be changed. This property is included for compatibility with future controllers that may support more than one Can object.

Type

Long

Visual Basic Example

x = Controller.CanCount

Syntax

Visual Basic

Property CanCount As Long
IDL Interface

[propget] HRESULT CanCount([out, retval] long *pVal)

[propput] HRESULT CanCount([in] long newVal)

See Also

CanCountMax

Can Object


Controller.CanCountMax

Description

The maximum number of Can software objects the controller can support.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.CanCountMax

Syntax

Visual Basic

Property CanCountMax As Long
IDL Interface

[propget] HRESULT CanCountMax([out, retval] long *pVal)

See Also

CanCount

Can Object


Controller.FlashSave

Description

Saves the current controller object settings to flash memory. This configuration will be loaded onto the controller during the next power up or controller reset.

This method saves only the configuration properties of the controller object. To save the configuration of the controller object and all sub-objets, use the FlashSaveAll method.

Visual Basic Example

Controller.FlashSave

Syntax

Visual Basic

Sub FlashSave()
IDL Interface

HRESULT FlashSave()

See Also

FlashSaveAll

Axis Object:
FlashSave

Motion Object:
FlashSave


Controller.FlashSaveAll

Description

Saves the current settings of the controller object and all sub-objects to flash memory. This configuration will be loaded onto the controller during the next power up or controller reset.

Visual Basic Example

Controller.FlashSaveAll

Syntax

Visual Basic

Property EncoderFaultTrigger(trigger As meiEncoderFaultTrigger) As Boolean
IDL Interface

[propget] HRESULT EncoderFaultTrigger([in] meiEncoderFaultTrigger trigger,
[out, retval] bool *pVal)

[propput] HRESULT EncoderFaultTrigger([in] meiEncoderFaultTrigger trigger,
[in] bool newVal)

See Also

FlashSave

Axis Object:
FlashSave

Motion Object:
FlashSave


Controller.MotionCount

Description

The number of motion objects currently being controlled.

The motion controller uses motion objects zero through (MotionCount - 1) All the other motion objects are not controlled. The maximum value this property can take is MotionCountMax.

This property is commonly used to reduce the number of motion objects being controlled to allow the controller's sample rate to be increased.

Type

Long

Visual Basic Example

x = Controller.MotionCount

Controller.MotionCount = 5

Syntax

Visual Basic

Property MotionCount As Long
IDL Interface

[propget] HRESULT MotionCount([out, retval] long *pVal)

[propput] HRESULT MotionCount([in]long newVal)

See Also

MotionCountMax


Controller.MotionCountMax

Description

The maximum number of motion software objects the controller can support.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.MotionCountMax

Syntax

Visual Basic

Property MotionCountMax As Long
IDL Interface

[propget] HRESULT MotionCountMax([out, retval] long *pVal)

See Also

MotionCount


Controller.RecorderCount

Description

The number of recorders currently allowed to be configured and started on the controller.

The motion controller will only use recorders zero through (RecorderCount - 1). All the other recorders are not controlled. The maximum value this property can take is RecorderCountMax.

NOTE: For the XMP family of controllers, this property is fixed at a value of 1 and cannot be changed. This property is included for compatibility with future controllers that may support more than one recorder object.

Type

Long

Visual Basic Example

x = Controller.RecorderCount

Syntax

Visual Basic

Property RecorderCount As Long
IDL Interface

[propget] HRESULT RecorderCount([out, retval] long *pVal)

[propput] HRESULT RecorderCount([in] long newVal)

See Also

RecorderCountMax

Recorder Object


Controller.RecorderCountMax

Description

The maximum number of recorder software objects the controller can support.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.RecorderCountMax

Syntax

Visual Basic

Property RecorderCountMax As Long
IDL Interface

[propget] HRESULT RecorderCountMax([out, retval] long *pVal)

See Also

RecorderCount

Recorder Object


Controller.SampleRate

Description

Specifies the servo rate for all axes on the motion controller.

NOTE: The Init method must be called to connect to a motion controller after the properties Address, Number, Port, and/or Type have been changed.

Units

Hertz

Type

Double

Visual Basic Example

x = Controller.SampleRate

Controller.SampleRate = 4000.0

Syntax

Visual Basic

Property SampleRate As Double

IDL Interface

[propget] HRESULT SampleRate([out, retval] double* pVal)

[propput] HRESULT SampleRate([in] double newVal)


Controller.SqNodeCount

Description

The number of SqNode objects currently accessed by the controller.

The range of indexes for the controller's SqNode objects range from zero through (SqNodeCount - 1). This value is determined by the number of physical SynqNet nodes connected to enabled SynqNet networks. The maximum value this property can take is SqNodeCountMax.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.SqNodeCount

Syntax

Visual Basic

Property SqNodeCount As Long
IDL Interface

[propget] HRESULT SqNodeCount([out, retval] long *pVal)

See Also

SqNodeCountMax

SqNode Object


Controller.SqNodeCountMax

Description

The maximum number of SqNode software objects the controller can support.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.SqNodeCountMax

Syntax

Visual Basic

Property SqNodeCountMax As Long
IDL Interface

[propget] HRESULT SqNodeCountMax([out, retval] long *pVal)

See Also

SqNodeCount

SqNode Object


Controller.SynqNetCount

Description

The number of SynqNet objects currently allowed to be configured and accessed on the controller.

The motion controller will only use SynqNet objects zero through (SynqNetCount - 1). All the other SynqNet objects are not controlled. The maximum value this property can take is SynqNetCountMax.

NOTE: For the XMP family of controllers, this property is fixed at a value of 1 and cannot be changed. This property is included for compatibility with future controllers that may support more than one SynqNet object.

Type

Long

Visual Basic Example

x = Controller.SynqNetCount

Syntax

Visual Basic

Property SynqNetCount As Long
IDL Interface

[propget] HRESULT SynqNetCount([out, retval] long *pVal)

[propput] HRESULT SynqNetCount([in] long newVal)

See Also

SynqNetCountMax

SynqNet Object


Controller.SynqNetCountMax

Description

The maximum number of SynqNet software objects the controller can support.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.SynqNetCountMax

Syntax

Visual Basic

Property SynqNetCountMax As Long
IDL Interface

[propget] HRESULT SynqNetCountMax([out, retval] long *pVal)

See Also

SynqNetCount

SynqNet Object


Controller.Enum

Description

The integer value associated with an MPX enumeration name. This is particularly useful for programming languages that do not import ActiveX enumerations. Scripting languages are the most common examples.

NOTE: This property only exists in ActiveX versions of the MPX.

This property cannot be saved to flash memory.

Arguments

Argument | Type | Description
enumName | String | The name of the MPX enumeration whose value is to be returned.

Type

Long (read only)

Visual Basic Example

meiActionStop = Controller.Enum("meiActionStop")

Syntax

Visual Basic

Property Enum(enumName As String) As Long
IDL Interface

[propget] HRESULT Enum([in] BSTR enumName, [out, retval] long *pVal)

See Also

MPX Enumerations


Controller.OnAnyEvent

Description

A callback method that is automatically called in response to events from the controller.

This method needs to be defined by the user.

Arguments

Argument | Type | Description
Type | meiEventType | The type of event generated by the Controller.
Number | Long | This is the number of the axis or motion object that generated an event.
Info | Array of Long | Captured event data. The information that is captured is different for the different types of events. Please refer to the event descriptions for information about what data is captured.

Visual Basic Example

Sub Controller_OnAnyEvent( Type, Number, Info )
' Actions
End Sub

Syntax

Visual Basic

Sub OnAnyEvent(EventType As meiEventType,
Number As Long,
Info() As Long)
IDL Interface

HRESULT OnAnyEvent([in] meiEventType EventType,
[in] long Number,
[in] SAFEARRAY(long) Info)

See Also

Events


Controller.OnErrorEvent

Description

A callback method that is automatically called in response to error events from the controller.

This method needs to be defined by the user.

Arguments

Argument | Type | Description
Type | meiEventType | The type of event generated by the Controller.
Number | Long | This is the number of the axis or motion object that generated an event.
Info | Array of Long | Captured event data. The information that is captured is different for the different types of events. Please refer to the event descriptions for information about what data is captured.

Visual Basic Example

Sub Controller_OnErrorEvent(Type, Number, Info)
' Actions
End Sub

Syntax

Visual Basic

Sub OnErrorEvent(EventType As meiEventType,
Number As Long,
Info() As Long)
IDL Interface

HRESULT OnErrorEvent([in] meiEventType EventType,
[in] long Number,
[in] SAFEARRAY(long) Info)

See Also

Events Overview


Controller.OnMotionEvent

Description

A callback method that is automatically called in response to motion events from the controller.

This method needs to be defined by the user.

Arguments

Argument | Type | Description
Type | meiEventType | The type of event generated by the Controller.
Number | Long | This is the number of the axis or motion object that generated an event.
Info | Array of Long | Captured event data. The information that is captured is different for the different types of events. Please refer to the event descriptions for information about what data is captured.

Visual Basic Example

Sub Controller_OnMotionEvent(Type, Number, Info)
' Actions
End Sub

Syntax

Visual Basic

Sub OnMotionEvent(EventType As meiEventType,
Number As Long,
Info() As Long)
IDL Interface

HRESULT OnMotionEvent([in] meiEventType EventType,
[in] long Number,
[in] SAFEARRAY(long) Info)

See Also

Events


Controller.OnRecorderBufferDone

Description

A callback method that returns a buffer of data filled by a recorder object. Returned with the buffer is a message that describes any events associated with the buffer. For example, when the last buffer is filled, the message variable will be set equal to meiRecorderMessageStopped indicating that the recorder object has stopped recording data.

This method needs to be defined by the user.

Arguments

Argument | Type | Description
message | meiRecorderMessage | Recorder message associated with the buffer.
number | long | The object number of the recorder that is returning a buffer.
buffer | Variant | The buffer of data being returned.
validSamples | long | The number of valid samples the returned buffer contains.

Type

Boolean

Visual Basic Example

Sub Controller_OnRecorderBufferDone(message, number, buffer, validSamples)
' Actions
End Sub

Syntax

Visual Basic

Sub OnRecorderBufferDone(message As meiRecorderMessage,
number As long
buffer As Variant
validSamples As long)
IDL Interface

HRESULT OnRecorderBufferDone([in] meiRecorderMessage message,
[in] long number,
[in] VARIANT* buffer,
[in] long validSasmples)

See Also

meiRecorderMessage

Recorder Object:
AddBuffer
Start
Stop


Controller.FirmwareDownload

Description

Downloads firmware and FPGA files from the host computer to the motion controller's flash memory.

Arguments

Argument | Type | Description
filename | String | The name of the file which contains the the firmware image to be downloaded.
fpga1 | String | The name of an optional FPGA image file.
fpga2 | String | The name of an optional second FPGA image file.
fpga3 | String | The name of an optional third FPGA image file.

Visual Basic Example

Controller.FirmwareDownload "firmware.bin"

Syntax

Visual Basic

Sub FirmwareDownload(fileName As String,
fpga1 As String = Empty,
fpga2 As String = Empty,
fpga3 As String = Empty)
IDL Interface

HRESULT FirmwareDownload([in] BSTR fileName,
[in, defaultvalue("")] BSTR fpga1,
[in, defaultvalue("")] BSTR fpga2,
[in, defaultvalue("")] BSTR fpga3)

See Also


Controller.FirmwareUpload

Description

Uploads a copy of the controller's firmware and flash memory settings to a file on the host.

Arguments

Argument | Type | Description
fileName | String | The name of the file where the firmware image will be stored

Visual Basic Example

Controller.FirmwareUpload "firmware.bin"

Syntax

Visual Basic

Sub FirmwareUpload(fileName As String)
IDL Interface

HRESULT FirmwareUpload([in] BSTR fileName)

See Also


Controller.FirmwareVersion

Description

Returns the version of the firmware of the controller.

The string returned will include the version, revision, sub-revision and option of the current firmware, for example "341A5."

This property cannot be saved to flash memory.

Type

String (read only)

Visual Basic Example

x = Controller.FirmwareVersion

Syntax

Visual Basic

Property FirmwareVersion As String
IDL Interface

[propget] HRESULT FirmwareVersion([out, retval] BSTR *pVal)

See Also


Controller.MPIVersion

Description

This property returns the version of the MPI DLL used to communicate with the controller.

This property cannot be saved to flash memory.

Type

String (read only)

Visual Basic Example

x = Controller.MPIVersion

Syntax

Visual Basic

Property MPIVersion As String
IDL Interface

[propget] HRESULT MPIVersion([out, retval] BSTR *pVal)

See Also

FirmwareVersion


Controller.Address

Description

Specifies the name or IP address of the server where the motion controller card is located.

NOTE: The Init method must be called to connect to a motion controller after the properties Address, Number, Port, and/or Type have been changed.

Address is used with the Port and Number properties when the Type property is set to meiControlTypeRemote.

This property cannot be saved to flash memory.

Type

String

Visual Basic Example

x = Controller.Address

Controller.Address = "1.2.3.4"

Syntax

Visual Basic

Property Address As String
IDL Interface

[propget] HRESULT Address([out, retval] BSTR* pVal)

[propput] HRESULT Address([in] BSTR newVal)

See Also


Controller.Init

Description

Initializes the interface between the host computer and the motion controller. For SynqNet systems, this will also attempt to initialize the SynqNet protocol if the controller is not in "synq" mode.

When a Controller object is created, this method will automatically be called. In Visual Basic programs you would only need to use this property if you wanted to change the controller being used by changing the Type, Number, Address or Port properties.

This property cannot be saved to flash memory.

Visual Basic Example

Controller.Init

Syntax

Visual Basic

Sub Init
IDL Interface

HRESULT Init()

See Also


Controller.Number

Description

Specifies the ID number of the motion controller card to use.

NOTE: The Init method must be called to connect to a motion controller after the properties Address, Number, Port, and/or Type have been changed.

The MEI device driver assigns unique numbers to each controller on a host machine. The first controller is numbered 0 and other controllers are numbered sequentially from this.

This property cannot be saved to flash memory.

Type

Long

Default

0

Visual Basic Example

x = Controller.Number

Controller.Number = 1

Syntax

Visual Basic

Property Number As Long
IDL Interface

[propget] HRESULT Number([out, retval] long *pVal)

[propput] HRESULT Number([in]long newVal)

See Also


Controller.Port

Description

Specifies the TCP port to be used when connecting to a remote server.

NOTE: The Init method must be called to connect to a motion controller after the properties Address, Number, Port, and/or Type have been changed.

Port is used with the Address and Number properties when the Type property is set to meiControlTypeRemote.

This property cannot be saved to flash memory.

Type

Long

Default

3300

Visual Basic Example

x = Controller.Port

Controller.Port = 3301

Syntax

Visual Basic

Property Port As Long
IDL Interface

[propget] HRESULT Port([out, retval] long *pVal)

[propput] HRESULT Port([in] long newVal)

See Also


Controller.Reset

Description

Resets the motion controller, putting the controller into the same state it would assume immediately after it powers up.

Visual Basic Example

Controller.Reset

Syntax

Visual Basic

Sub Reset()
IDL Interface

HRESULT Reset()

See Also

Controller Initialization Overview


Controller.Type

Description

Specifies whether the motion controller card is in the local computer or a remote computer.

NOTE: The Init method must be called to connect to a motion controller after the properties Address, Number, Port, and/or Type have been changed.

  • meiControllerTypeLocal - The controller is in the local computer
  • meiControllerTypeRemote - The controller is in a remote computer

The following table shows which other properties are required for each of the controller types.

Type | Number | Address | Port
meiControllerTypeLocal | Required | Ignored | Ignored
meiControllerTypeRemote | Required | Required | Required

This property cannot be saved to flash memory.

Type

meiControllerType

Default

meiControllerTypeLocal

Visual Basic Sample

Controller.Type = meiControllerTypeLocal

Syntax

Visual Basic

Property Type As meiControllerType
IDL Interface

[propget] HRESULT Type([out, retval] meiControllerType *pVal)

[propput] HRESULT Type([in] meiControllerType newVal)

See Also


Controller.Axis

Description

An axis sub-object of the controller.

This property cannot be saved to flash memory.

Arguments

Argument | Description
Index | The index of the axis object to be accessed

Type

MPX Axis (read only)

Visual Basic Example

Set xAxis = Controller.Axis(0)

Syntax

Visual Basic

Property Axis(Index As Long) As MPXCtl.Axis
IDL Interface

[propget] HRESULT Axis([in] long Index,
[out, retval] IAxis** ppAxis)

See Also

Axis Object


Controller.Can

Description

A Can sub-object of the controller which represents one physical CANOpen network.

This property cannot be saved to flash memory.

Arguments

Argument | Description
Index | The index of the Can object to be accessed.

Type

MPX Can (read only)

Visual Basic Example

Set can = Controller.Can(0)

Syntax

Visual Basic

Property Can(Index As Long) As MPXCtl.Can
IDL Interface

[propget] HRESULT Can([in] long Index,
[out, retval] ICan** ppCan)

See Also

Can Object


Controller.Map

Description

The map sub-object of the controller.

This property cannot be saved to flash memory.

Arguments

Argument | Description
Index | The of the map object to be accessed

Type

MPX Map (read only)

Visual Basic Example

Set map = Controller.Map

Syntax

Visual Basic

Property Map(Index As Long) As MPXCtl.Map

IDL Interface

[propget] HRESULT Map([in] long Index,
[out, retval] IMap** ppMap)

See Also

Map Object


Controller.Motion

Description

A motion sub-object of the controller.

This property cannot be saved to flash memory.

Arguments

Argument | Description
Index | The of the motion object to be accessed

Type

MPX Motion (read only)

Visual Basic Example

Set xMotion = Controller.Motion(0)

Syntax

Visual Basic

Property Motion(Index As Long) As MPXCtl.Motion
IDL Interface

[propget] HRESULT Motion([in] long Index,
[out, retval] IMotion** ppMotion)

See Also

Motion Object


Controller.Recorder

Description

A recorder sub-object of the controller.

This property cannot be saved to flash memory.

Arguments

Argument | Description
Index | The of the recorder object to be accessed

Type

MPX Recorder (read only)

Visual Basic Example

Set recorder0 = Controller.Recorder(0)

Syntax

Visual Basic

Property Recorder(Index As Long) As MPXCtl.Recorder
IDL Interface

[propget] HRESULT Recorder([in] long Index,
[out, retval] IRecorder** ppRecorder)

See Also

Recorder Object


Controller.SqNode

Description

An SqNode sub-object of the controller which represents one physical SynqNet node.

This property cannot be saved to flash memory.

Arguments

Argument | Description
Index | The index of the SqNode object to be accessed.

Type

MPX SynqNet (read only)

Visual Basic Example

Set sqNode0 = Controller.SqNode(0)

Syntax

Visual Basic

Property SqNode(Index As Long) As MPXCtl.SqNode
IDL Interface

[propget] HRESULT SqNode([in] long Index,
[out, retval] ISqNode** ppSqNode)

See Also

SqNode Object


Controller.SynqNet

Description

A SynqNet sub-object of the controller which represents one physical SynqNet network.

This property cannot be saved to flash memory.

Arguments

Argument | Description
Index | The index of the SynqNet object to be accessed.

Type

MPX SynqNet (read only)

Visual Basic Example

Set synqNet = Controller.SynqNet(0)

Syntax

Visual Basic

Property SynqNet(Index As Long) As MPXCtl.SynqNet
IDL Interface

[propget] HRESULT SynqNet([in] long Index,
[out, retval] ISynqNet** ppSynqNet)

See Also

SynqNet Object


meiAction

The meiAction enumeration values represent actions for Motion objects.

meiAction | Meaning
meiActionAbort | Makes all axes' amplifiers associated with a Motion object inactive and places the Motion object in an error state
meiActionStop | Brings a Motion object to a stop in StopTime seconds
meiActionEStop | Brings a Motion object to a stop in EStopTime seconds and places the Motion object in an error state
meiActionEStopAbort | Performs an EStop action followed by an Abort action
meiActionResume | Causes a Motion object that has been stopped to resume motion
meiActionReset | Clears the error state of a Motion object
meiActionNone | Performs no action

See Also

Motion Object:
Abort
Stop
EStop
EStopAbort
Resume
Reset

Axis Object:
AmpFaultAction
EncoderFaultAction
HomeAction
LimitHwNegAction
LimitHwPosAction
LimitPositionErrorAction
LimitSwNegAction
LimitSwPosAction


meiAmpFaultSrc

The meiAmpFaultSrc enumeration values represent sources for amplifier faults.

meiSynqNetPort | Description
meiAmpFaultSrcAmp | External amp fault input pin. Indicates a fault condition in the amplifier.
meiAmpFaultSrcDrive | Bit in the drive interface status register. Indicates a fault condition in the drive.
meiAmpFaultSrcWatchdog | Bit in the drive interface status register. Indicates a drive failure due to a watchdog timeout. The node alternately sets/clears the watchdog each sample, the drive's processor then clears/sets the watchdog. If the drive's processor does not respond, the watchdog fault bit is set.
meiAmpFaultSrcChecksum | Bit in the drive interface status register. Indicates the data transfer (via serial or parallel memory interface) between the failed SynqNet node FPGA and drive with a checksum error.
meiAmpFaultSrcFeedback | Bit in the drive interface status register. Active when one or more of the feedback status bits is triggered. Indicates that the drive/motor position feedback system has failed.
meiAmpFaultSrcAmpNotPowered | Bit in the drive interface status register. The SynqNet drive amplifier power stage does not have sufficient voltage. The motor windings cannot be energized properly until this bit is clear.
meiAmpFaultSrcDriveNotReady | Bit in the drive interface status register. The SynqNet drive is not ready to receive commands or servo motors. This fault indicates that the drive has either not completed its processor initialization or there is some other serious drive processor problem.

See Also

Axis Object:
AmpFaultConfig


meiCanBusState

The meiCanBusState enumeration values represent the various bus states of the CAN controller's interface.

meiCanBusState | Description
meiCanBusStateOff | The CAN hardware will be isolated from the network.
meiCanBusStatePassive | The CAN hardware will detect errors but will not generate error messages.
MeiCanBusStateOperational | The CAN hardware is communicating across the network.

See Also

Can Object:
BusState


meiCanNodeHealthType

The meiCanNodeHealthType enumeration values represent the health protocol being used by a particular CAN node.

meiCanNodeHealthType | Description
meiCanNodeHealthTypeHeartBeating | TBD
meiCanNodeHealthTypeNodeGuarding | TBD

See Also

CanNode Object:
HealthType


meiCanNmtState

The meiCanNmtState enumeration values represent the NMT (network management) states of a node on a CANOpen network. The XMP's CAN controller will automatically put all nodes into the meiCanNmtStateOperational state during the initialization of the network.

meiCanNmtState | Description
meiCanNmtStateBootUp | TBD
meiCanNmtStateStopped | TBD
meiCanNmtStateOperational | TBD
meiCanNmtStatePreOperational | TBD
meiCanNmtStateUnknown | TBD

See Also

CanNode Object:
NmtState


meiCanTxType

The meiCanTxType enumeration values represent the different types of transmission of CAN I/O data.

meiCanTxType | Meaning
meiCanTxTypeCyclic | I/O data is transmitted with every cycle of a cyclic transmission protocol.
meiCanTxTypeEvent | I/O data is transmitted only on the change of a value.

See Also

CanNode Object:
AnalogInTxType
AnalogOutTxType
DigitalInTxType
DigitalOutTxType

Can Technology Overview:
CAN Transmission Types


meiCaptureEdge

The meiCaptureEdge enumeration values represent the edge of trigger state upon which the capture engine will record the encoder value. Please see the diagram below for more information.

meiCaptureEdge | Description
meiCaptureEdgeRising | Encoder Position recorded on the rising edge of the trigger state.
meiCaptureEdgeFalling | Encoder Position recorded on the falling edge of the trigger state.
meiCaptureEdgeTransition | Encoder Position recorded on any transition of the trigger state.
meiCaptureEdgeNone | Encoder Position never recorded.

See Also

Axis Object:
CaptureEdge


meiCaptureSource

The meiCaptureSource enumeration values represent sources for the capture engine trigger. Please see diagram below for more information.

meiCaptureSource | Description | Related I/O
meiCaptureSourceHome | The home input | meiInputHome
meiCaptureSourceIndex | The index input | meiInputIndex
meiCaptureSourceHwNeg | The positive hardware limit | meiInputHwPos
meiCaptureSourceHwPos | The negative hardware limit | meiInputHwNeg
meiCaptyureSourceIo0 | Node-specific input 0 | meiInputIo0
meiCaptyureSourceIo1 | Node-specific input 1 | meiInputIo1
meiCaptyureSourceIo2 | Node-specific input 2 | meiInputIo2
meiCaptyureSourceIo3 | Node-specific input 3 | meiInputIo3
meiCaptyureSourceIo4 | Node-specific input 4 | meiInputIo4
meiCaptyureSourceIo5 | Node-specific input 5 | meiInputIo5
meiCaptyureSourceIo6 | Node-specific input 6 | meiInputIo6
meiCaptyureSourceIo7 | Node-specific input 7 | meiInputIo7
meiCaptureSourceGlobal | The global capture bit | N/A

See Also

meiInput

Axis Object:
CaptureSourceEnable
CaptureSourceLevel


meiCaptureState

The meiCaptureState enumeration values represent states of an axis' high speed position capturing engine.

meiCaptureState | Description
meiCaptureStateIdle | The capture engine is not armed. An encoder position has not yet been caputred.
meiCaptureStateArmed | The capture engine is armed.
meiCaptureStateCaptured | An encoder position has been captured and stored in CapturePosition. The engine is ready to be rearmed.

See Also

Axis Object:
CaptureState


meiCaptureType

The meiCaptureType enumeration values represent the different methods used for high-speed position capturing from a digital input.

meiCanType | Meaning
meiCaptureTypePosition | The current position register is recorded at the transition of the capture trigger. This method is usually used only for quadrature feedback.
meiCaptureTypeTime | The capture value is interpolated from the two surrounding position register values. This method is usually used for serial encoder interfaces.

See Also

Axis Object:
CaptureType


meiCableStatus

The meiCableStatus enumeration values represent a network cable's operating condition. Data transmission is verified in both directions. If the network hardware does not support separate upstream and downstream data path verification, it will report either meiCableStatusGood or meiCableStatusBad.

meiCableStatus | Description
meiCableStatusBad | Network communication across the cable failed in both directions.
meiCableStatusBadDownstream | Network communication across the cable failed in the downstream direction (from the controller to the node).
meiCableStatusBadUpstream | Network communication across the cable failed in the upstream direction (from node to controller).
meiCableStatusGood | Network communication across the cable is working properly in both directions.

See Also

SynqNet Object:
IdleCableStatus


meiControllerType

Description

This enumeration defines the two different types of location where a controller can exist.

Enumeration | Description
meiControllerTypeLocal | The controller is on this machine
meiControllerTypeRemote | The controller is on another machine and we will use the MEI TCP/IP protocol to communicate to it.

See Also

Type


meiDemand

The meiDemand enumeration values represent axis demand outputs.

meiDemandValue | Meaning
meiDemandOutput | The demand ouput of the axis' filter algorithm
meiDemandPrimary | The primary demand output
meiDemandAuxiliary | The auxiliary demand output

See Also

Axis Object:
DemandLevel


meiEncoderFaultSrc

The meiCanTxType enumeration values represent the different types of transmission of CAN I/O data.

meiCanTxType | Meaning
meiEncoderFaultSrcPrimary | Only the primary encoder will generate encoder faults.
meiEncoderFaultSrcAuxiliary | Only the auxiliary encoder will generate encoder faults.
meiEncoderFaultSrcAll | All encoders will generate encoder faults.

See Also

Axis Object:
EncoderFaultSource


meiEncoderFaultTrigger

The meiEncoderFaultTrigger enumeration values represent possible triggers for encoder fault detection.

meiEncoderFaultTrigger | Description
meiEncoderFaultTriggerBrokenWire | Determines whether one of the encoder lines is broken or not connected to either the encoder of controller
meiEncoderFaultTriggerIllegalState | Determines whether the states of the A and B encoder signals change simultaneously
meiEncoderFaultTriggerAbsolute | Determines whether an absolute encoder has produced a fault

See Also

Axis Object:
EncoderFaultTrigger


meiError

This enumeration defines the different motion states of a motion object.

Enumeration | Description
meiErrorNone | No error
meiErrorMpiMpxMismatch | MPI dll does not match MPX ActiveX control
meiErrorArgument | Argument invalid
meiErrorParameter | Parameter invalid
meiErrorNoMemory | Out of memory
meiErrorObjectNotEnabled | Object not enabled
meiErrorTimeout | MPX Timeout
meiErrorUnsupported | Feature not supported
meiErrorFatal | Fatal error
meiErrorFileClose | Error closing a file
meiErrorFileOpen | Error opening a file
meiErrorFileRead | Error reading from a file
meiErrorFileWrite | Error writing to a file
meiErrorAxisCommandNotSet | Command position not set
meiErrorAxisHomeSource | Cannot set HomeInvert = false when HomeSource = meiHomeSourceCapture
meiErrorControllerAddress | Controller.Address invalid
meiErrorControllerNumber | Controller.Number invalid
meiErrorControllerType | Controller.Type invalid
meiErrorControllerInterruptsDisabled | Controlller interrupts disabled
meiErrorControllerMemoryOverflow | Controller memory overflow
meiErrorControllerCount | Object count invalid
meiErrorAxisFilterAlgorithm | Axis.FilterAlgorithm invalid
meiErrorMotionAxisNotFound | Axis not found
meiErrorMotionAxisCount | Axis count error
meiErrorMotionAttribute | Motion attribute invalid
meiErrorMotionNotReady | Motion object not ready
meiErrorMotionIdle | Motion.State is meiStateIdle
meiErrorMotionMoving | Motion.State is meiStateMoving
meiErrorMotionStopping | Motion.State is meiStateStopping
meiErrorMotionStoppingError | Motion.State is meiStateStoppingError
meiErrorMotionError | Motion.State is meiStateError
meiErrorRecorderStarted | Recorder has started executing
meiErrorRecorderStopped | Recorder is not executing
meiErrorRecorderNotConfigured | Recorder has not been configured
meiErrorCanFirmwareInvalid | Can firmware invalid
meiErrorCanFirmwareVersion | Can firmware version invalid
meiErrorFlashRead | Flash memory could not be read
meiErrorFlashWrite | Flash memory could not be written to
meiErrorMapName | Invalid characters in name
meiErrorMapNameNotFound | Could not find name
meiErrorMapIndex | Index invalid
meiErrorMapFile | Map file invalid or not found
meiErrorPacketError | Packet error while communicating with server
meiErrorDevice | Device driver invalid
meiErrorDeviceError | Device driver error


meiEventType

The meiEventType enumeration values represent controller event types.

meiEventTypeValue | Source | Event Handler | Meaning
meiEventTypeLimitPositionError | Axis | OnErrorEvent | Position Error Limit Event
meiEventTypeLimitHwPos | Axis | OnErrorEvent | Positive Hardware Limit Event
meiEventTypeLimitHwNeg | Axis | OnErrorEvent | Negative Hardware Limit Event
meiEventTypeLimitSwPos | Axis | OnErrorEvent | Positive Software Limit Event
meiEventTypeLimitSwNeg | Axis | OnErrorEvent | Negative Software Limit Event
meiEventTypeAmpFault | Axis | OnErrorEvent | Amplifier Fault Event
meiEventTypeEncoderFault | Axis | OnErrorEvent | Encoder Fault Event
meiEventTypeLimitTorque | Axis | OnErrorEvent | Torque Limit Event
meiEventTypeUserLimit0 | Axis | OnAnyEvents | User Limit 0 Event
meiEventTypeUserLimitn | Axis | OnAnyEvents | User Limit n Event
meiEventTypeUserLimit15 | Axis | OnAnyEvents | User Limit 15 Event
meiEventTypeHome | Axis | OnMotionEvent | Home Event
meiEventTypeInPositionCoarse | Axis | OnMotionEvent | In Coarse Position Tolerance Event
meiEventTypeSettled | Axis | OnMotionEvent | In Fine Position Tolerance Event
meiEventTypeAtTarget | Axis | OnMotionEvent | At Target Event
meiEventTypeFrame | Axis | OnMotionEvent | ???
meiEventTypeDone | Motion | OnMotionEvent | Motion is Complete
meiEventTypeAtVelocity | Motion | OnMotionEvent | At Slew Velocity
meiEventTypeOutOfFrames | Motion | OnMotionEvent | Motion is Out of Frames
meiEventTypePowerFault | Controller | OnAnyEvents | Supply Voltage is Low
meiEventTypeRecorderFull | Object not accessible by ActiveX control | OnAnyEvents | Recoder is Full
meiEventTypeRecorderDone | Object not accessible by ActiveX control | OnAnyEvents | Recoder has Completed
meiEventTypeExternal | Object not accessible by ActiveX control | OnAnyEvents | External Event
meiEventTypeSynqNetDead | SynqNet | OnErrorEvent | SynqNet network is dead
meiEventTypeSynqNetRxFailure | SynqNet | OnErrorEvent | SynqNet network data receive error
meiEventTypeSynqNetTxFailure | SynqNet | OnErrorEvent | SynqNet network data transmit error
meiEventTypeSynqNetNodeFailure | SynqNet | OnErrorEvent | SynqNet node failure
meiEventTypeSynqNetRecovery | SynqNet | OnErrorEvent | SynqNet network recovery
meiEventTypeSqNodeIoAbort | SqNode | OnErrorEvent | SynqNet node I/O abort
meiEventTypeSqNodeDisable | SqNode | OnErrorEvent | SynqNet node disabled
meiEventTypeSqNodeAlarm | SqNode | OnErrorEvent | SynqNet node alarm
meiEventTypeSqNodePowerFault | SqNode | OnErrorEvent | SynqNet node power fault
meiEventTypeSqNodeUserFault | SqNode | OnErrorEvent | SynqNet node user fault
meiEventTypeSqNodeFailure | SqNode | OnErrorEvent | SynqNet node failure
meiEventTypeCanBusState | Can | OnAnyEvent | Can.BusState has changed.
meiEventTypeCanRxOverrun | Can | OnErrorEvent | CAN receive buffer overrun
meiEventTypeCanEmergency | Can | OnErrorEvent | CAN network emergency
meiEventTypeCanNodeBoot | Can | OnAnyEvent | Boot message received from a node.
meiEventTypeCanHealth | Can | OnAnyEvent | Health type of a node changed.
meiEventTypeCanDigitalIn | Can | OnAnyEvent | CAN digital input state has changed
meiEventTypeCanDigitalOut | Can | OnAnyEvent | CAN digital output state has changed
meiEventTypeNone | No event is to be generated

See Also

Motion Object:
EventEnable

Axis Object:
EventEnable

SynqNet Object:
EventEnable

SqNode Object:
EventEnable

Can Object:
EventEnable


meiFilterAlgorithm

The meiFilterAlgorithm enumeration values represent different control alogorithms to be used by the Axis object.

meiFilterAlgorithm | Meaning
meiFilterAlgorithmNone | No control algorithm. Can use with stepper motors.
meiFilterAlgorithmPID | PID algorithm
meiFilterAlgorithmPIV | PIV algorithm
meiFilterAlgorithmUser | User algorithm implemented with the Firmware Development Kit

See Also

Axis Object:
FilterAlgorithm


meiFilterCoeff

The meiFilterCoeff enumeration values represent filter algorithm coefficients.

meiFilterCoeffValue | Algorithm | Description
meiFilterCoeffPidKp | PID | Proportional Term
meiFilterCoeffPidKi | PID | Integral Term
meiFilterCoeffPidKd | PID | Derivative Term
meiFilterCoeffPidKpff | PID | Position Feed Forward
meiFilterCoeffPidKvff | PID | Velocity Feed Forward
meiFilterCoeffPidKaff | PID | Acceleration Feed Forward
meiFilterCoeffPidKfff | PID | Friction Feed Forward
meiFilterCoeffPidIMaxMoving | PID | Maximum Moving Integral
meiFilterCoeffPidIMaxRest | PID | Maximum Rest Intgral
meiFilterCoeffPidDRate | PID | Derivative Rate measured in samples
meiFilterCoeffPidDRate | PID | Absolute Output Limit measured in Volts
meiFilterCoeffPidOutputLimitAbs | PID | High Output Limit measured in Volts
meiFilterCoeffPidOutputLimitHigh | PID | Low Output Limit measured in Volts
meiFilterCoeffPidOutputLimitLow | PID | Output Offset measured in Volts
meiFilterCoeffPidOutputOffset | PIV | Position Loop Proportional Term
meiFilterCoeffPivKpp | PIV | Position Loop Integral Term
meiFilterCoeffPivKpv | PIV | Velocity Loop Proportional Term
meiFilterCoeffPivKpff | PIV | Position Feed Forward
meiFilterCoeffPivKvff | PIV | Velocity Feed Forward
meiFilterCoeffPivKaff | PIV | Acceleration Feed Forward
meiFilterCoeffPivKfff | PIV | Friction Feed Forward
meiFilterCoeffPivIMaxMoving | PIV | Position Loop Maximum Moving Integral
meiFilterCoeffPivIMaxRest | PIV | Position Loop Maximum Rest Intgral
meiFilterCoeffPivKdv | PIV | Velocity Derivative Term
meiFilterCoeffPivOutputLimitAbs | PIV | Absolute Output Limit measured in Volts
meiFilterCoeffPivOutputLimitHigh | PIV | High Output Limit measured in Volts
meiFilterCoeffPivOutputLimitLow | PIV | Low Output Limit measured in Volts
meiFilterCoeffPivOutputOffset | PIV | Output Offset measured in Volts
meiFilterCoeffPivKiv | PIV | Velocity Integral Term
meiFilterCoeffPivVIntMax | PIV | Velocity Loop Maximum Integral
meiFilterCoeffPivKa0 | PIV | Velocity Smoothing Parameter

See Also

Axis Object:
FilterCoeff


meiHomeSource

The meiHomeSource enumeration values represent possible sources for the home status bit and home events.

meiHomeSource | Description
meiHomeSourceCapture | The home status bit would be determined from CaptureState
meiHomeSourceIo | The home status bit would be determined from the digital home input

See Also

Axis Object:
HomeSource
CaptureState


meiIoConfig

The meiIoConfig enumeration values represent digital I/O configurations.

meiIoConfig | Description
meiIoConfigInput | Io bit is to be used as a digital input
meiIoConfigOutput | Io bit is to be used as a digital output
meiIoConfigStep | Io bit is to be used to output the step pulse for stepper motors. Currently not supported in SynqNet Phase II.
meiIoConfigDir | Io bit is to be used to output the direction state for stepper motors. Currently not supported in SynqNet Phase II.
meiIoConfigCw | Io bit is to be used to output the clockwise pulse for stepper motors. Currently not supported in SynqNet Phase II.
meiIoConfigCcw | Io bit is to be used to output the counter-clockwise pulse for stepper motors. Currently not supported in SynqNet Phase II.
meiIoConfigQuadA | Io bit is to be used to output the quadrature A state for stepper motors. Currently not supported in SynqNet Phase II.
meiIoConfigQuadB | Io bit is to be used to output the quadrature B state for stepper motors. Currently not supported in SynqNet Phase II.
meiIoConfigSource1 ... meiIoConfigSource4 | SynqNet Phase II: Node-specific configurations for digital outputs.

See Also

Axis Object:
IoConfig


meiInput

The meiInput enumeration values represent digital inputs for the axis object.

meiInput | Description
meiInputHwPos | Positive hardware limit input
meiInputHwNeg | Negative hardware limit input
meiInputHome | Home input
meiInputAmpFault | Amplifier fault input
meiInputIndex | Index input
meiInputSimIndex | SIM Index input
meiInputSimEncA | SIM Encoder A input
meiInputSimEncB | SIM Encoder B input
meiInputIo0 | Node-specific output 0
meiInputIo1 | Node-specific output 1
meiInputIo2 | Node-specific output 2
meiInputIo3 | Node-specific output 3
meiInputIo4 | Node-specific output 4
meiInputIo5 | Node-specific output 5
meiInputIo6 | Node-specific output 6
meiInputIo7 | Node-specific output 7
meiInputDriveStatus0 | Node-specific Drive status 0
meiInputDriveStatus1 | Node-specific Drive status 1
meiInputDriveStatus2 | Node-specific Drive status 2

For a breakdown of how the hardware I/O matches up to the MPX software for Analog XMP controllers and SynqNet Phase I RMBs, please see the Hardware to Software Map of I/O.

For information about the map of I/O for other drives/nodes, please contact the manufacturer's drive/node documentation.

See Also

Axis Object:
DigitalIn


meiMap

The meiMap enumeration represents variables on the controller commonly accessed by MPX properties and methods. Most meiMap enumeration values need to be associated with an index value when used by MPX properties and methods.

meiMap | Description | Meaning of Associated Index
meiMapActPos | Actual Position | Axis number
meiMapActVel | Actual Velocity | Axis number
meiMapADC* | ADC Level | ADC number
meiMapAxisDigitalIn | Axis Object's Digital Inputs | Axis number
meiMapAxisDigitalOut | Axis Object's Digital Outputs | Axis number
meiMapAxisStatus | Axis Status | Axis number
meiMapBkgndCycle | Controller's Background Cycle | (none)
meiMapCmdAcc | Command Acceleration | Axis number
meiMapCmdJerk | Command Jerk | Axis number
meiMapCmdPos | Command Position | Axis number
meiMapCmdVel | Command Velocity | Axis number
meiMapDemand | Axis Demand | Axis number
meiMapDemandAuxiliary | Sinusoidal Commutation Auxiliary Demand | Axis number
meiMapDemandPrimary | Sinusoidal Commutation Primary Demand | Axis number
meiMapMotionStatus | Motion Status | Motion number
meiMapSampleCounter | Controller's Sample Counter | (none)
meiMapPosErr | Position Error | Axis number
* Not yet supported by SynqNet Phase II

See Also

Map Object:
DataType
String


meiMoveAttr

Motion attributes change the behavior of the standard motion commands. If no motion attributes are specified then the standard behavior of the motion command is generated.

Attribute
Description
meiMoveAttrRelative

If this attribute is set all position values will be used as relative motion distances instead of final absolute positions.

For example. Without this attribute, a move beginning at position 1000 with a position parameter value of 2000 will move to position 2000. With this attribute, the final move position would have been 3000, a relative distance of 2000 counts from the starting value of 1000.

meiMoveAttrAppend

This attribute makes it possible to buffer several point-to-point motion profiles in the controller.

Repeatedly calling motion commands with this attribute will append the new motions to the previously commanded motions creating a sequence of different motions. When each of these motions complete a new Done event will be generated.

meiMoveAttrModify

This attribute modifies the current motion.

Executing a motion command with this attribute immediately (within two servo cycles) end the current motion and replace it with the new motion, smoothly transitioning between the moves. All the remaining original move will be lost.

If the original move completes before the new modified move has time to start (reaches the Idle state) the new move will not start and return an error. The AutoStart attribute below can be used in conjunction with the Modify attribute in this condition.

meiMoveAttrAutoStart This attribute modifies the Modify action so that the new motion will automatically start, event if the State is Idle.
meiMoveAttrSyncStart

This attribute modifies a point-to-point move that uses more than one axis. If this attribute is set then all the axis moves are separate moves that will begin simultaneously.

See the description of Synchronized Attributes.

meiMoveAttrSyncEnd

This attribute modifies a point-to-point move that uses more than one axis. This is a synchronised motion similar to SyncStart except that each of the axes will end simultaneously.

If SyncStart and SyncEnd are both specified then all the axes will start and stop at the same time with the motion of all the faster axes slowed down to match the time of the slowest axis.

See the description of Synchronized Attributes.

Not all of the different attributes are used by each of the motion commands. The following table shows which attributes are valid for which motion commands. If an attribute is specified for a move type for which it is not valid it will be ignored.

 | Relative | Append | Modify | AutoStart | SyncStart | SyncEnd
Trapizoidal | x | x | x | x | x | x
SCurve | x | x | x | x | x | x
SCurveJerk | x | x | x | x | x | x
Velocity |  | x | x | x | x |
VelocityJerk |  | x | x | x | x |


meiMotorIo

The meiMotorIo enumeration values represent drive-specific configurable I/O.

meiMotorIo | Description | Related I/O
meiMotorIo0 | Drive-specific I/O 0 | meiInput0, meiOutputIo0
meiMotorIo1 | Drive-specific I/O 1 | meiInput1, meiOutputIo2
meiMotorIo2 | Drive-specific I/O 2 | meiInput2, meiOutputIo2
meiMotorIo3 | Drive-specific I/O 3 | meiInput3, meiOutputIo3
meiMotorIo4 | Drive-specific I/O 4 | meiInput4, meiOutputIo4
meiMotorIo5 | Drive-specific I/O 5 | meiInput5, meiOutputIo5
meiMotorIo6 | Drive-specific I/O 6 | meiInput6, meiOutputIo6
meiMotorIo7 | Drive-specific I/O 7 | meiInput7, meiOutputIo7

See Also

meiInput
meiOutput

Axis Object:
IoConfig


meiMotorType

The meiMotorType enumeration values represent different motor types that the Axis object can control.

meiMotorType | Description
meiMotorTypeServo | Servo Motor
meiMotorTypeStepper | Stepper Motor
meiMotorTypeSercos | Sercos drive controlling the motor

See Also

Axis Object:
MotorType


meiNetworkDirection

The meiNetworkDirection enumeration values represent the different directions network traffic may travel. Currently, this enumeration only applies to a SynqNet network.

meiNetworkDirection | Meaning
meiNetworkDirectionDownstream | Represents network traffic flowing away from the network controller.
meiNetworkDirectionUpstream | Represents network traffic flowing towards the network controller.
meiNetworkDirectionAll | Represents both the upstream and downstream directions. This is useful for reading the total number of network errors on a network node.

See Also

SqNode Object:
FailLimit
FaultLimit
PacketErrorCount
PacketErrorRate


meiNetworkPort

The meiNetworkPort enumeration values represent network ports—the physical network connections where cables are connected.

These ports are commonly found in pairs on SynqNet controllers and SynqNet nodes. The OUT ports of a controller or an upstream node, connect to the IN ports of a downstream node. When the OUT port of the last downstream node is connected back to the IN port of the controller, the network is considered to be configured as a RING network type. For more information about the different network topolgies that are supported by SynqNet, please see SynqNet Topologies.

meiSynqNetPort | Meaning
meiNetworkPortIn | The "IN" network port connection.
meiNetworkPortOut | The "OUT" network port connection.

See Also

SqNode Object:
CrcErrorCount

SynqNet Topologies


Hardware to Software Map of I/O

The following MPX values are only valid for an Analog XMP and a SynqNet Phase 1 RMB.

For more information, please see meiOutput and meiInput.

For information about the map of I/O for other drives/nodes, please contact the manufacturer's drive/node documentation.

Analog XMP
Analog XMP I/O | meiOutput Value | meiInput Value
Transceiver A | meiOutputIo0 | meiInputIo0
Transceiver B | meiOutputIo1 | meiInputIo1
Transceiver C | meiOutputIo2 | meiInputIo2
Transceiver D* | meiOutputIo3 | meiInputIo3
Transceiver E* | meiOutputIo4 | meiInputIo4
Transceiver F* | meiOutputIo5 | meiInputIo5
User I/O | meiOutputIo6 | meiInputIo6
* for XMP-Pulse and eXMP only

SynqNet Phase I RMB
SynqNet Phase I RMB | meiOutput Value | meiInput Value
Transceiver A | meiOutputIo0 | meiInputIo0
Transceiver B | meiOutputIo1 | meiInputIo1
Transceiver C | meiOutputIo2 | meiInputIo2
User I/O 1 | meiOutputIo6 | meiInputIo6
User I/O 2 | meiOutputIo7 | meiInputIo7


meiOutput

The meiOutput enumeration values represent digital outputs for the axis object.

meiOutput | Description
meiOutputAmpEnable | Amplifier Enable output
meiOutputBrakeRelease | Brake Enable output
meiOutputIo0 | Drive-specific output 0
meiOutputIo1 | Drive-specific output 1
meiOutputIo2 | Drive-specific output 2
meiOutputIo3 | Drive-specific output 3
meiOutputIo4 | Drive-specific output 4
meiOutputIo5 | Drive-specific output 5
meiOutputIo6 | Drive-specific output 6
meiOutputIo7 | Drive-specific output 7
meiOutputIo8 | Drive-specific output 8
meiOutputIo9 | Drive-specific output 9
meiOutputIo10 | Drive-specific output 10
meiOutputIo11 | Drive-specific output 11
meiOutputIo12 | Drive-specific output 12
meiOutputIo13 | Drive-specific output 13
meiOutputIo14 | Drive-specific output 14
meiOutputIo15 | Drive-specific output 15

For a breakdown of how the hardware I/O matches up to the MPX software for Analog XMP controllers and SynqNet Phase I RMBs, please see the Hardware to Software Map of I/O.

For information about the map of I/O for other drives/nodes, please contact the manufacturer's drive/node documentation.

See Also

Axis Object:
DigitalOut
DigitalOutInvert


meiRecorderMessage

Description

The meiRecorderMessage enumeration values represent possible messages to be associated with recorder buffers when returned via the Controller.OnRecorderBufferDone event callback method.

This method needs to be defined by the user.

Arguments

meiRecorderMessage | Description
meiRecorderMessageNone | No message
meiRecorderMessageStopped | The recorder has be stopped. This can happen if there are no more buffers to be filled or if the recorder was stopped by a call to the Recorder.Stop method by another application.
meiRecorderMessageOverflow | The controller's internal recorder buffer has overflowed because the host application could not keep up. The recorder is stopped when an overflow occurs.
meiRecorderMessageUnknown | An unknown problem has occurred.

See Also

Controller Object:
OnRecorderBufferDone


meiSqNodeAlarmSrc

The meiSqNodeAlarmSrc enumeration values represent the different node alarm sources for SqNode objects.

meiSqNodeAlarmSrc | Description
meiSqNodeAlarmSrcAmpFault | Determines whether an amplifier fault acts as an alarm source.
meiSqNodeAlarmSrcNotCyclic | Determines whether an alarm occurs when the node is in a non-cyclic state.
MeiSqNodeAlarmSrcIoAbort | Determines whether an alarm occurs when the node is in the I/O Abort state.

See Also

SqNode Object:
AlarmSource


meiSqNodeFpgaType

The meiSqNodeFpgaType enumeration values represent the different types of FPGA images a SynqNet node can use to run.

meiSqNodeFpgaType | Meaning
meiSqNodeFpgaTypeBoot | This FPGA type has just enough features to perform basic communication with a SynqNet controller and to allow runtime images to be downloaded. No motion or I/O related commands or data are processed with this FPGA type.
meiSqNodeFpgaTypeRuntime | This FPGA type allows full functionality of a SynqNet node including the processing of motion and I/O related commands and data.

See Also

SqNode Object:
FpgaVersion


meiState

Description

This enumeration defines the different motion states of a motion object.

Enumeration | Description
meiStateIdle | The motion is idle and waiting to start or resume motion.
meiStateMoving | The axes are moving.
meiStateStopping | The axes are stopping. This occurs from a Stop command.
meiStateStoppingError | The axes are performing an emergency stop and/or abort on all axes.
meiStateError | The axes are in error.

See Also

Motion Object:
State


meiStatus

The meiStatus enumeration values represent object status information.

NOTE: For the analog version of the XMP, the meiStatusEncoderFault status will be set if any of the following statii are set:

  • meiStatusBrokenWire
  • meiStatusIllegalState
  • meiStatusAbsEncoderFault
  • meiStatusAbsEncoderTimeout

meiStatusValue | Meaning
meiStatusLimitPositionError | Position Error Limit
meiStatusLimitHwPos | Positive Hardware Limit
meiStatusLimitHwNeg | Negative Hardware Limit
meiStatusLimitSwPos | Positive Software Limit
meiStatusLimitSwNeg | Negative Software Limit
meiStatusAmpFault | Amplifier Fault
meiStatusEncoderFault | Encoder Fault
meiStatusBrokenWire | Encoder Broken Wire
meiStatusIllegalState | Encoder Illegal State Transition
meiStatusAbsEncoderFault | Absolute Encoder Fault
meiStatusAbsEncoderTimeout | Absolute Encoder Timeout
meiStatusLimitTorque | Torque Limit
meiStatusUserLimit0 | User Limit 0
meiStatusUserLimit1 | User Limit 1
meiStatusUserLimitn | User Limit n
meiStatusUserLimit15 | User Limit 15
meiStatusHome | Home
meiStatusInPositionCoarse | Axis In Coarse Position Tolerance
meiStatusSettled | Axis Settled
meiStatusAtTarget | Axis At Target
meiStatusFrame | Frame Event Requested
meiStatusDone | Motion is Complete
meiStatusAtVelocity | Axes at Final Velocity
meiStatusOutOfFrames | Motion is Out of Frames
meiStatusPowerFault | Supply Voltage is Low
meiStatusRecorderFull | Recoder is Full
meiStatusRecorderDone | Recoder has Completed
meiStatusExternal | External Event Requested
meiStatusSynqNetDead | SynqNet network is dead
meiStatusSynqNetRxFailure | SynqNet network data receive error
meiStatusSynqNetTxFailure | SynqNet network data transmit error
meiStatusSynqNetNodeFailure | SynqNet node failure
meiStatusSynqNetRecovery | SynqNet network recovery
meiStatusSqNodeIoAbort | SynqNet node I/O abort
meiStatusSqNodeDisable | SynqNet node disabled
meiStatusSqNodeAlarm | SynqNet node alarm
meiStatusSqNodePowerFault | SynqNet node power fault
meiStatusSqNodeUserFault | SynqNet node user fault
meiStatusSqNodeFailure | SynqNet node failure

See Also

Motion Object:
Status

Axis Object:
Status

SynqNet Object:
Status

SqNode Object:
Status


meiSynqNetRecoveryMode

The meiSynqNetRecoveryMode enumeration values represent the network's fault recovery mode. Networks with ring topologies can be configured to recover from a fault condition. A fault condition occurs when a packet error rate counter exceeds its packet error rate fault limit. If fault recovery is enabled and a fault occurs, the node hardware and/or controller will detect the location of the fault and switch the direction of network traffic for nodes downstream from the faulted connection. During fault recovery, the network state is meiSynqNetStateSynqRecovering. After the upstream and downstream packet error rate counters decrement to zero, the recovery is completed, and the network state returns to meiSynqNetStateSynq.

When fault recovery occurs, the controller will set the meiStatusSynqNetRecovery status bit and attempt to generate an meiEventTypeSynqNetRecovery event. An application should notify the user about the fault and fix of the broken cable/hardware as soon as possible. An application can determine the location of the fault using SynqNet.IdleCable. A network with a ring topology has one idle cable, which has no data traffic. The operation of the idle cable can be tested with SynqNet.IdleCableStatus.

WARNING: If the idle cable is broken and a second fault occurs, then fault recovery will not be able to fully recover from the fault. SynqNet will try to recover, but some nodes will be stranded. Presently, SynqNet does not support an event to notify the application if an idle cable fails. In the meantime, an application can periodically poll the idle cable with SynqNet.IdleCableStatus to test the cable.

meiSynqNetRecoveryMode | Description
meiSynqNetRecoveryModeDisabled | The network will not attempt to recover from a fault condition. This is the default mode for string topologies.
meiSynqNetRecoveryModeSingleShot | The network will only attempt to recover from a fault condition one time. A second fault will be ignored.
meiSynqNetRecoveryModeAutoArm | The network will attempt to recover from a fault condition. After the fault recovery is complete, the network will automatically be re-armed to respond to another fault condition. This is the default mode for ring topologies.

See Also

SynqNet Object:
RecoveryMode

SynqNet Fault Recovery


meiSynqNetState

Description

The meiSynqNetState enumeration values represent SynqNet network states. These are the different operating modes for SynqNet.

meiActionValue | Description
meiSynqNetStateDiscovery | The initial state before the network is initialized. During this phase, the controller checks the network integrity, determines the network topology, resets the nodes, identifies, initializes, and addresses the nodes. Data packets are sent/received asynchronously.
meiSynqNetStateAsynq | The state used for off-line operations, like node binary download. Data packets are sent and received asynchronously.
meiSynqNetStateSynq | The normal operating state. Data packets are sent/received synchronously.
MeiSynqNetStateSynqRecovering | During this state, a network fault condition was detected and the network is being reconfigured to route data packets around the fault. After the reconfiguration is complete and the packet error rate counters have decremented to zero, the SynqNet.State will return to meiSynqNetStateSynq.

See Also

SynqNet Object:
State


meiWordBit

Description

The meiWordBit enumeration values represent the different bits in a data word. These bit values can be combined to produce multi-bit values using a bitwise-or (Visual Basic: "Or"). This enumeration is only used in conjunction with MPX methods that return words of I/O simultaneously.

meiActionValue | Description
meiWordBit0 | Represents bit 0 (the least significant bit).
meiWordBit1 | Represents bit 1.
meiWordBitn | Represents bit n.
meiWordBit31 | Represents bit 31 (the most significant bit).

See Also

CanNode Object:
DigitalInWord
DigitalOutWord


Map.String

Description

Returns a string representing the location of some controller variable when passed an enumeration of type meiMap.

This property cannot be saved to flash memory.

Arguments

Argument | Type | Description | Default Value
Var | meiMap | The variable whose string location is to be returned. |
Index | Long (optional) | If a variable index is required, then index represents the index of the variable whose string location is to be returned. | -1

Type

String (read only)

Visual Basic Example

SampleCounterAddr = Controller.Map.String(meiMapSampleCounter)
'returns "MEIXmpData.SystemData.SampleCounter"

Syntax

Visual Basic

Sub String(Var As meiMap,
Index As Long = -1)
IDL Interface

HRESULT String([in] meiMap Var,
[in, defaultvalue(-1)] long Index,
[out, retval] BSTR* pVal)

See Also

DataType

meiMap


Map.DataType

Description

Returns the data type of a controller variable.

This property cannot be saved to flash memory.

Arguments

Argument | Type | Description | Default Value
Var | meiMap | The variable whose data type is to be returned. |
Index | Long (optional) | If a variable index is required, then index represents the index of the variable whose data type is to be returned. | -1

Type

meiDataType (read only)

Visual Basic Example

SampleCounterType = Controller.Map.DataType(meiMapSampleCounter)
'returns meiDataTypeLong

Syntax

Visual Basic

Sub DataType(Var As meiMap,
Index As Long = -1)
IDL Interface

HRESULT DataType([in] meiMap Var,
[in, defaultvalue(-1)] long Index,
[out, retval] meiDataType* pVal)

See Also

String

meiMap


Motion.Abort

Description

Disables the filter algorithm, sets the demand level to zero, and disables the amplifiers for all axes associated with the motion object.

The motion State will immediately move to its Error condition. Before starting another move the Reset method needs to be executed to clear the error and all axes' amplifiers need to be enabled.

Visual Basic Example

Controller.Motion(3).Abort

Syntax

Visual Basic

Sub Abort()
IDL Interface

HRESULT Abort()

See Also


Motion.EStop

Description

Decelerates the axes to a stop in the time specified by the EStopTime.

While the axes are decelerating, the Motion.State will be meiStateStoppingError, and once the axis has stopped, the state will stay as meiStateError. The axes will remain in the Error state controlling the axis (servoing), with the amplifier enabled. Before starting another move, the Reset method needs to be called in order to change the state to meiStateIdle.

Visual Basic Example

Controller.Motion(3).EStop

Syntax

Visual Basic

Sub EStop()
IDL Interface

HRESULT EStop()

See Also


Motion.EStopAbort

Description

This method of a motion object will will decelerate the axis (or axes) to a stop in the time specified by the EStopTime and then disable the drive.

While the axis is decelerating the motion State will be StoppingError, and once the axis has stopped the state will stay as Error. The axis will remain in the Error state with the amplifiers disabled and the DAC forced to zero (plus the DACOffset). Before starting another move the Reset method needs to be executed to clear the error and move the State to Idle and the axes need to be enabled.

Visual Basic Example

Controller.Motion(3).EStopAbort

Syntax

Visual Basic

Sub EStopAbort()
IDL Interface

HRESULT EStopAbort()

See Also


Motion.EStopTime

Description

The deceleration time for an EStop action.

Units

seconds

Type

Double

Visual Basic Example

Controller.Motion(3).EStopTime = .010 '10 milliseconds

x = Controller.Motion(3).EStopTime

Syntax

Visual Basic

Property EStopTime As Double
IDL Interface

[propget] HRESULT EStopTime([out, retval] double *pVal)

[propput] HRESULT EStopTime([in] double newVal)

See Also


Motion.Resume

Description

Resumes any uncompleted motion that was prematurely stopped with the Stop method. Any time after a stop command, the Resume command can be used to complete the remainder of the original move.

Visual Basic Example

Controller.Motion(3).Resume

Syntax

Visual Basic

Sub Resume()
IDL Interface

HRESULT Resume()

See Also


Motion.Reset

Description

Attempts to return all axes associated with the motion object to their Idle state.

Visual Basic Example

Controller.Motion(3).Reset

Syntax

Visual Basic

Sub Reset()
IDL Interface

HRESULT Reset()

See Also

State


Motion.Stop

Description

Decelerates the axes to a stop in the time specified by the StopTime.

While the axes are decelerating, the Motion.State will be meiStateStoppingStopping, and once the axes have stopped, the state will stay as meiStateIdle. If you want to complete the remainder of the move that has stopped, the Resume method can be used or a new new motion command can be executed, at the cost of loosing the uncompleted part of the original move.

Visual Basic Example

Controller.Motion(3).Stop

Syntax

Visual Basic

Sub Stop()
IDL Interface

HRESULT Stop()

See Also


Motion.StopTime

Description

The deceleration time for a Stop action.

Units

seconds

Type

Double

Visual Basic Example

Controller.Motion(3).StopTime = .500 '500 milliseconds

x = Controller.Motion(3).StopTime

Syntax

Visual Basic

Property StopTime As Double
IDL Interface

[propget] HRESULT StopTime([out, retval] double *pVal)

[propput] HRESULT StopTime([in] double newValue)

See Also


Motion.AmpEnable

Description

Attempts to enable or disable the amplifers of all axes associated with the motion object by setting the AmpEnable property on all axes mapped to this motion object.

This property cannot be saved to flash memory.

Type

Boolean (write only)

AmpEnable | Description
True | Attempt to enable all axes' amplifiers
False | Disable all axes' amplifiers

Visual Basic Example

Controller.Motion(3).AmpEnable = True

Syntax

Visual Basic

Property AmpEnable As Boolean
IDL Interface

[propput] HRESULT AmpEnable([in] VARIANT_BOOL newVal)

See Also

State
Abort

Axis Object:
AmpEnable


Motion.DefaultAccel

Description

The default acceleration parameter to be used in a move. This property is used for all motions where synchronized attributes are specified, use Axis.DefaultAccel.

This property cannot be saved to flash memory.

Units

counts/sec2

Type

Double

Default

0

Visual Basic Example

Controller.Motion(3).DefaultAccel = 50000

x = Controller.Motion(3).DefaultAccel

Syntax

Visual Basic

Property DefaultAccel As Long

IDL Interface

[propget] HRESULT DefaultAccel([out, retval] double *pVal)

[propput] HRESULT DefaultAccel([in] double newVal)

See Also

Trapezoidal
SCurve
SCurveJerk
Velocity
VelocityJerk

Axis Object
DefaultAccel


Motion.DefaultAccelJerk

Description

The default jerk to be used in the acceleration phase of a move. This property is used for all motions that do not used the synchronized attributes.

This property cannot be saved to flash memory.

Units

counts/sec3

Type

Double

Default

0

Visual Basic Example

Controller.Motion(3).DefaultAccelJerk = 5000

x = Controller.Motion(3).DefaultAccelJerk

Syntax

Visual Basic

Property DefaultAccelJerk As Long
IDL Interface

[propget] HRESULT DefaultAccelJerk([out, retval] double *pVal)

[propput] HRESULT DefaultAccelJerk([in] double newVal)

See Also

SCurveJerk
VelocityJerk
DefaultDecelJerk

Axis Object
DefaultAccelJerk


Motion.DefaultDecel

Description

The default deceleration parameter to be used in a move. This property is used for all motions that do not used the synchronized attributes.

This property cannot be saved to flash memory.

Units

counts/sec2

Type

Double

Default

0

Visual Basic Example

Controller.Motion(3).DefaultDecel = 50000

x = Controller.Motion(3).DefaultDecel

Syntax

Visual Basic

Property DefaultDecel As Long
IDL Interface

[propget] HRESULT DefaultDecel([out, retval] double *pVal)

[propput] HRESULT DefaultDecel([in] double newVal)

See Also

Trapezoidal
SCurve
SCurveJerk

Axis Object
DefaultDecel


Motion.DefaultDecelJerk

Description

The default jerk to be used in the deceleration phase of a move. This property is used for all motions that do not used the synchronized attributes.

This property cannot be saved to flash memory.

Units

counts/sec3

Type

Double

Default

0

Visual Basic Example

Controller.Motion(3).DefaultDecelJerk = 5000

x = Controller.Motion(3).DefaultDecelJerk

Syntax

Visual Basic

Property DefaultDecelJerk As Long
IDL Interface

[propget] HRESULT DefaultDecelJerk([out, retval] double *pVal)

[propput] HRESULT DefaultDecelJerk([in] double newVal)

See Also

SCurveJerk
VelocityJerk
DefaultAccelJerk

Axis Object
DefaultDecelJerk


Motion.DefaultJerkPercent

Description

The percentage of the acceleration and deceleration phases that has an S curved velocity profile. This property is used for all motions that do not used the synchronized attributes.

This property cannot be saved to flash memory.

Type

Double

Default

100%

Visual Basic Example

Controller.Motion(3).DefaultJerkPercent = 50

x = Controller.Motion(3).DefaultJerkPercent

Syntax

Visual Basic

Property DefaultJerkPercent As Long
IDL Interface

[propget] HRESULT DefaultJerkPercent([out, retval] double *pVal)

[propput] HRESULT DefaultJerkPercent([in] double newVal)

See Also

SCurve
Velocity

Axis Object
DefaultJerkPercent


Motion.DefaultSpeed

Description

The default maximum speed used for a move.

This property cannot be saved to flash memory.

Units

counts/sec

Type

Double

Default

0

Visual Basic Example

Controller.Motion(3).DefaultSpeed = 5000

x = Controller.Motion(3).DefaultSpeed

Syntax

Visual Basic

Property DefaultSpeed As Long
IDL Interface

[propget] HRESULT DefaultSpeed([out, retval] double *pVal)

[propput] HRESULT DefaultSpeed([in] double newVal)

See Also

Trapezoidal
SCurve
SCurveJerk

Axis Object
DefaultSpeed


Motion.EventEnable

Description

Enables or disables any of the events that are generated by the motion object from being reported to the host. The events that can be generated by this object is are:

  • Motion Done
  • Motion At Velocity
  • Motion Out of Frames

Arguments

Argument | Type | Description
Type | meiEventType | The type of event that is being enabled or disabled.

Type

Boolean

  • True - The event is generated on the host
  • False - The event is not generated on the host

Visual Basic Example

Controller.Motion(3).EventEnable(meiEventTypeAtVelocity) = True

x = Controller.Motion(3).EventEnable(meiEventTypeAtVelocity)

Syntax

Visual Basic

Property EventEnable(Type As meiEventType) As Boolean
IDL Interface

[propget] HRESULT EventEnable([in] meiEventType eventType,
[out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT EventEnable([in] meiEventType eventType,
[in] VARIANT_BOOL newVal)

See Also


Motion.EventEnableAll

Description

Enables reporting of all events generated by the motion object to the host. Please refer to the events overview section for a list of events generated by the motion object.

Visual Basic Example

Controller.Motion(0).EventEnableAll

Syntax

Visual Basic

Sub EventEnableAll
IDL Interface

HRESULT EventEnableAll()

See Also

EventEnable
EventEnableNone

meiEventType

Events Overview


Motion.EventEnableNone

Description

Disables reporting of all events generated by the motion object to the host. Please refer to the events overview section for a list of events generated by the motion object.

Visual Basic Example

Controller.Motion(0).EventEnableNone

Syntax

Visual Basic

Sub EventEnableNone
IDL Interface

HRESULT EventEnableNone()

See Also

EventEnable
EventEnableAll

meiEventType

Events Overview


Motion.FlashSave

Description

Saves the current motion object settings to flash memory. This configuration will be loaded onto the controller during the next power up or controller reset.

Visual Basic Example

Controller.Motion(3).FlashSave

Syntax

Visual Basic

Sub FlashSave()
IDL Interface

HRESULT FlashSave()

See Also

Controller Object:
FlashSave
FlashSaveAll

Axis Object:
FlashSave


Motion.Axes

Description

Specifies which axes this motion object coordinates.

Type

Array of Long

Visual Basic Example

The following code connects motion(0) with axis 0.

Controller.Motion(0).Axes = Array(0)

The following code connects motion(1) with axis 1 and 2.

Controller.Motion(1).Axes = Array(1,2)

The following code disconnects motion(2) from all axes.

Controller.Motion(2).Axes = Array()

The following diagram shows the resulting object relationships from the above code.

Syntax

Visual Basic

Property Axes() As Long
IDL Interface

[propget] HRESULT Axes([out, retval] SAFEARRAY(long)* pVal)

[propput] HRESULT Axes([in] SAFEARRAY(long) newVal)

See Also

Refresh


Motion.Refresh

Description

The axis map a motion object is using can be changed without the MEI ActiveX control knowing. For example if an MPI application or Motion Console uses a different mapping it will overwrite the axis mapping that the ActiveX control was initialized with. This method interrogates the motion controller to find out what the current axis map is and updates the motion object's axes property.

Visual Basic Example

Controller.Motion(3).Refresh

Syntax

Visual Basic

Sub Refresh()
IDL Interface

HRESULT Refresh()

See Also

Axes


Motion.SCurve

Description

Initiates a point-to-point motion using an "S" shaped velocity profile similar to that shown below. This move type generates a motion that takes the same time as the trapezoidal move but allows the acceleration to have smoother transitions. This comes at the expense of requiring a larger peak accelerations and decelerations. The total move time is always the same as the equivalent trapezoidal move.

See the section on synchronized motion for when either the meiSyncStart or meiSyncEnd attributes are specified.

Arguments

Argument Type Description
Position Variant

The absolute target position in counts.

This argument will generally be an array of doubles where the number of elements in this array must match the number of mapped axes. If only one axis is mapped then a double can be used instead of an array.

Speed Variant
(optional)

The maximum speed, in counts/sec, that will be achieved during the move.

The section on synchronized motion summarizes the different data types and default values this argument uses.

Accel Variant
(optional)

The acceleration, in counts/sec2, during the acceleration phase of the similar trapeziodal move.

The section on synchronized motion summarizes the different data types and default values this argument uses.

Decel Variant
(optional)

The deceleration, in counts/sec2, during the deceleration phase of the similar trapeziodal move.

The section on synchronized motion summarizes the different data types and default values this argument uses.

JerkPercent Variant
(optional)

The percentage of the acceleration and deceleration phases that has an S curve.

This argument varies between 0%, and 100%. If the JerkPercent is zero then the move is the same as the basic trapezoidal motion.

The section on synchronized motion summarizes the different data types and default values this argument uses.

Attributes meiMoveAttr
(optional)

Flags that modify the motion.

If this argument is omitted then no attributes are assumed and the standard action is generated.

Errors

Argument Type mismatch

Visual Basic Example

The following code will move axis 3 to position 1000.

Controller.Motion(3).Axes = 3
Controller.Motion(3).SCurve 1000

The following code will move axes 3 and 4 in a straight line to position 1000,2000.

     Controller.Motion(3).Axes
        = Array(3,4)
Controller.Motion(3).SCurve Array(1000,2000)

The following code will move axes 3 and 4 in a straight line to position (1000,2000) overriding the default speed with 200 counts/sec.

     Controller.Motion(3).Axes
        = Array(3,4)
Controller.Motion(3).SCurve Array(1000,2000),
        Speed:=200

Syntax

Visual Basic

Sub SCurve(Position As Variant,
Speed As Variant,
Accel As Variant,
Decel As Variant,
JerkPercent As Variant,
Attributes As meiMoveAttr)
IDL Interface

HRESULT SCurve([in] VARIANT Position,
[in] VARIANT speed,
[in] VARIANT accel,
[in] VARIANT decel,
[in] VARIANT jerkPercent,
[in] meiMoveAttr attributes)

See Also


Motion.SCurveJerk

Description

This method of a motion object initiates a point-to-point motion using an "S" shaped velocity profile similar to that shown below. This move type allows the magnitude of the jerk (the first derivative of acceleration) used during the acceleration or deceleration to be specified.

See the section on synchronized motion for when either the meiSyncStart or meiSyncEnd attributes are specified.

Arguments

Argument Type Description
Position Variant

The absolute target position in counts.

This argument will generally be an array of doubles where the number of elements in this array must match the number of mapped axes. If only one axis is mapped then a double can be used instead of an array.

Speed Variant
(optional)

The maximum speed, in counts/sec, that will be achieved during the move.

The section on synchronized motion summarizes the different data types and default values this argument uses.

Accel Variant
(optional)

The maximum acceleration, in counts/sec2, that will be achieved during the move.

The section on synchronized motion summarizes the different data types and default values this argument uses.

Decel Variant
(optional)

The maximum deceleration, in counts/sec2, that will be achieved during the move.

The section on synchronized motion summarizes the different data types and default values this argument uses.

AccelJerk Variant
(optional)

The jerk, in counts/sec3, that will be used in the acceleration phase for this move.

The section on synchronized motion summarizes the different data types and default values this argument uses.

DecelJerk Variant
(optional)

The jerk, in counts/sec3, that will be used in the deceleration phase for this move.

The section on synchronized motion summarizes the different data types and default values this argument uses.

Attributes meiMoveAttr
(optional)

Flags that modify the motion.

If this argument is omitted then no attributes are assumed and the standard action is generated.

Visual Basic Example

The following code will move axis 3 to position 1000.

Controller.Motion(3).Axes = 3
Controller.Motion(3).SCurveJerk 1000

The following code will move axes 3 and 4 in a straight line to position 1000,2000.

     Controller.Motion(3).Axes
        = Array(3,4)
Controller.Motion(3).SCurveJerk Array(1000,2000)

The following code will move axes 3 and 4 in a straight line to position (1000,2000) overriding the default speed with 200 counts/sec.

     Controller.Motion(3).Axes
        = Array(3,4)
Controller.Motion(3).SCurveJerk Array(1000,2000),
        Speed:=200

Syntax

Visual Basic

Sub SCurve(Position As Variant,
Speed As Variant,
Accel As Variant,
Decel As Variant,
AccelJerk As Variant,
DecelJerk As Variant,
Attributes As meiMoveAttr)
IDL Interface

HRESULT SCurveJerk([in] VARIANT Position,
[in] VARIANT speed,
[in] VARIANT accel,
[in] VARIANT decel,
[in] VARIANT accelJerk,
[in] VARIANT decelJerk,
[in] meiMoveAttr attributes)

See Also


Motion.Trapezoidal

Description

Initiates a point-to-point motion using a trapezoidal velocity profile similar to that shown below.

Arguments

Argument | Type | Description
Position | Variant | The absolute target position in counts. This argument will generally be an array of doubles where the number of elements in this array must match the number of mapped axes. If only one axis is mapped then a double can be used instead of an array.
Speed | Variant (optional) | The maximum speed, in counts/sec, that will be achieved during the move. The section on synchronized motion summarizes the different data types and default values this argument uses.
Accel | Variant (optional) | The acceleration, in counts/sec2, that will be used for this move. The section on synchronized motion summarizes the different data types and default values this argument uses.
Decel | Variant (optional) | The deceleration, in counts/sec2, that will be used for this move . The section on synchronized motion summarizes the different data types and default values this argument uses.
Attributes | meiMoveAttr (optional) | Flags that modify the motion. If this argument is omitted then no attributes are assumed and the standard action is generated.

Visual Basic Example

The following code will move axis 3 to position 1000.

Controller.Motion(3).Axes = 3
Controller.Motion(3).Trapezoidal 1000

The following code will move axes 3 and 4 in a straight line to position 1000,2000.

     Controller.Motion(3).Axes
        = Array(3,4)
Controller.Motion(3).Trapezoidal Array(1000,2000)

The following code will move axes 3 and 4 in a straight line to position (1000,2000) overriding the default speed with 200 counts/sec.

     Controller.Motion(3).Axes
        = Array(3,4)
Controller.Motion(3).Trapezoidal Array(1000,2000),
        Speed:=200

Syntax

Visual Basic

Sub Trapezoidal(Position As Variant,
Speed As Variant,
Accel As Variant,
Decel As Variant,
Attributes As meiMoveAttr)
IDL Interface

HRESULT Trapezoidal([in] VARIANT position,
[in] VARIANT speed,
[in] VARIANT accel,
[in] VARIANT decel,
[in] meiMoveAttr attributes)

See Also


Motion.Velocity

Description

This method of a motion object starts the axes moving at a continuous velocity as using an "S" shaped velocity profile similar to that shown below. This move type is the same as the acceleration phase of the SCurve move, allowing the acceleration to have smoother transitions. This comes at the expense of requiring a larger peak accelerations and decelerations.

The axes will continue to move at the specified velocity until a new velocity is commanded (by calling this method again with the meiMoveAttrModify attribute). The move is finished by using the Stop command.

See the section on synchronized motion for when either the meiSyncStart or meiSyncEnd attributes are specified.

Arguments

Argument Type Description
Velocity Variant

The target velocity in counts/sec2.

This argument will generally be an array of doubles where the number of elements in this array must match the number of mapped axes. If only one axis is mapped then a double can be used instead of an array.

Accel Variant
(optional)

The average acceleration, in counts/sec2, during the acceleration phase of the similar constant acceleration move.

The section on synchronized motion summarizes the different data types and default values this argument uses.

JerkPercent Variant
(optional)

The percentage of the acceleration phase that has an S curve. This argument varies between 0%, and 100%.

The section on synchronized motion summarizes the different data types and default values this argument uses.

Attributes meiMoveAttr
(optional)

Flags that modify the motion.

If this argument is omitted then no attributes are assumed and the standard action is generated.

Visual Basic Example

The following code will start a continuous move of 1000 counts/sec on axis 3.

Controller.Motion(3).Axes = 3
Controller.Motion(3).Velocity 1000

The following code will change the target velocity to 500 counts per second.

Controller.Motion(3).Velocity 500, attributes:=meiMoveAttrModify

The following code will bring the axis to a stop before terminating the velocity motion. The stop command could be used by itself but the StopTime property would determine the deceleration.

    Controller.Motion(3).Velocity 0,
        attributes:=meiMoveAttrModify
Controller.Motion(3).Stop

The following code will move axes 3 and 4 in a straight line with velocity components of 1000 and 2000 counts/sec respectively.

Controller.Motion(3).Axes = Array(3,4)
Controller.Motion(3).Velocity Array(1000,2000) Syntax

Syntax

Visual Basic

Sub Velocity(Velocity As Variant,
Accel As Variant,
JerkPercent As Variant,
Attributes As meiMoveAttr)
IDL Interface

HRESULT Velocity([in] VARIANT Velocity,
[in] VARIANT accel,
[in] VARIANT jerkPercent,
[in] meiMoveAttr attributes)

See Also

VelocityJerk


Motion.VelocityJerk

Description

This method of a motion object starts the axes moving at a continuous velocity as using an "S" shaped velocity profile similar to that shown below. This move type allows the magnitude of the jerk (the first derivative of acceleration) used during the acceleration to be defined.

The axes will continue to move at the specified velocity until a new velocity is commanded (by calling this method again with the meiMoveAttrModify attribute). The move is finished by using the Stop command.

See the section on synchronized motion for when either the meiSyncStart or meiSyncEnd attributes are specified.

Arguments

Argument Type Description
Velocity Variant

The target velocity in counts/sec2.

This argument will generally be an array of doubles where the number of elements in this array must match the number of mapped axes. If only one axis is mapped then a double can be used instead of an array.

Accel Variant
(optional)

The maximum acceleration, in counts/sec2, that will be achieved during the move.

The section on synchronized motion summarizes the different data types and default values this argument uses.

AccelJerk Variant
(optional)

The jerk, in counts/sec3, that will be used in the acceleration phase for this move.

The section on synchronized motion summarizes the different data types and default values this argument uses.

Attributes meiMoveAttr
(optional)

Flags that modify the motion.

If this argument is omitted then no attributes are assumed and the standard action is generated.

Visual Basic Example

The following code will start a continuous move of 1000 counts/sec on axis 3.

Controller.Motion(3).Axes = 3
Controller.Motion(3).VelocityJerk 1000

The following code will change the target velocity to 500 counts per second.

Controller.Motion(3).VelocityJerk 500, attributes:=meiMoveAttrModify

The following code will bring the axis to a stop before terminating the velocity jerk motion. The stop command can be used by itself but the StopTime property would determine the deceleration.

Controller.Motion(3).VelocityJerk 0, attributes:=meiMoveAttrModify
Controller.Motion(3).Stop

The following code will move axes 3 and 4 in a straight line with velocity components of 1000 and 2000 counts/sec respectively.

Controller.Motion(3).Axes = Array(3,4)
Controller.Motion(3).VelocityJerk Array(1000,2000)

Syntax

Visual Basic

Sub VelocityJerk(Velocity As Variant,
Accel As Variant,
AccelJerk As Variant,
Attributes As meiMoveAttr)
IDL Interface

HRESULT VelocityJerk([in] VARIANT Velocity,
[in] VARIANT accel,
[in] VARIANT accelJerk,
[in] meiMoveAttr attributes)

See Also

Velocity


Motion.State

Description

The current state of the motion object.

When in the idle state, the motion object waits for motion start commands (Trapezoidal, SCurve, SCurveJerk, Velocity, VelocityJerk etc.) to be executed. If the motion command is successful the state will become Moving while the axes are moving. Once the move has completed the state will automatically return to Idle.

The Stopping state allows the current motion to be paused (by decelerating to zero speed within the StopTime) using the Stop command. The Resume command will allow the remainder of the move to be completed.

There are two error states: Error and Stopping Error. The Stopping Error state can be entered by executing the EStop command. This will decelerate the axis to zero speed within the EStopTime, before entering the Error state. The error state can also be entered directly by executing the Abort command; this will immediately stop the current motion. The motion state will stay in the Error state until a Reset command is executed.

Either the Abort or EStopAbort actions will disable the amplifies and force the DAC to output zero (plus the DACOffset) when they enter the Error state; the EStop action will leave the DAC outputs servoing and the amplifiers enabled.

Many events can be programmed to automatically generate state transitions. Each such event has an action property that defines the automatic action taken when the event is generated. For example the default action for the AmpFault event is to Abort.

This property cannot be saved to flash memory.

Type

meiState (read only)

Visual Basic Example

x = Controller.Motion(3).State

Syntax

Visual Basic

Property State As meiState
IDL Interface

[propget] HRESULT State([out, retval] meiState *pVal)

See Also


Motion.Status

Description

This property of the motion object returns the current state of each events generated by the motion object. After an event has occurred the Status will report True until it is cleared. The Type argument defines all the possible event types, many of which are not generated by this object. Trying to read the state for these events will generate an error.

This property cannot be saved to flash memory.

Arguments

Argument | Type | Description
Type | meiStatus | The type of status being read.

Type

Boolean (read only)

Visual Basic Example

The following code will get the state of the "At Velocity" event.

x = Controller.Motion(3).Status(meiStatusAtVelocity)

Syntax

Visual Basic

Property Status(Type As meiStatus) As Boolean
IDL Interface

[propget] HRESULT Status([in] meiStatus Type,
[out, retval] VARIANT_BOOL *pVal)

See Also

EventEnable


Motion.ActualPosition

Description

The current actual position of all the axes associated with the motion object. The number of elements in the array is the same as the number of axes mapped to this Motion object.

This property cannot be saved to flash memory.

Units

counts

Type

Array of Double (read only)

Visual Basic Example

x = Controller.Motion(3).ActualPosition

Syntax

Visual Basic

Property ActualPosition As Double()
IDL Interface

[propget] HRESULT ActualPosition([out, retval] SAFEARRAY(double) *pVal)

See Also

Motion Object:
CommandPosition
PositionError
ActualVelocity

Axis Object:
CommandPosition
PositionError
ActualVelocity


Motion.ActualVelocity

Description

The current actual velocity of all the axes associated with the motion object. The number of elements in the array is the same as the number of axes mapped to this Motion object.

This property cannot be saved to flash memory.

Units

counts/sec

Type

Array of double (read only)

Visual Basic Example

x = Controller.Motion(3).ActualVelocity

Syntax

Visual Basic

Property ActualVelocity As Double()
IDL Interface

[propget] HRESULT ActualVelocity([out, retval] SAFEARRAY(double) *pVal)

See Also

Motion Object:
ActualPosition
CommandPosition
PositionError

Axis Object:
ActualPosition
CommandPosition
PositionError


Motion.CommandPosition

Description

The current commanded position of all the axes associated with the motion object. The number of elements in the array is the same as the number of axes mapped to this Motion object.

This property cannot be saved to flash memory.

Units

counts

Type

Array of Double (read only)

Visual Basic Example

x = Controller.Motion(3).CommandPosition

Syntax

Visual Basic

Property CommandPosition As Double()
IDL Interface

[propget] HRESULT CommandPosition([out, retval] SAFEARRAY(double) *pVal)

See Also

Motion Object:
ActualPosition
PositionError
ActualVelocity

Axis Object:
ActualPosition
PositionError
ActualVelocity


Motion.CommandVelocity

Description

The current commanded velocity of all the axes associated with the motion object. The number of elements in the array is the same as the number of axes mapped to this Motion object.

This property cannot be saved to flash memory.

Units

counts/sec

Type

Array of Double (read only)

Visual Basic Example

x = Controller.Motion(3).CommandPosition

Syntax

Visual Basic

Property CommandPosition As Double()
IDL Interface

[propget] HRESULT CommandVelocity([out, retval] SAFEARRAY(double) *pVal)

See Also

Motion Object:
ActualPosition
PositionError
ActualVelocity

Axis Object:
ActualPosition
PositionError
ActualVelocity


Motion.PositionError

Description

The current position error (the difference between the commanded and actual positions) of all the axes associated with the motion object. The number of elements in the array is the same as the number of axes mapped to this Motion object.

This property cannot be saved to flash memory.

Units

counts

Type

Array of Double (read only)

Visual Basic Example

x = Controller.Motion(3).PositionError

Syntax

Visual Basic

Property PositionError As Double()
IDL Interface

[propget] HRESULT PositionError([out, retval] SAFEARRAY(double) *pVal)

See Also

Motion Object:
ActualPosition
CommandPosition
ActualVelocity

Axis Object:
ActualPosition
CommandPosition
ActualVelocity


Recorder.AddBuffer

Description

Creates a buffer of Recorder.PointCount points and samples number of samples that the recorder object will fill and return to the OnRecorderBufferDone event once full.

NOTE: The property Recorder.PointCount cannot be changed while a recorder object has buffers left to be filled. To remove buffers from a recorder, use the Recorder.RemoveBuffers method.

Arguments

Argument | Type | Description
Name | Type | The number of samples of data the new buffer is to hold

Visual Basic Example

controller.Recorder(0).AddBuffer 1000

Syntax

Visual Basic

Sub AddBuffer(samples As Long)
IDL Interface

HRESULT AddBuffer([in] long samples)

See Also

Start
RemoveBuffers

Controller Object:
 OnRecorderBufferDone


Recorder.RemoveBuffers

Description

Removes all data buffers from a recorder object.

Visual Basic Example

controller.Recorder(0).RemoveBuffers

Syntax

Visual Basic

Sub RemoveBuffers()
IDL Interface

HRESULT RemoveBuffers()

See Also

AddBuffer


Recorder.Start

Description

Starts the recorder. Upon filling a buffer, the recorder will fire an OnRecorderBuferDone event. Once the recorder has processed all buffers, it will automatically stop.

Visual Basic Example

Controller.Recorder(0).Start

Syntax

Visual Basic

Sub Start()
IDL Interface

HRESULT Start()

See Also

Stop

Controller Object:
OnRecorderBufferDone


Recorder.Stop

Description

Stops the recorder if it is currently running.

Visual Basic Example

Controller.Recorder(0).Stop

Syntax

Visual Basic

Sub Stop()
IDL Interface

HRESULT Stop()

See Also

Start


Recorder.Period

Description

The time in seconds between successive samples. A value of zero means the recorder will record data every sample.

NOTE: All values will be truncated to the next smallest millisecond value.

Units

Seconds

Type

Double

Visual Basic Example

Controller.Recorder(0).Period = .01 '10 ms.

x = Controller.Recorder(0).Period

Syntax

Visual Basic

Property Period As Double
IDL Interface

[propget] HRESULT Period([out, retval] double *pVal)

[propput] HRESULT Period([in] double newVal)

See Also


Recorder.PointCount

Description

The number of records the recorder object uses while recording.

Type

Long

Visual Basic Example

Controller.Recorder(0).PointCount = 3

x = Controller.Recorder(0).PointCount

Syntax

Visual Basic

Property PointCount As Long
IDL Interface

[propget] HRESULT PointCount([out, retval] long *pVal)

[propput] HRESULT PointCount([in] long newVal)

See Also


Recorder.PointCountMax

Description

Specifies the maximum value of the Recorder.PointCount property.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.Recorder(0).PointCountMax

Syntax

Visual Basic

Property PointCountMax() As Long
IDL Interface

[propget] HRESULT PointCountMax([out, retval] long *pVal);

See Also

PointCount


Recorder.PointDataType

Description

The data type of the indexth point.

NOTE: PointDataType will be modified when PointSource is set.

Arguments

Argument | Type | Description
Index | Long | The index of the record whose data type is to be accessed. Valid values are 0 to (PointCount-1) inclusive.

Type

meiDataType

Visual Basic Example

Controller.Recorder(0).PointDataType(1) = meiDataTypeFloat

x = Controller.Recorder(0).PointDataType(3)

Syntax

Visual Basic

Property PointDataType(Index As Long) As meiDataType

IDL Interface

[propget] HRESULT PointDataType([in] long Index
[out, retval] meiDataType *pVal)

[propput] HRESULT PointDataType([in] long Index
[in] meiDataType newVal)

See Also


Recorder.PointMask

Description

The bit mask the indexth record. Only the bits specified by PointMask will be returned by GetData. For example, if PointMask is set to 12 (1100 in binary), then only the 3rd and 4th bits of the associated PointSource will be recorded.

PointMask is used only when PointDataType is an integer data type.

NOTE: PointMask will be modified when PointSource is set.

Arguments

Argument | Type | Description
Index | Long | The index of the record whose mask is to be accessed. Valid values are 0 to (PointCount-1) inclusive.

Type

Long

Visual Basic Example

Controller.Recorder(0).PointMask(1) = 7 'record only lowest 3 bits

x = Controller.Recorder(0).PointMask(3)

Syntax

Visual Basic

Property PointMask(Index As Long) As Long

IDL Interface

[propget] HRESULT PointMask([in] long Index
[out, retval] long *pVal)

[propput] HRESULT PointMask([in] long Index
[in] long newVal)

See Also


Recorder.PointSource

Description

The string representing the data source for the indexth record.

NOTE: Setting PointSource will set PointDataType and PointMask to the default data type of specified data.

Arguments

Argument | Type | Description
Index | Long | The index of the record whose source string is to be accessed. Valid values are 0 to (PointCount-1) inclusive.

Type

String

Visual Basic Example

Controller.Recorder(0).PointSource(1) = "Axis[2].CommandVelocity"

x = Controller.Recorder(0).PointSource(3)

Syntax

Visual Basic

Property PointSource(Index As Long) As String

IDL Interface

[propget] HRESULT PointSource([in] long Index
[out, retval] BSTR *pVal)

[propput] HRESULT PointSource([in] long Index
[in] BSTR newVal)

See Also


Recorder.EventEnable

Description

Enables or disables any of the events that are generated by the recorder object from being reported to the host. Please refer to the events overview section for a list of events generated by the recorder object.

Arguments

Argument | Type | Description
eventType | meiEventType | The type of event to be accessed

Type

Boolean

Visual Basic Example

Controller.Recorder(0).EventEnable(meiEventTypeRecorderDone) = True

Syntax

Visual Basic

Property EventEnable(eventType As meiEventType) As Boolean
IDL Interface

[propget] HRESULT EventEnable([in] meiEventType eventType,
[out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT EventEnable([in] meiEventType eventType,
[in] VARIANT_BOOL newVal)

See Also


Recorder.EventEnableAll

Description

Enables reporting of all events generated by the recorder object to the host. Please refer to the events overview section for a list of events generated by the recorder object.

Visual Basic Example

Controller.Recorder(0).EventEnableAll

Syntax

Visual Basic

Sub EventEnableAll
IDL Interface

HRESULT EventEnableAll()

See Also

EventEnable
EventEnableNone

meiEventType

Events Overview


Recorder.EventEnableNone

Description

Disables reporting of all events generated by the recorder object to the host. Please refer to the events overview section for a list of events generated by the recorder object.

Visual Basic Example

Controller.Recorder(0).EventEnableNone

Syntax

Visual Basic

Sub EventEnableNone
IDL Interface

HRESULT EventEnableNone()

See Also

EventEnable
EventEnableAll

meiEventType

Events Overview


Recorder.Status

Description

Reports whether the conditions necessary for generating the specified event are met.

This property cannot be saved to flash memory.

Arguments

Argument | Type | Description
Type | meiStatus | The type of event whose related status bit is being read.

Type

Boolean (read only)

Visual Basic Example

x = Controller.Recorder(0).Status(meiStatusRecorderFull)

Syntax

Visual Basic

Property Status(Type As meiStatus) As Boolean
IDL Interface

[propget] HRESULT Status([in] meiStatus Type,
[out, retval] VARIANT_BOOL *pVal)

See Also


SqNode.EventEnable

Description

Enables or disables any of the events that are generated by the SqNode object from being reported to the host. Please refer to the events overview section for a list of events generated by the SqNode object.

Arguments

Argument | Type | Description
eventType | meiEventType | The type of event to be accessed.

Type

Boolean

Visual Basic Example

Controller.SqNode(0).EventEnable(meiEventTypeSqNodeFailure) = True

Syntax

Visual Basic

Property EventEnable(eventType As meiEventType) As Boolean
IDL Interface

[propget] HRESULT EventEnable([in] meiEventType eventType,
[out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT EventEnable([in] meiEventType eventType,
[in] VARIANT_BOOL newVal)

See Also

EventEnableAll
EventEnableNone

meiEventType

Events Overview


SqNode.EventEnableAll

Description

Enables the reporting of all events generated by the SqNode object to the host. Please refer to the events overview section for a list of events generated by the SqNode object.

Visual Basic Example

Controller.SqNode(0).EventEnableAll

Syntax

Visual Basic

Sub EventEnableAll
IDL Interface

HRESULT EventEnableAll()

See Also

EventEnable
EventEnableNone

meiEventType

Events Overview


SqNode.EventEnableNone

Description

Disables the reporting of all events generated by the SqNode object to the host. Please refer to the events overview section for a list of events generated by the SqNode object.

Visual Basic Example

Controller.SqNode(0).EventEnableNone

Syntax

Visual Basic

Sub EventEnableNone
IDL Interface

HRESULT EventEnableNone()

See Also

EventEnable
EventEnableAll

meiEventType

Events Overview


SqNode.EventReset

Description

Resets the event condition for a particular event type. A reset is sometimes necessary because some events latch and only unlatch with a call to an EventReset method.

Arguments

Argument | Type | Description
eventType | meiEventType | The type of event to be reset.

Visual Basic Example

Controller.SqNode(0).EventReset(meiEventTypeXxx) TODO: use a real event

Syntax

Visual Basic

Sub EventReset(eventType As meiEventType)
IDL Interface

HRESULT EventReset([in] meiEventType eventType)

See Also

EventEnable
EventEnableAll
EventEnableNone

meiEventType

Events Overview


SqNode.FlashSave

Description

Saves the current SqNode object settings to flash memory. This configuration will be loaded onto the controller during the next power up or controller reset.

Arguments

Argument | Type | Description
eventType | meiEventType | The type of event to be reset.

Visual Basic Example

Controller.SqNode(0).FlashSave

Syntax

Visual Basic

Sub FlashSave()
IDL Interface

HRESULT FlashSave()

See Also

Controller Object:
FlashSave
FlashSaveAll

Axis Object:
FlashSave

Motion Object:
FlashSave

SynqNet Object:
FlashSave

Can Object:
FlashSave


SqNode.FpgaDownload

Description

Downloads an FPGA image to the node interface of the SynqNet node associated with the SqNode object.

NOTE: Some SynqNet nodes also allow firmware to be downloaded to the drive interface. The method Axis.DriveFirmwareDownload performs this functionality.

Arguments

Argument | Type | Description
filename | String | The name of the file which contains the FPGA image to be downloaded.

Visual Basic Example

Controller.SqNode(0).FpgaDownload "nodeFpga.sff"

Syntax

Visual Basic

Sub FpgaDownload(fileName As String)
IDL Interface

HRESULT FpgaDownload([in] BSTR fileName)

See Also

Axis Object:
DriveFirmwareDownload

SynqNet Overview


SqNode.FpgaType

Description

The FPGA image type that a SynqNet node is currently using for communication.

This property cannot be saved to flash memory.

Type

meiSqNodeFpgaType (read only)

Visual Basic Example

x = Controller.SqNode(0).FpgaType

Syntax

Visual Basic

Property FpgaVersion As meiSqNodeFpgaType
IDL Interface

[propget]HRESULT FpgaVersion([out, retval]meiSqNodeFpgaType *pVal)

See Also

FpgaVersion

meiSqNodeFpgaType


SqNode.Model

Description

The model of the SynqNet node corresponding to the SqNode object. This property corresponds to the manufacturer's model identification system and is different than the SqNode.Name property which usually includes the manufacturer's name and model name.

This property cannot be saved to flash memory.

Type

String (read only)

Visual Basic Example

x = Controller.SqNode(0).Model

Syntax

Visual Basic

Property Model As String
IDL Interface

[propget] HRESULT Model([out, retval] BSTR *pVal)

See Also


SqNode.Name

Description

The manufacturer's name and model name of the SynqNet node corresponding to the SqNode object.

This property cannot be saved to flash memory.

Type

String (read only)

Visual Basic Example

x = Controller.SqNode(0).Name

Syntax

Visual Basic

Property Name As String
IDL Interface

[propget] HRESULT Name([out, retval] BSTR *pVal)

See Also


SqNode.SerialNumber

Description

The manufacturer's serial number of the SynqNet node corresponding to the SqNode object.

This property cannot be saved to flash memory.

Type

String (read only)

Visual Basic Example

x = Controller.SqNode(0).SerialNumber

Syntax

Visual Basic

Property SerialNumber As String
IDL Interface

[propget] HRESULT SerialNumber([out, retval] BSTR *pVal)

See Also


SqNode.SwitchId

Description

The switch identification number of a node. Some SynqNet node models provide a switch that can be set by the user. The switch allows different nodes of the same model type to be uniquely identified on a network. This is useful to help applications determine the order of nodes connected to a SynqNet network. If a node does not provide a switch, its SwitchId will be -1.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.SqNode(0).SwitchId

Syntax

Visual Basic

Property SwitchId As Long
IDL Interface

[propget] HRESULT SwitchId([out, retval] long *pVal)

See Also


SqNode.UniqueId

Description

The manufacturer's unique identification number of a particular node model.

NOTE: It is possible for a manufacturer to use the same unique identification number for two nodes of different models. The combination of SqNode.Name and SqNode.UniqueId will be unique for any given node.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.SqNode(0).SwitchId

Syntax

Visual Basic

Property UniqueId As Long
IDL Interface

[propget] HRESULT UniqueId([out, retval] long *pVal)

See Also


SqNode.AlarmSource

Description

Specifies the input triggers for the SynqNet node alarm output. The input triggers can be amplifier fault states from other drives or certain internal states.

Arguments

Argument | Type | Description | Default Value
source | meiSqNodeAlarmSrc | The source whose contribution to the alarm output is to be accessed. | None
axis | Long | The axis number of the amplifier fault input to be used as an alarm output. NOTE: The axis argument is only used if the source argument equals meiSqNodeAlarmSrcAmpFault. | 0

Type

Boolean

Visual Basic Example

' Use axis 3's amplifier fault input as a source for node 0's alarm output
Controller.SqNode(0).AlarmSource(meiSqNodeAlarmSrcAmpFault, 3) = True

Syntax

Visual Basic

Property AlarmSource(source As meiSqNodeAlarmSrc, axis = 0 As Long) As Boolean
IDL Interface

[propget] HRESULT AlarmSource([in] meiSqNodeAlarmSrc source,
[in, defaultvalue(0)] long axis,
[out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT AlarmSource([in] meiSqNodeAlarmSrc source,
[in, defaultvalue(0)] long axis,
[in] VARIANT_BOOL newVal)

See Also

SynqNet Overview


SqNode.CrcErrorCount

Description

The CRC error count for a particular network port on the SynqNet node corresponding to the SqNode object. The CRC error counters are helpful for diagnosing data integrity problems. The counter increments for any CRC error on any packet received at that port (whether the packet is addressed to the node or not). The CRC error counters are cleared during network initialization.

This property cannot be saved to flash memory.

Arguments

Argument | Type | Description
port | meiNetworkPort | The network port for which to report crc errors.

Type

Long (read only)

Visual Basic Example

x = Controller.SqNode(0).CrcErrorCount(meiNetworkPortIn)

Syntax

Visual Basic

Property CrcErrorCount(port As meiNetworkPort) As Long

IDL Interface

[propget] HRESULT CrcErrorCount([in] meiNetworkPort port,
[out, retval] long *pVal)

See Also

EventEnableNone

meiNetworkPort


SqNode.FailLimit

Description

The packet error rate limit at which a node failure occurs. When SqNode.PacketErrorRate equals SqNode.FailLimit, the node will drop to the "SynqNet Lost" state and disable its outputs. The valid range is from 0 to 255.

Arguments

Argument | Type | Description
direction | meiNetworkDirection | The network direction for which to configure the packet error rate failure limit. NOTE: Using meiNetworkDirectionAll will produce and error.

Type

Long

Visual Basic Example

x = Controller.SqNode(0).FailLimit(meiNetworkDirectionUpstream)

Syntax

Visual Basic

Property FailLimit(direction As meiNetworkDirection) As Long
IDL Interface

[propget] HRESULT FailLimit([in] meiNetworkDirection direction,
[out, retval] long *pVal)

[propput] HRESULT FailLimit([in] meiNetworkDirection direction,
[in] long newVal)

See Also


SqNode.FaultLimit

Description

The packet error rate limit at which a node fault occurs. When SqNode.PacketErrorRate equals SqNode.FaultLimit, the node will attempt to recover by switching the port used for data transmission. The valid range is from 0 to 255.

Arguments

Argument | Type | Description
direction | meiNetworkDirection | The network direction for which to configure the packet error rate fault limit. NOTE: Using meiNetworkDirectionAll will produce an error.

Type

Long

Visual Basic Example

x = Controller.SqNode(0).FaultLimit(meiNetworkDirectionUpstream)

Syntax

Visual Basic

Property FaultLimit(direction As meiNetworkDirection) As Long
IDL Interface

[propget] HRESULT FaultLimit([in] meiNetworkDirection direction,
[out, retval] long *pVal)

[propput] HRESULT FaultLimit([in] meiNetworkDirection direction,
[in] long newVal)

See Also


SqNode.PacketErrorCount

Description

The packet error counter for the SynqNet node associated with the SqNode object.

Each SynqNet node has a packet error counter and a packet error rate counter. Packets addressed to a node are checked for integrity. The packet error counters are used to monitor long-term data integrity. These counters do not trigger any fault or fail actions.

The packet error counter is incremented once for each missing or invalid packet. Typically, an application will periodically read the packet error counters and store the values in a log file.

This property cannot be saved to flash memory.

Arguments

Argument | Type | Description | Default Value
direction | meiNetworkDirection | The network direction that is being used for reporting packet errors. Using meiNetworkDirectionAll will report the total packet errors for a node. | meiNetworkDirectionAll

Type

Long (read only)

Visual Basic Example

x = Controller.SqNode(0).PacketErrorCount

Syntax

Visual Basic

Property PacketErrorCount(direction = meiNetworkDirectionAll As _
meiNetworkDirection) As Long

Visual Basic

[propget] HRESULT PacketErrorCount([in, defaultvalue(meiNetworkDirectionAll)]
meiNetworkDirection direction,
[out, retval] long *pVal)

See Also

PacketErrorRate


SqNode.PacketErrorRate

Description

The packet error rate for the SynqNet node associated with the SqNode object.

Each SynqNet node has a packet error counter and a packet error rate counter. Packets addressed to a node are checked for integrity.

The packet error rate counters are used to trigger fault recovery and/or failure shutdown. The packet error rate counter is incremented for each missing or invalid packet and is decremented for 16 consecutive valid packets. Packet Error rates for a single network direction saturate at 255. The packet error rate counters can detect large errors over short periods of time or small errors over long periods of time.

This property cannot be saved to flash memory.

Arguments

Argument | Type | Description | Default Value
direction | meiNetworkDirection | The network direction for which to report packet errors rates. Using meiNetworkDirectionAll will report the total packet error rate for a node. | meiNetworkDirectionAll

Type

Long (read only)

Visual Basic Example

x = Controller.SqNode(0).PacketErrorRate

Syntax

Visual Basic

Property PacketErrorRate(direction = meiNetworkDirectionAll As _
meiNetworkDirection) As Long

Visual Basic

[propget] HRESULT PacketErrorRate([in, defaultvalue(meiNetworkDirectionAll)]
meiNetworkDirection direction,
[out, retval] long *pVal)

See Also


SqNode.Status

Description

Reports whether the conditions necessary for generating the specified event are met or have been met. The status of some events latch meaning that Status will report if the event's conditions have been met. Since the status of other events are in real-time, the Status will report if the event's conditions are currently being met.

NOTE: Many events have actions associated with them. Event reporting does not have to be enabled in order for these actions to be generated on the controller. In other words, it is possible to not report a node failure event, but to generate an E-STOP command when the node failure event's conditions are met.

This property cannot be saved to flash memory.

Arguments

Argument | Type | Description
Type | meiStatus | The type of event whose related status bit is being read.

Type

Boolean (read only)

Visual Basic Example

x = Controller.SqNode(3).Status(meiStatusSqNodeFailure)

Syntax

Visual Basic

Property Status(Type As meiStatus) As Boolean
IDL Interface

[propget] HRESULT Status([in] meiStatus Type,
[out, retval] VARIANT_BOOL *pVal)

See Also

EventEnable

meiStatus


SqNode.AxisCount

Description

The number of axes supported by the SynqNet node represented by the SqNode object.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.SqNode(0).AxisCount

Syntax

Visual Basic

Property AxisCount As Long
IDL Interface

[propget] HRESULT AxisCount([out, retval] long *pVal)

See Also

DriveCount

SynqNet Overview


SqNode.AxisOffset

Description

The number of axes supported by all SqNode objects of previous indexes. AxisOffset is the index of the first Axis object mapped to the SqNode object.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.SqNode(0).AxisOffset

Syntax

Visual Basic

Property AxisOffset As Long
IDL Interface

[propget] HRESULT AxisOffset([out, retval] long *pVal)

See Also

AxisCount
DriveCount

SynqNet Overview


SqNode.DriveCount

Description

The number of drives on the SynqNet node represented by the SqNode object.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.SqNode(0).DriveCount

Syntax

Visual Basic

Property DriveCount As Long
IDL Interface

[propget] HRESULT DriveCount([out, retval] long *pVal)

See Also

AxisCount
AxisOffset

SynqNet Overview


SqNode.FpgaVersion

Description

The FPGA version of the SynqNet node represented by the SqNode object.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.SqNode(0).FpgaVersion

Syntax

Visual Basic

Property FpgaVersion As Long
IDL Interface

[propget] HRESULT FpgaVersion([out, retval] long *pVal)

See Also

FpgaType


SynqNet.RecoveryMode

Description

The fault recovery mode of the SynqNet network. Networks with ring topologies can be configured to recover from a fault condition. A fault condition occurs when a packet error rate counter exceeds its packet error rate fault limit. If fault recovery is enabled and a fault occurs, the node hardware and/or controller will detect the location of the fault and switch the direction of network traffic for nodes downstream from the faulted connection. During fault recovery, SynqNet.State is meiSynqNetStateSynqRecovering. After the upstream and downstream packet error rate counters decrement to zero, the recovery is completed, and the network state returns to meiSynqNetStateSynq.

When fault recovery occurs, the controller will generate an event of type meiEventTypeSynqNetRecovery. An application should notify the user about the fault and fix the broken cable/hardware as soon as possible. An application can determine the location of the fault by reading SynqNet.IdleCable. A network with a ring topology has one idle cable, which has no data traffic. The operation of the idle cable can be tested by reading SynqNet.IdleCableStatus.

WARNING: If the idle cable is broken and a second fault occurs, then fault recovery will not be able to fully recover from the fault. SynqNet will try to recover, but some nodes will be stranded. Presently, SynqNet does not support an event to notify the application if an idle cable fails. In the meantime, an application can periodically poll SynqNet.IdleCableStatus to test the cable.

Type

meiSynqNetRecoveryMode

Visual Basic Example

Controller.SynqNet(0).RecoveryMode = meiSynqNetRecoveryModeAutoArm

Syntax

Visual Basic

Property State As meiSynqNetState
IDL Interface

[propget] HRESULT State([out, retval] meiSynqNetRecoveryMode *pVal)
[propput] HRESULT State([in] meiSynqNetState newVal)

See Also

IdleCable
IdleCableStatus
State

meiSynqNetState
meiEventType

SynqNet Overview


SynqNet.EventEnable

Description

Enables or disables any of the events that are generated by the SynqNet object from being reported to the host. Please refer to the Events Overview section for a list of events generated by the SynqNet object.

Arguments

Argument | Type | Description
eventType | meiEventType | The type of event to be accessed.

Type

Boolean

Visual Basic Example

Controller.SynqNet(0).EventEnable(meiEventTypeSynqNetRecovery) = True

Syntax

Visual Basic

Property EventEnable(eventType As meiEventType) As Boolean
IDL Interface

[propget] HRESULT EventEnable([in] meiEventType eventType,
[out, retval] VARIANT_BOOL *pVal)

[propput] HRESULT EventEnable([in] meiEventType eventType,
[in] VARIANT_BOOL newVal)

See Also

EventEnableAll
EventEnableNone

meiEventType

Events Overview


SynqNet.EventEnableAll

Description

Enables reporting of all events generated by the SynqNet object to the host. Please refer to the Events Overview section for a list of events generated by the SynqNet object.

Visual Basic Example

Controller.SynqNet(0).EventEnableAll

Syntax

Visual Basic

Sub EventEnableAll
IDL Interface

HRESULT EventEnableAll()

See Also

EventEnable
EventEnableNone

meiEventType

Events Overview


SynqNet.EventEnableNone

Description

Disables reporting of all events generated by the SynqNet object to the host. Please refer to the Events Overview section for a list of events generated by the SynqNet object.

Visual Basic Example

Controller.SynqNet(0).EventEnableNone

Syntax

Visual Basic

Sub EventEnableNone
IDL Interface

HRESULT EventEnableNone()

See Also

EventEnable
EventEnableAll

meiEventType

Events Overview


SynqNet.EventReset

Description

Resets the event condition for a particular event type. This is sometimes necessary because some events latch and only unlatch with a call to an EventReset method.

Arguments

Argument | Type | Description
eventType | meiEventType | The type of event to be reset

Visual Basic Example

Controller.SynqNet(0).EventReset(meiSqNodeEventXxx) TODO: use a real event

Syntax

Visual Basic

Sub EventReset(eventType As meiEventType)
IDL Interface

HRESULT EventReset([in] meiEventType eventType)

See Also

EventEnable
EventEnableAll
EventEnableNone

meiEventType

Events Overview


SynqNet.FlashSave

Description

Saves the current SynqNet object settings to flash memory. This configuration will be loaded onto the controller during the next power up or controller reset.

Visual Basic Example

Controller.SynqNet(0).FlashSave

Syntax

Visual Basic

Sub FlashSave()
IDL Interface

HRESULT FlashSave()

See Also

Controller Object:
FlashSave
FlashSaveAll

Axis Object:
FlashSave

Motion Object:
FlashSave

SqNode Object:
FlashSave

Can Object:
FlashSave


SynqNet.Init

Description

Initializes a SynqNet network. This method performs the same network initialization that is automatically done with Controller.Init.

For most applications, SynqNet.Init will only have to be called if SynqNet.Shutdown is called first.

Visual Basic Example

Controller.SynqNet(0).Init

Syntax

Visual Basic

Sub Init()
IDL Interface

HRESULT Init()

See Also

Shutdown

Controller Object:
Init


SynqNet.Shutdown

Description

Performs a controlled shutdown of a SynqNet network. This happens by shutting off cyclic data transmission from the controller to the nodes. This will cause the SynqNet.State to transition to meiSynqNetStateDiscovery and nodes will go into a "SynqNet Lost" state and disable their outputs.

Visual Basic Example

Controller.SynqNet(0).Shutdown

Syntax

Visual Basic

Sub Shutdown()
IDL Interface

HRESULT Shutdown()

See Also

Init


SynqNet.NodeCount

Description

The number of SynqNet nodes connected to the SynqNet network represented by the SynqNet object.

This property cannot be saved to flash memory.

Type

Long (read only)

Visual Basic Example

x = Controller.SynqNet(0).NodeCount

Syntax

Visual Basic

Property NodeCount As Long
IDL Interface

[propget] HRESULT NodeCount([out, retval] long *pVal)

See Also

SqNode Object


SynqNet.State

Description

The current network state of the SynqNet object. Each state shows the present operation mode for the network. Network data traffic occurs in two modes: asynchronous and synchronous.

During asynchronous communication, a host application or controller sends one packet to one node and the node responds with one packet. There are no timing restrictions. Asynchronous communication is used during network initialization, reset, discovery, and node binary download.

During synchronous communication, the controller sends packets to the nodes and the nodes respond with packets. All data traffic is scheduled in fixed timeslots to avoid collisions. Packet data updates are cyclic and synchronized to the controller's sample rate. The network state can be read with meiSynqNetStatus(…).

The Discovery State is the initial state before the network is initialized. During this phase, the controller checks the network integrity, determines the network topology, resets the nodes, identifies, initializes, and addresses the nodes. Data packets are sent/received asynchronously.

The Async State is used for off-line operations, like node binary download. Data packets are sent/received asynchronously.

The Synq State is the normal operating state. Data packets are sent/received synchronously.

The SynqRecovering State occurs when a network fault condition was detected and the network is being reconfigured to route data packets around the fault. After the reconfiguration is complete and the packet error rate counters have decremented to zero, the network will return to the SYNQ state.

For more information, please refer to the SynqNet Overview.

This property cannot be saved to flash memory.

Arguments

Argument | Type | Description | Default Value
Index | Long | The index of the idle cable to read. NOTE: This argument is intended for compatibility with future network topologies. Current network topologies support one or no idle cables. | 0

Type

meiSynqNetState (read only)

Visual Basic Example

x = Controller.SynqNet(0).State

Syntax

Visual Basic

Property State As meiSynqNetState
IDL Interface

[propget] HRESULT State([out, retval] meiSynqNetState *pVal)

See Also

RecoveryMode

meiSynqNetState

SynqNet Overview


SynqNet.FailedNodes

Description

A list of the indexes of SqNode objects whose physical SynqNet nodes have failed.

Type

Array of Long (read only)

Visual Basic Example

x = Controller.SynqNet(0).FailedNodes

Syntax

Visual Basic

Property FailedNodes() As Long
IDL Interface

[propget] HRESULT FailedNodes([out, retval] SAFEARRAY(long)* pVal)

See Also

SqNode Object

SynqNet Overview


SynqNet.IdleCable

Description

The cable id of an idle cable on a SynqNet network. An idle cable has no data traffic. It is the redundant network connection available in ring topologies only. A single ring topology has only one idle cable.

After network initialization, the cable from the last node to the controller is idle by default. If a network fault occurs and the network is configured for fault recovery, the network traffic will be redirected around the faulty connection, through the idle cable, and the faulty connection will become the new idle cable. To test the idle cable, read the SynqNet.IdleCableStatus property.

This property cannot be saved to flash memory.

Arguments

Argument | Type | Description | Default Value
Index | Long | The index of the idle cable to read. NOTE: This argument is intended for compatibility with future network topologies. Current network topologies support zero or one idle cable. | 0

Type

Long (read only)

Visual Basic Example

x = Controller.SynqNet(0).IdleCable

Syntax

Visual Basic

Property IdleCable(index = 0 As Long) As Long
IDL Interface

[propget] HRESULT IdleCable([in, defaultvalue(0)] long index,
[out, retval] long *pVal)

See Also

IdleCableStatus

Node, Cable, Motor Addressing


SynqNet.IdleCableStatus

Description

The cable id of an idle cable on a SynqNet network. An idle cable has no data traffic. It is the redundant network connection available in ring topologies only. A single ring topology has only one idle cable.

After network initialization, the cable from the last node to the controller is idle by default. If a network fault occurs and the network is configured for fault recovery, the network traffic will be redirected around the faulty connection, through the idle cable, and the faulty connection will become the new idle cable. To test the idle cable, read the SynqNet.IdleCableStatus property.

This property cannot be saved to flash memory.

Arguments

Argument | Type | Description | Default Value
Index | Long | The index of the idle cable to read. NOTE: This argument is intended for compatibility with future network topologies. Current network topologies support one or no idle cables. | 0

Type

Long (read only)

Visual Basic Example

x = Controller.SynqNet(0).IdleCableStatus

Syntax

Visual Basic

Property IdleCableStatus(index = 0 As Long) As meiCableStatus
IDL Interface

[propget] HRESULT IdleCableStatus([in, defaultvalue(0)] long index,
[out, retval] meiCableStatus *pVal)

See Also

IdleCableStatus

Node, Cable, Motor Addressing


SynqNet.Status

Description

Reports whether the conditions necessary for generating the specified event have been or are being met. Since the status of some events latch, the Status will report if the event's conditions have been met. Since the status of other events are in real-time, the Status will report if the event's conditions are currently being met.

NOTE: Many events have actions associated with them. Event reporting does not have to be enabled in order for these actions to be generated on the controller. In other words, it is possible to not report a node failure event, but to generate an E-STOP command when the node failure event's conditions are met.

This property cannot be saved to flash memory.

Arguments

Argument | Type | Description
Type | meiStatus | The type of event whose related status bit is being read.

Type

Boolean (read only)

Visual Basic Example

x = Controller.SqNode(3).Status(meiStatusSynqNetRecovery)

Syntax

Visual Basic

Property Status(Type As meiStatus) As Boolean
IDL Interface

[propget] HRESULT Status([in] meiStatus Type,
[out, retval] VARIANT_BOOL *pVal)

See Also

EventEnable

meiStatus


SynqNet.TopologyClear

Description

Clears any topology information that is saved in the controller's flash memory by SynqNet.TopologySave.

Executing this method will disable the firmware, the MPX, and any MPI-based applications from comparing the discovered network topology. All applications will run with whatever network is discovered during initialization.

WARNING: This is a low-level network routine that will clear other controller object configurations and reset the SynqNet network. This method should be executed in your application before performing other configurations.

Visual Basic Example

Controller.SynqNet(0).TopologyClear

Syntax

Visual Basic

Sub TopologyClear()
IDL Interface

HRESULT TopologyClear()

See Also

TopologySave


SynqNet.TopologySave

Description

Saves the current SynqNet topology to the controller's flash memory. After a power-on or network reset, the controller will compare the discovered network topology with the topology saved in flash memory. If all of the topology information matches, the controller will automatically transition the network to Synq (cyclic) mode. If the topology doesn't match, then performing the SynqNet.Init method will produce one of the following error codes:

meiErrorSynqNetTopologyMismatch
meiErrorSynqNetCableLenth

WARNING: This is a low-level network routine that will clear other controller object configurations and reset the SynqNet network. This method should be executed in your application before performing other configurations.

Visual Basic Example

Controller.SynqNet(0).TopologySave

Syntax

Visual Basic

Sub TopologySave()
IDL Interface

HRESULT TopologySave()

See Also

TopologyClear


MPX Quickstart Guide Home

For Visual Basic
 | Legal Information
 | Overview
 | Visual Basic Example Application
 | Error and Event Handling
 | Where to Get Help
For LabVIEW
 | Legal Information
 | Overview
 | LabVIEW Example Instrument
 | Error and Event Handling
 | Where to Get Help


MPX Documentation - Legal Information

9D00-0166 Rev. 1
Copyright Notice

Copyright © 2002 Motion Engineering, Inc.

This document contains proprietary and confidential information of Motion Engineering, Inc., and is protected by federal copyright law. The contents of the document may not be disclosed to third parties, translated, copied, or duplicated in any form, in whole or in part, without the express written permission of Motion Engineering, Inc.

Motion Engineering Inc.
33 South La Patera Lane
Goleta, CA 93117

http://www.motioneng.com/

Contents


MPX Quickstart Guide for LabVIEW - Legal Information

MPX Quickstart Guide

for

LabVIEW

9D00-0233 Rev. 2
Copyright Notice

Copyright © 2002 Motion Engineering, Inc.

This document contains proprietary and confidential information of Motion Engineering, Inc., and is protected by federal copyright law. The contents of the document may not be disclosed to third parties, translated, copied, or duplicated in any form, in whole or in part, without the express written permission of Motion Engineering, Inc.

Motion Engineering Inc.
33 South La Patera Lane
Goleta, CA 93117

http://www.motioneng.com/

Contents

Overview
LabVIEW Example Instrument
Error and Event Handling
Where to Get Help


Overview

This guide will take you through the process of adding the MPX control to the LabVIEW development environment and creating a simple instrument to perform trapezoidal type moves.

This guide assumes the following:

  • You have LabVIEW 5.0 or later installed.
  • You have an MPI compatible controller installed.
  • You have installed the version of the MPX library compatible with the installed MPI version of software and the installed controller firmware.
  • You have either:
    • Hooked up axis 0 to a physical system and tuned axis 0 with Motion Console
    • Or have an analog XMP and have set up axis 0 to use stepper motor mode with step-loopback enabled. This will allow motion to be simulated without a physical system being connected to the controller.

To enable step-loopback mode with and analog XMP, please run the Visual Basic script Simulate.vbs, available from the Start Menu: Start > Programs > Motion Engineering > Simulate.vbs


LabView Example Instrument

This example assumes that you have set up axis 0 in Motion Console so that it is correctly tuned with the amplifier enabled an in an idle state, and is the only axis associated with motion 0.

Start LabVIEW. When the startup widow appears, press the New VI button.

A blank instrument panel, blank diagram, a Controls panel, and a Tools panel will appear.

Tools Panel

Controls Panel

Instrument Panel

Diagram

From the Controls Panel, click on the ActiveX button. A new ActiveX controls panel will appear. From this dialog, click on the Container control.

Now move the mouse to the instrument panel. You will be able to create an ActiveX container by clicking somewhere in the panel.

Once you create the control, the word "Container" will be highlighted. You can rename the container by typing in a new name. Rename the container "Controller" now.

Right click in the center of the container. A popup menu will appear.

Select Insert ActiveX Object.

A dialog box will appear. Unlike Visual Basic or some other applications, LabVIEW displays a list of objects, not type libraries. You will not see the MPX Library, only the Controller Class.

The listing of controls is sorted by ASCII character values. In other words, capital letters will appear before lower case letters.For example, "apple" will appear after "Zebra" and "Controller" will appear after "CWSlide."

From the list of objects, select Controller Class.

An MEI logo will appear on the instrument panel. This icon represents the MEI ActiveX Controller object.

Now switch to the Diagram window. You will see node representing named "Controller." This is the Controller object node.

Right click on the Controller node. A popup menu will appear. Select the following options:

Create --> Method --> Motion

A node representing the Motion method of the Controller object will appear. Place this node to the right of the controller node.

Go to the Tools panel and select the wiring tool. You can now connect the Controller node to the Motion method node.

Connect the two nodes as is shown to the right.

Go to the Functions panel and click on the Numeric functions button. A new Numeric panel will appear. Select the Numeric Constant icon.

We are now ready to run our application. Press the F5 key to start the application.

Place the constant in the diagram to the left of the Index input of the Motion node. Leave its value zero and wire the constant to the Index input.

Now, right click on the Motion output. A popup menu will appear. Select the following options:

Create --> Method -> Trapezoidal

Place the new node to the right of the Motion output. Wire the Motion output of the Motion node to the reference input of the Trapezoidal node.

Select another numeric constant from the Numeric palette and place it to the left of the speed input. Change the value of the constant to 1000. Right click on the constant. From the popup menu, select:

Representation --> DBL

This will change the representation of the constant to a double precision floating point number.

Now, wire the constant to the speed input.

Create another double precision numeric constant with the value 10000 and wire the constant to both the accel and decel inputs of the Trapezoidal node.

Click anywhere in the Instrument Panel. This will bring back the ActiveX controls panel. Click on the button with the arrow pointing up. This will bring back the Controls panel.

Click on the Numeric controls button. From the new Numeric panel, select the Digital Control icon.

Place the digital control on the Instrument Panel, next to the MEI controller icon and name the control "Target."

Return to the Diagram window. Move the Target node below the Motion node. Wire the Target node to the position input of the Trapezoidal node.

Go back to the Instrument Panel, and enter 5000 into the Target control.

Now, execute the VI by clicking on the Run button

The motor connected to Axis 0 will now move to a position of 5000. You may watch the actual and command positions of the axis change in Motion Console.

Congratulations! You have completed and run your first virtual instrument with the MPX control. Experiment with this VI by changing the target position into the text box and pressing the Run button.

If you want to learn a little bit about error handling and events, please continue on to the next section.


Where to Get Help

A help file is provided with the MPX control. It can be accessed via the Start Menu:

Start > Program Files > Motion Engineering > MPX > MPX Documentation

Our on-line help system is also accessible. Our technical support website can be accessed at http://support.motioneng.com.


MPX Quickstart Guide for Visual Basic - Legal Information

MPX Quickstart Guide

for

Visual Basic

9D00-0232 Rev. 3
Copyright Notice

Copyright © 2002 Motion Engineering, Inc.

This document contains proprietary and confidential information of Motion Engineering, Inc., and is protected by federal copyright law. The contents of the document may not be disclosed to third parties, translated, copied, or duplicated in any form, in whole or in part, without the express written permission of Motion Engineering, Inc.

Motion Engineering Inc.
33 South La Patera Lane
Goleta, CA 93117

http://www.motioneng.com/

Contents


Overview

This guide will take you through the process of adding the MPX control to the Visual Basic development environment and creating a simple application to perform trapezoidal type moves.

This guide assumes the following:

  • You have Visual Basic 5.0 or later installed
  • You have an MPI compatible controller installed
  • You have installed the version of the MPX library compatible with the installed MPI version of software and controller firmware.
  • You have either:
    • Hooked up axis 0 to a physical system and tuned axis 0 with Motion Console
    • Or have an analog XMP and have set up axis 0 to use stepper motor mode with step-loopback enabled. This will allow motion to be simulated without a physical system being connected to the controller.

To enable step-loopback mode with an analog XMP, please run the Visual Basic script Simulate.vbs, available from the Start Menu: Start > Programs > Motion Engineering > Simulate.vbs


Visual Basic Example Application

This example assumes that you have set up axis 0 in Motion Console so that it is already correctly tuned with the amplifier enabled an in an idle state.

Start Visual Basic. When the New Project widow appears, select Standard EXE and press the Open button.

An application with a blank form should appear. Using the mouse, right click within a blank area of the tools window. Select Components from the popup menu that appears.

Scroll down until you find MPX from Motion Engineering. Select it by clicking the checkbox next to its name and press the OK button.

You should now see an MEI icon in the tools window. This is the MPX control. You can add a MPX control to the form by double clicking on the MEI icon.

Set the name to “Controller” by changing the “(Name)” property in the Properties window. Add a button control to the form by double clicking the button icon in the tools window. Name it “MoveButton” and set its caption to “Move” by changing the “Caption” property in the Properties window.

Now add a TextBox control. Name it “Target” and set its “Text” attribute to “0”

Add a Timer control. Name it “Update” and change its “Interval” property to 50.

We are now finished adding the controls we need. Before we go any further, let us arrange the controls and change the size of the form to be more visually appealing.

We are now ready to add the code for the application. Double click on a blank area of the form. A code page for Form1 should appear with the outline of the subroutine Form_Load() written. Add in the code shown to the right.

This code tells Motion object 0 to control Axis 0 and sets the default motion parameters for Motion object 0.

Go back to the form layout window and double click on the Move button. Again, add in the code shown to the right.

Double click on the Timer control so we can add code to update the display of the axis position.

We are now ready to run our application. Press the F5 key to start the application.

Enter 5000 in the text box and press the Move button. The axis will move to position 5000 and the current axis position will be displayed.

Congratulations! You have completed your first application with the MPX control. Experiment with this application by entering different positions into the text box and pressing the Move button.

If you want to learn a little bit about error handling and events, please continue on to the next section.


Error and Event Handling

Move the axis back to a position of 5000. Now enter 0 in the text box and click on the Move button twice. The second click will command another motion while the first motion is still being executed. This will cause the ActiveX control to raise a run-time error.

You will notice that a dialog appears announcing the error and from which the application cannot recover. Click on the End button to return to the Visual Basic development environment.

In a real application, we would not like an error to terminate our application. One way of solving this problem is to use Visual Basic’s error handling mechanism. We are going to modify MoveButton_Click() to employ this mechanism.

Go back to the code window for Form1. Add the code shown to the right to MoveButton_Click().

Now execute the application again by pressing F5. Move the axis to position 5000 and enter 0 in the text box. Now click on the Move button twice.

You will notice that message box appears instead. And best of all, when you press the OK button, the application will still be running.

Being able to trap run-time errors is good, but it would be better if we could prevent errors. We could prevent this error if we disabled the Move button while a motion was in progress. This would involve:

  • Disabling the Move button after the user clicked it.
  • Enabling the Move button once the motion was complete.

The first requirement seems easy to implement, but we can only implement the second if we can have the controller notify us that the motion is complete. Well, the MPX control allows this to happen through ActiveX events.

To define an ActiveX event callback function, we select the object creating the event from the left drop down box at the top of the code window—In this case we will select the Controller object.

Once we select the object, we need to select the event handler from the right drop down box at the top of the code window. We are interested in the Motion event Done, so we will select the handler OnMotionEvent.

The mouse will now be placed in a subroutine called Controller_OnMotionEvent.

We need to add code to this subroutine and to the Form_Load and MoveButton_Click subroutines as well.

Modify the code so that it is in agreement with the code shown to the right.

The new code in the subroutine MoveButton_Click will disable the Move button when a motion is commanded.

The code in the subroutine Controller_OnMotionEvent will enable the Move button when a Done event is received from Motion object 0.

The EventEnable call that was added to the subroutine Form_Load enables the reporting of the Done event. Without this call, the Controller_OnMotionEvent subroutine would never be called and the Move button never reenabled.

Now when you run the application and click on the Move button, the Move button will be disabled until the move is complete.

Congratulations! You have now learned a little bit about handling errors and events. For more sample applications, please see the ActiveX Visual Basic Sample Applications Guide.