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 #59 background imageLoading...
Page #59 background image
- 59 -
59
Library for PC Program
for (i=0; i</*Input Pin Count*/12; i++)
{
nRtn = FAS_GetIOAssignMap(nPortNo, iSlaveNo, i, &dwLogicMask, &bLevel);
_ASSERT(nRtn == FMM_OK);
if (dwLogicMask != IN_LOGIC_NONE)
printf("Input Pin %d : Logic Mask 0x%08X (%s) \n", i, dwLogicMask,
((bLevel == LEVEL_LOW_ACTIVE) ? "Low Active" : "High Active"));
else
printf("Input Pin %d : Not assigned \n", i);
}
// Assign E-Stop Logic (Low Active) to input pin 3.
iPinNo = 3; // 0 ~ 11 value is available (Caution : 0 ~ 2 is fixed.)
nRtn = FAS_SetIOAssignMap(nPortNo, iSlaveNo, iPinNo, STEP_IN_BITMASK_ESTOP,
LEVEL_LOW_ACTIVE);
_ASSERT(nRtn == FMM_OK);
// Check assign information of output pin.
for (i=0; i<10/*Output Pin Count*/; i++)
{
nRtn = FAS_GetIOAssignMap(nPortNo, iSlaveNo, 12/*Input Pin Cou nt*/ + i,
&dwLogicMask, &bLevel);
_ASSERT(nRtn == FMM_OK);
if (dwLogicMask != OUT_LOGIC_NONE)
printf("Output Pin %d : Logic Mask 0x%08X (%s) \n", i, dwLogicMask,
((bLevel == LEVEL_LOW_ACTIVE) ? "Low Active" : "High Active"));
else
printf("Output Pin %d : Not assigned \n", i);
}
// Assign ALARM Logic (High Active) to output pin 9.
iPinNo = 9; // 0 ~ 9 value is available (Caution : 0 is fixed to COMPOUT.)
nRtn = FAS_SetIOAssignMap(nPortNo, iSlaveNo, 12/*Input Pin Count*/ + iPinNo,
STEP_OUT_BITMASK_ALARM, LEVEL_HIGH_ACTIVE);
_ASSERT(nRtn == FMM_OK);
// Disconnect.
FAS_Close(nPortNo);
}
See Also
FAS_SetIOAssignMap

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