SESTILIO  3.0.2
C Library for SESTILIO a smart A/D and D/A interface on USB 2.0
Step-Motor controls

Functions

CTYPE int DLL SE_MotorPositioning (int dir0, long steps0, int dir1, long steps1, int usbDevice)
 Executes a positioning on two axes in the direction of and by the specified number of steps. More...
 
CTYPE int DLL SE_SetMotorSlope (int axis, int slopeIndex, int slope, int usbDevice)
 If the number of steps is sufficient, the setting command realizes an accelerating and decelerating ramp on 10 levels of speed increase and decrease. The preset values are:
0 = 50
1 = 55
2 = 60
3 = 67
4 = 78
5 = 86
6 = 100
7 = 120
8 = 150
9 = 200
The indicated values represent the number of executed steps at every speed level of the setup ramp. This command allows modification of these values. More...
 
CTYPE int DLL SE_SetMotorSpeed (int axis, int startDelay, int endDelay, int usbDevice)
 This command effects the speed setting of the motor on the selected axis. The setting adopts an acceleration ramp that goes from a minimum speed, represented by this value, to a maximum speed of:
Vf = Vi – Vd * 10
The time base used for the setting is 100uS,the Vi preset value is 12 and the Vd preset value is 1.
It follows that with the preset values the maximum speed attained by the motor is 2500 Hz and that the initial speed is 833 Hz. More...
 
CTYPE long DLL SE_ReadMotorCount (int axis, int usbDevice)
 After having launched a setting, it may be necessary to know how much time is needed to complete the process; this command allows to read the number of steps that still have to be executed on the selected axis. More...
 
CTYPE void DLL SE_MotorCalibrate (int dir0, long steps0, int dir1, long steps1, int bitAxis0, int bitAxis1, int usbDevice)
 Command allowing calibration of one or more axes at a time. Executes a maximum number of steps until it finds an active opto-isolated input indicating that the calibration point of the axis has been reached. At that point the motor stops. In the example below a two-axis calibration is executed. Maximum 10000 steps are executed until the opto-isolated input 0 for axis 0 and input 1 for axis 1 are verified to be active. More...
 
CTYPE int DLL SE_SetMotorEnable (int axis, int enable, int usbDevice)
 Turn on/off the motor. After a positioning the motor is always on, this can be useful for a great holding torque but to reduce consumption you can turn off the motor power with this command. More...
 
CTYPE int DLL SE_AuxMotorPositioning (int id, int dir, int steps, int delay, int usbDevice)
 Executes a positioning on specified axes in the direction of and by the specified number of steps. With this command is possible to controls up to four step-motor drivers.
Several TTL signals from Y4 are used to control SMD42 DTA step-motor drives.
Following list specify used signals:
Y4.7 Clock 0
Y4.8 Dir. 0
Y4.9 Clock 1
Y4.10 Dir 1
Y4.11 Clock 2
Y4.12 Dir 2
Y4.13 Clock 3
Y4.14 Dir 3
Warning this command return the operation status only on positioning done, also you can run one axis at time. More...
 
CTYPE int DLL SE_AuxMotorPositCalib (int id, int dir, int steps, int delay, int fcLevel, int usbDevice)
 Executes a positioning on specified axes in the direction of and by a maximum number of steps to find Calibrate signal. With this command is possible to controls up to four step-motor drivers.
Several TTL signals from Y4 are used to control SMD42 DTA step-motor drives.
Following list specify used signals:
Y4.7 Clock 0
Y4.8 Dir. 0
Y4.9 Clock 1
Y4.10 Dir 1
Y4.11 Clock 2
Y4.12 Dir 2
Y4.13 Clock 3
Y4.14 Dir 3
Y4.4 Calibrate input
Warning this command return the operation status only on positioning done, also you can run one axis at time. More...
 

Detailed Description

Functions for a full control of two step motors.

Function Documentation

◆ SE_AuxMotorPositCalib()

int SE_AuxMotorPositCalib ( int  id,
int  dir,
int  steps,
int  delay,
int  fcLevel,
int  usbDevice 
)

Executes a positioning on specified axes in the direction of and by a maximum number of steps to find Calibrate signal. With this command is possible to controls up to four step-motor drivers.
Several TTL signals from Y4 are used to control SMD42 DTA step-motor drives.
Following list specify used signals:
Y4.7 Clock 0
Y4.8 Dir. 0
Y4.9 Clock 1
Y4.10 Dir 1
Y4.11 Clock 2
Y4.12 Dir 2
Y4.13 Clock 3
Y4.14 Dir 3
Y4.4 Calibrate input
Warning this command return the operation status only on positioning done, also you can run one axis at time.

Parameters
idAxis identification 0-3.
dirDirection axis 0. Motor direction
stepsSteps to be executed.
delayDelay in micro seconds from step-step.
fcLevel0 or 1 specify the TRUE value for the Calibrate signal.
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_SetMotorSlope, SE_ReadMotorCount, SE_MotorCalibrate, SE_SetMotorEnable.
Returns
Operation status. Operation Status

Definition at line 580 of file sestilio.cpp.

◆ SE_AuxMotorPositioning()

int SE_AuxMotorPositioning ( int  id,
int  dir,
int  steps,
int  delay,
int  usbDevice 
)

Executes a positioning on specified axes in the direction of and by the specified number of steps. With this command is possible to controls up to four step-motor drivers.
Several TTL signals from Y4 are used to control SMD42 DTA step-motor drives.
Following list specify used signals:
Y4.7 Clock 0
Y4.8 Dir. 0
Y4.9 Clock 1
Y4.10 Dir 1
Y4.11 Clock 2
Y4.12 Dir 2
Y4.13 Clock 3
Y4.14 Dir 3
Warning this command return the operation status only on positioning done, also you can run one axis at time.

