EasyManuals Logo
Home>Fastech>Controller>Ezi-Step Plus-R

Fastech Ezi-Step Plus-R User Manual

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
Page #101 background imageLoading...
Page #101 background image
- 10 1 -
101
Library for PC Program
FAS_PosTableReadItem
To read a specific item in the position table
Syntax
int FAS_PosTableReadItem(
BYTE nPortNo,
BYTE iSlaveNo,
WORD wItemNo,
LPITEM_NODE lpItem
);
Parameters
nPortNo
Port number of relevant drive.
iSlaveNo
Slave number of relevant drive.
wItemNo
Item number to be read
lpItem
Item structure pointer where item value is saved
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 .
FMM_INVALID_PARAMETER_NUM : wItemNo is out of range.
Remarks
Example
#include "FAS_EziMOTIONPlusR.h"
void funcPosTable()
{
BYTE nPortNo = 1; // COMM Port Number
BYTE iSlaveNo = 0; // Slave No (0 ~ 15)
WORD wItemNo;
ITEM_NODE nodeItem;
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;
}
// Read No.20 Position table value and edit the position value.
wItemNo = 20;
nRtn = FAS_PosTableReadItem(nPortNo, iSlaveNo, wItemNo, &nodeItem);
_ASSERT(nRtn == FMM_OK);
nodeItem.lPosition = 260000; // Change the position value to 260000.
nodeItem.wBranch = 23; // Set next command to 23.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Fastech Ezi-Step Plus-R and is the answer not in the manual?

Fastech Ezi-Step Plus-R Specifications

General IconGeneral
BrandFastech
ModelEzi-Step Plus-R
CategoryController
LanguageEnglish

Related product manuals