Omega Engineering EN-EIC-325-PCI manual Available only for RequestPositionCounter

Page 25

3.6.ARGUMENTS

The constants of the arguments are available as follows:

*In VB they are included in the example source file.

*In VC they are in the EncPciConst.h file in the VC folder; refer to the ReadMe.txt file.

*For DOS C/C++, the arguments, along with the headers of the functions, are in the file CPP\EncPci.h.

*For other environments, refer to the file More\EncPci.h. It contains the arguments, along with the headers of the functions, coded in C syntax. Transform the code to the proper syntax.

//CardHandle:

//Handle to current card as retrieved by the function GetCardHandle.

//ChipNumber:

#define Chip1 1 // Standard chip (always should be present). #define Chip2 2 // Optional chip.

//EncoderNumber:

//The codes of EncoderNumber are of three types:

//Type 1 codes (one encoder):

//Available for all the functions using EncoderNumber.

//Type 2 codes (pair of encoders):

//Available only for ResetPositionCounter and RequestPositionCounter.

//Type 3 code (all four encoders):

//Available only for RequestPositionCounter.

//Type 1 EncoderNumber codes (one encoder):

#define Encoder1 1 // First encoder in the selected chip (A or C). #define Encoder2 2 // Second encoder in the selected chip (B or D). // Type 2 EncoderNumber codes (pair of encoders):

#define Encoder3 3 // Both encoders in the selected chip (A+B or C+D).

//Type 3 EncoderNumber codes (all 4 encoders): #define Encoder4 4 // All 4 encoders (A+B+C+D).

//LedNumber:

#define LedYellow 1 #define LedRed 2

//ClocksPerCycle:

#define Clock1 1 // One clock per cycle. #define Clock2 2 // Two clocks per cycle. #define Clock4 4 // Four clocks per cycle.

//EventFlagSource:

#define EventFlagSourceNone 1 #define EventFlagSourceSetPoint 2 #define EventFlagSourceOverflow 3 #define EventFlagSourceIndex 4

//OnOffMode:

23

Image 25
Contents User’s Guide Servicing North America Model Table of Contents Section Each Encoder Interface includes the following elements Encoder InterfaceCards Hardware I/O Software InputsPIN LAY-OUT Encoder InputsLogical Inputs Encoders Event Signals and General OutputsFunction Type Pin No CPP InstallationVB folders Page WinSysPath folder WinSysPath is Page Page Introduction to the Functions Chip Level Functions Card Level FunctionsSetActiveChip Brief Name Arguments in C Syntax Full DescriptionAll the following functions refer to that active chip GetActiveChipInputs Brief Description NameArguments in C Syntax Full Description BriefShort EncoderNumber Short ClocksPerCycle Short EncoderNumberShort Polarity SetIndexPulsePolarityGetIndexPulsePolarity CounterLong SetPoint SetSetPointSetPoint GetSetPoint Source SetEncoderEventFlag GetEncoderEventFlag PolarityFlag SetHoldEncoderEventGetHoldEncoderEvent ClearEncoderEventShort OutputsMirror ResetPositionCounterReadPositionCounter Long* PositionCounterAvailable only for RequestPositionCounter Polarity Encoder Counters IntroductionSquare wave signal Input Signals from the EncodersSine wave signal GeneralGeneral SoftwareConnector Wiring for the Inputs Connector Wiring for the Outputs Yes NextFinish WinNTPage Page Page Page Page Page Page Appendix D Product Development WARRANTY/DISCLAIMER Shop online at omega.com