Parameters
idAxis identification 0-3.
dirDirection axis 0. Motor direction
stepsSteps to be executed.
delayDelay in micro seconds from step-step.
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_SetMotorSlope, SE_ReadMotorCount, SE_MotorCalibrate, SE_SetMotorEnable.
#include "sest.h"
if(SE_Open('0', 0) == SE_S_SUCCESS)
{
// Execute 400 steps on motor id 0 with a frequency of 1KHz
// Procedure return only at the end of positioning
}
Returns
Operation status. Operation Status

Definition at line 573 of file sestilio.cpp.

◆ SE_MotorCalibrate()

void SE_MotorCalibrate ( int  dir0,
long  steps0,
int  dir1,
long  steps1,
int  bitAxis0,
int  bitAxis1,
int  usbDevice 
)

Command allowing calibration of one or more axes at a time. Executes a maximum number of steps until it finds an active opto-isolated input indicating that the calibration point of the axis has been reached. At that point the motor stops. In the example below a two-axis calibration is executed. Maximum 10000 steps are executed until the opto-isolated input 0 for axis 0 and input 1 for axis 1 are verified to be active.

Parameters
dir0Direction axis 0. Motor direction
steps0Maximum steps to be executed on axis 0.
dir1Direction axis 1. Motor direction
steps1Maximum steps to be executed on axis 1.
bitAxis0Input axis 0. Configuration per bit; input 0 corresponds to bit 0, etc. for the opo-coupled input port.
bitAxis1Input axis 1. Configuration per bit; input 0 corresponds to bit 0, etc. for the opo-coupled input port.
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_SetMotorSlope, SE_ReadMotorCount, SE_MotorCalibrate, SE_SetMotorEnable.
Returns
Don't return any results, to check the end of operation use SE_CheckAck.

Definition at line 615 of file sestilio.cpp.

◆ SE_MotorPositioning()

int SE_MotorPositioning ( int  dir0,
long  steps0,
int  dir1,
long  steps1,
int  usbDevice 
)

Executes a positioning on two axes in the direction of and by the specified number of steps.

Parameters
dir0Direction axis 0. Motor direction
steps0Steps to be executed on axis 0.
dir1Direction axis 1. Motor direction
steps1Steps to be executed on axis 1.
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_SetMotorSlope, SE_ReadMotorCount, SE_MotorCalibrate, SE_SetMotorEnable.
#include "sest.h"
if(SE_Open('0', 0) == SE_S_SUCCESS)
{
// Execute 4500 steps in Clock Wise direction on motor A also execute 2500 steps
// in Counter Clock Wise direction on motorB
// Wait end of positioning
// Wait end of positioning
// Wait end of positioning
// Turn OFF all motors
}
Returns
Operation status. Operation Status

Definition at line 587 of file sestilio.cpp.

◆ SE_ReadMotorCount()

long SE_ReadMotorCount ( int  axis,
int  usbDevice 
)

After having launched a setting, it may be necessary to know how much time is needed to complete the process; this command allows to read the number of steps that still have to be executed on the selected axis.

Parameters
axisID axis. Motor selection
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_SetMotorSlope, SE_MotorPositioning, SE_MotorCalibrate, SE_SetMotorEnable.
Returns
The number of steps still to be executed.

Definition at line 608 of file sestilio.cpp.

◆ SE_SetMotorEnable()

int SE_SetMotorEnable ( int  axis,
int  enable,
int  usbDevice 
)

Turn on/off the motor. After a positioning the motor is always on, this can be useful for a great holding torque but to reduce consumption you can turn off the motor power with this command.

Parameters
axisID axis. Motor selection
enable1 = Turn on the motor, 0 Turn off the motor. Motor enable
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_SetMotorSlope, SE_MotorPositioning, SE_MotorCalibrate, SE_ReadMotorCount.
Returns
Operation status. Operation Status

Definition at line 622 of file sestilio.cpp.

◆ SE_SetMotorSlope()

int SE_SetMotorSlope ( int  axis,
int  slopeIndex,
int  slope,
int  usbDevice 
)

If the number of steps is sufficient, the setting command realizes an accelerating and decelerating ramp on 10 levels of speed increase and decrease. The preset values are:
0 = 50
1 = 55
2 = 60
3 = 67
4 = 78
5 = 86
6 = 100
7 = 120
8 = 150
9 = 200
The indicated values represent the number of executed steps at every speed level of the setup ramp. This command allows modification of these values.

Parameters
axisID axis. Motor selection
slopeIndexID accelerating ramp. Motor slope selection
slopeSlope value. 0-65535
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_MotorPositioning, SE_ReadMotorCount, SE_MotorCalibrate, SE_SetMotorEnable.
Returns
Operation status. Operation Status

Definition at line 594 of file sestilio.cpp.

◆ SE_SetMotorSpeed()

int SE_SetMotorSpeed ( int  axis,
int  startDelay,
int  endDelay,
int  usbDevice 
)

This command effects the speed setting of the motor on the selected axis. The setting adopts an acceleration ramp that goes from a minimum speed, represented by this value, to a maximum speed of:
Vf = Vi – Vd * 10
The time base used for the setting is 100uS,the Vi preset value is 12 and the Vd preset value is 1.
It follows that with the preset values the maximum speed attained by the motor is 2500 Hz and that the initial speed is 833 Hz.

Parameters
axisID axis. Motor selection
startDelayDelay initial and final speed (Vi).
endDelaySIncreasing or decreasing value (Vd).
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_MotorPositioning, SE_ReadMotorCount, SE_MotorCalibrate, SE_SetMotorEnable.
Returns
Operation status. Operation Status

Definition at line 601 of file sestilio.cpp.