EasyManua.ls Logo

Fastech Ezi-Step Plus-R

Fastech Ezi-Step Plus-R
114 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
- 81 -
81
Library for PC Program
FAS_MoveSingleAxisAbsPos
To move the motor to the absolute coordinate value
Syntax
int FAS_MoveSingleAxisAbsPos (
BYTE nPortNo,
BYTE iSlaveNo,
long lAbsPos,
DWORD lVelocity
);
Parameters
nPortNo
Port number of relevant drive.
iSlaveNo
Slave number of relevant drive.
lAbsPos
Absolute coordinate where position to move
lVelocity
Velocity when the motor moves
Return Value
FMM_OK : Command has been successfully performed.
FMM_NOT_OPEN : The drive has not been connected yet .
FMM_INVALID_PORT_NUM : There is no nPort in the connected ports .
FMM_INVALID_SLAVE_NUM : There is no drive of iSlaveNo in the relevant port .
Remarks
Example
#include "FAS_EziMOTIONPlusR.h"
void funcMove()
{
BYTE nPortNo = 1; // COMM Port Number
BYTE iSlaveNo = 0; // Slave No (0 ~ 15)
DWORD dwAxisStatus, dwInput;
EZISTEP_AXISSTATUS stAxisStatus;
long lAbsPos, lIncPos, lVelocity;
int nRtn;
// Try to connect
if (FAS_Connect(nPortNo, 115200) == FALSE)
{
// Connection failed.
// The port is not connected or the baudrate may be wrong.
return;
}
// Check error status.
nRtn = FAS_GetAxisStatus(nPortNo, iSlaveNo, &dwAxisStatus);
_ASSERT(nRtn == FMM_OK);
stAxisStatus.dwValue = dwAxisStatus;
//if (dwAxisStatus & 0x00000001)
if (stAxisStatus.FFLAG_ERRORALL)

Table of Contents

Related product manuals