📄 as_cpci75sd1.h
字号:
// see datasheet for further details
int __stdcall as_75sd1_getVelocity(HANDLE cardHandle, int channel, int * velocity);
// Reads the Velocity word for the specified channel (1 - 8)
// velocity = -32768 to 32767
int __stdcall as_75sd1_setAngleDelta(HANDLE cardHandle, int channel, double angleDelta);
// Sets the Angle Delta word for the specified channel (1 - 8)
// 0 or 0.05 deg < angleDelta < 180.0 Deg
// 0 Disables the Angle Change Monitoring on specified channel
int __stdcall as_75sd1_getAngleDelta(HANDLE cardHandle, int channel, double * angleDelta);
// Reads back the Angle Delta word for the specified channel (1 - 8)
// 0 or 0.05 deg < angleDelta < 180.0 Deg
// 0 Disables the Angle Change Monitoring on specified channel
int __stdcall as_75sd1_setBinAngleDelta(HANDLE cardHandle, int channel, int angleDelta);
// Sets the Angle Delta word for the specified channel (1 - 8)
// angleDelta is 0 or 10 to 32767
// 0 Disables the Angle Change Monitoring on specified channel
int __stdcall as_75sd1_getBinAngleDelta(HANDLE cardHandle, int channel, int * angleDelta);
// Reads back the Angle Delta word for the specified channel (1 - 8)
// angleDelta is 0 or 10 to 32767
// 0 Disables the Angle Change Monitoring on specified channel
int __stdcall as_75sd1_setAngleDeltaInit(HANDLE cardHandle, int init);
// sets the Angle Delta initiate word
// init = 0, Angle Delta not monitored
// init = 1, Angle Delta monitoring initiated
// see datasheet for further details
int __stdcall as_75sd1_getAngleDeltaInit(HANDLE cardHandle, int * init);
// Reads back the Angle Delta initiate word
// init = 0, Angle Delta not monitored
// init = 1, Angle Delta monitoring initiated
// see datasheet for further details
int __stdcall as_75sd1_getAngleDeltaReg(HANDLE cardHandle, int * init);
// Reads back the Angle Delta Register word
// Each bit is associated with a channel
// D0 = 1, Indicates Channel 1 Angle exceeded Channel 1's Angle Delta setting,
// D7 = 1, Indicates Channel 8 Angle exceeded Channel 8's Angle Delta setting,
// see datasheet for further details
/********** TWO-SPEED **********/
int __stdcall as_75sd1_setRatio(HANDLE cardHandle, int channel, int ratio);
// Sets the ratio of specified channel (2, 4, 6, or 8) to the one speed
// channel (1, 3, 5, or 7 respectively)
// ratio is 1 to 255, ratio = 1, channels are independent.
// ratio > 1, second speed channel angle is ratio * one speed channel angle
int __stdcall as_75sd1_getRatio(HANDLE cardHandle, int channel, int * ratio);
// Reads back the ratio of specified channel (2, 4, 6, or 8) to the one speed
// channel (1, 3, 5, or 7 respectively)
// ratio is 1 to 255, ratio = 1, channels are independent.
// ratio > 1, second speed channel angle is ratio * one speed channel angle
int __stdcall as_75sd1_getTwoSpeedLockLoss(HANDLE cardHandle, int channel, int *lockloss);
// Reads the Two Speed Lock Loss word for specified channel ( 2, 4, 6, or 8)
// 1 Indicates Two Speed Lock Loss between Specified Channel pair,
int __stdcall as_75sd1_getTwoSpeedLockLossAll(HANDLE cardHandle, int *lockloss);
// Reads the Two Speed Lock Loss word
// Each bit is associated with a channel pair
// D0 = 1, Indicates Two Speed Lock Loss between Channel 1 and Channel 2,
// D3 = 1, Indicates Two Speed Lock Loss between Channel 7 and Channel 8,
// see datasheet for further details
/********** TEST ***********/
int __stdcall as_75sd1_setTestAngle(HANDLE cardHandle, double angle);
// Sets the Test Angle for the D0 Test
// angle is +/- 360.0 Deg
int __stdcall as_75sd1_setBinTestAngle(HANDLE cardHandle, int angle);
// Sets the Test Angle for the D0 Test
// angle is 0 to 65535
int __stdcall as_75sd1_getTestAngle(HANDLE cardHandle, double * angle);
// Reads back the Test Angle for the D0 Test
// angle is +/- 360.0 Deg
int __stdcall as_75sd1_getBinTestAngle(HANDLE cardHandle, int * angle);
// Reads back the Test Angle for the D0 Test
// angle is 0 to 65535
int __stdcall as_75sd1_D0TestEnable(HANDLE cardHandle);
// Enables the D0 test, sets D0 of test enable word to 1
// See datasheet for details
int __stdcall as_75sd1_D0TestDisable(HANDLE cardHandle);
// Disables the D0 test, sets D0 of test enable word to 0
int __stdcall as_75sd1_D2TestEnable(HANDLE cardHandle);
// Enables the D2 test, sets D2 of test enable word to 1
// See datasheet for details
int __stdcall as_75sd1_D2TestDisable(HANDLE cardHandle);
// Disables the D2 test, sets D2 of test enable word to 0
int __stdcall as_75sd1_clearD2TestVerification(HANDLE cardHandle);
// Clears the D2 verification register.
// device will set this register to 0x55 if D2 test is enabled
int __stdcall as_75sd1_D2TestVerification(HANDLE cardHandle);
// Checks that the D2 verification register has been set 0x55 by device
// returns 0 if register is 0x55, indicating D2 is enabled
int __stdcall as_75sd1_D3TestEnable(HANDLE cardHandle);
// Enables the D3 test, sets D3 of test enable word to 1
// See datasheet for details
int __stdcall as_75sd1_D3TestDisable(HANDLE cardHandle);
// Disables the D3 test, sets D3 of test enable word to 0
int __stdcall as_75sd1_getTestEnable(HANDLE cardHandle, int * enable);
// Reads back the Test Enable word.
// bit D0 = 1 enables D0 test, D0 = 0 disables D0 test
// bit D2 = 1 enables D2 test, D2 = 0 disables D2 test
// bit D3 = 1, D3 test is running, D3 = 0, D3 test is not running
int __stdcall as_75sd1_setPOSTEnable(HANDLE cardHandle, int enable);
// sets the POST test byte.
// enable = 0, Disables the POST test. MUST SAVE SETUP TO MAINTAIN POST TEST DISABLED
// AFTER POWER DOWN
// enable = 1, Enables the POST test MUST SAVE SETUP TO MAINTAIN POST TEST ENABLED
// AFTER POWER DOWN
// see data sheet for further details
int __stdcall as_75sd1_getPOSTEnable(HANDLE cardHandle, int * enable);
// Reads back the POST test byte.
// enable = 0, POST test is Disabled
// enable = 1, POST test is Enabled
// see data sheet for further details
int __stdcall as_75sd1_setWatchdog(HANDLE cardHandle, int watchdog);
// Sets the watchdog register to watchdog
// watchdog = 0 to 65535
// Must wait 100 uSec between SetWatchdog and getWatchDog to allow processor to invert code
int __stdcall as_75sd1_getWatchdog(HANDLE cardHandle, int * watchdog);
// Reads back the watchdog register to watchdog
// watchdog = 0 to 65535
// Must wait 100 uSec between SetWatchdog and getWatchDog to allow processor to invert code
int __stdcall as_75sd1_CheckWatchdog(HANDLE cardHandle, int watchdog);
// Checks the watchdog register for the inverted watchdog code.
// watchdog = 0 to 65535, and is the code used with setWatchDog
// Returns AS_SUCCESS if register has inverted watchdog word
// if watchdog = 0 checks for 65535
// Returns WATCHDOG_ERROR if register does not contain the inverted watchdog word
// Must wait 100 uSec between SetWatchdog and CheckWatchDog to allow processor to invert code
/********** INFO ***********/
int __stdcall as_75sd1_getPartNumber(HANDLE cardHandle, int * partNumber);
// Reads back the Part Number word from the device
int __stdcall as_75sd1_getSerialNumber(HANDLE cardHandle, int * serialNumber);
// Reads back the Serial Number word from the device
int __stdcall as_75sd1_getDateCode(HANDLE cardHandle, int * dateCoder);
// Reads back the Date Code word from the device
int __stdcall as_75sd1_getRevLevel(HANDLE cardHandle, int * revLevel);
// Reads back the PC Board Rev level word from the device
int __stdcall as_75sd1_getDSPRevLevel(HANDLE cardHandle, int * dspRevLevel);
// Reads back the DSP Software Rev level word from the device
int __stdcall as_75sd1_getIntFPGARevLevel(HANDLE cardHandle, int * intFpgaRevLevel);
// Reads back the Interface FPGA Rev level word from the device
int __stdcall as_75sd1_getFPGARevLevel(HANDLE cardHandle, int * fpgaRevLevel);
// Reads back the FPGA Rev level word from the device
double __stdcall as_75sd1_getDllVersion(void);
// returns the DLL Version Number
/********** INTERRUPTS ***********/
int __stdcall as_75sd1_setInterruptEn(HANDLE cardHandle, int interruptEn);
// Sets the Interrupt Enable word
// D0 Enables Signal Loss Interrupt
// D1 Enables Reference Loss Interrupt
// D2 Enables Angle Delta Interrupt
// D3 Enables Test Fail Interrupt
int __stdcall as_75sd1_getInterruptEn(HANDLE cardHandle, int * interruptEn);
// Reads back the Interrupt Enable word from the device
// D0 Enables Signal Loss Interrupt
// D1 Enables Reference Loss Interrupt
// D2 Enables Angle Delta Interrupt
// D3 Enables Test Fail Interrupt
int __stdcall as_75sd1_getInterruptStat(HANDLE cardHandle, int * interruptStat);
// Reads back the Interrupt Status word from the device
// D0 Indicates Signal Loss Interrupt
// D1 Indicates Reference Loss Interrupt
// D2 Indicates Angle Delta Interrupt
// D3 Indicates Test Fail Interrupt
int __stdcall as_75sd1_InterruptHook(HANDLE cardHandle,
void(*IntRoutine)(HANDLE cardHandle,USHORT IntStatus));
// Function for hooking the interrupt service routine
// The second argument is passing in a pointer to a function of the interrupt routine
/********** MISC ***********/
int __stdcall as_75sd1_save (HANDLE cardHandle);
// sets the Save word to 0x5555, and then checks that the device cleared the save word,
// indicating the device performed the save function, see datasheet for details
// returns 0 if save was successful
int __stdcall as_75sd1_restoreFactorySettings (HANDLE cardHandle);
// sets the Save word to 0xAAAA, and then checks that the device cleared the save word,
// indicating the device performed the restore Factory settings function, see datasheet
// for details
// returns 0 if restore was successful
int __stdcall as_75sd1_softReset (HANDLE cardHandle);
// Sets the SoftReset register to 1 then after a delay back to 0
int __stdcall as_75sd1_setRegister (HANDLE cardHandle, int page, int offset, int data);
// This is a low level function to set a word in the device's memory, see datasheet for
// details
int __stdcall as_75sd1_getRegister (HANDLE cardHandle, int page, int offset, int * data);
// This is a low level function to read back a word from the device's memory, see datasheet for details
/********** VISUAL BASIC INTERRUPT FUNCTIONS ***********/
int __stdcall as_75sd1_setUpInterrupt(HANDLE cardHandle);
// Hooks the interrupt function "Interrupt_Indicator" in the DLL
// This interrupt routine saves a local copy of the Interrupt status register in the DLL
// The function as_75sd1_getInterIndicator is used to read the local copy of the Interrupt
// status register to determine if interrupt has occurred.
// NOTE: It's recommanded that the user write their own interrupt service routine and
// use the function "as_75sd1_InterruptHook" in the DLL to hook it in
// Please read comment on the "as_75sd1_InterruptHook" function for more explaination
int __stdcall as_75sd1_getInterIndicator(void);
// Get indicator
// Reading clears the local copy of interrupt status register
#if defined(__cplusplus) || defined(__cplusplus__)
}
#endif
#endif
/*
RETURN VALUE - All functions that return an integer, indicate SUCCESS or FAILURE. 0=SUCCESS;
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -