Herunterladen Inhalt Inhalt Diese Seite drucken

HEIDENHAIN IK 320 Benutzerhandbuch Seite 46

Vmebus-zählerkarte
Inhaltsverzeichnis

Werbung

static unsigned char staucDIP_Switch_II = DIP_SWITCH_SII;
static unsigned char staucAxis1WasRead, staucAxis2WasRead;
static unsigned char staucAxisComWasRead;
static unsigned char staucREF1Crossed, staucREF2Crossed;
static unsigned char staucInterruptFinished;
static double
static double
extern unsigned char extucErrorCode, extucMessage;
/*--------------------------------------------------------------------
void (interrupt far *pOriginalInterruptVector)();
/*--------------------------------------------------------------------
void interrupt far NewInterruptRoutine(void)
{
}//End NewInterruptRoutine
/*--------------------------------------------------------------------
void RestoreOldInterruptVector(void)
{
}//End RestoreOldInterruptVector
/*--------------------------------------------------------------------
void Read_IK_InterruptStatus(unsigned char ucDIP_Switch_II)
{
!#Á
pOriginalInterruptVector
Specifies a vector for the original interrupt.
------------------------------------------------------------------*/
NewInterruptRoutine
This function specifies the interrupt routine for IK interrupt
------------------------------------------------------------------*/
unsigned short usAddress;
outp(INTC2A1,inp(INTC2A1) | ~INT_MASK);
//Reset DOS-interrupt line
outp(INTC2A0,EOI);
outp(INTC1A0,EOI);
_enable();
usAddress = CALCULATE_IK_ADDRESS(staucDIP_Switch_II);
SWITCH_VME_TO_A24_ADDRESS_SPACE(staucDIP_Switch_II);
Read_IK_InterruptStatus(staucDIP_Switch_II);
Evaluate_IK_InterruptStatus(staucDIP_Switch_II);
//ROTEC specific code: Reset VME interrupt line
int_eoi(IACK3);
outp(INTC2A1,inp(INTC2A1) & INT_MASK);
usAddress = CALCULATE_IK_ADDRESS(staucDIP_Switch_II);
outport (usAddress + INTSTAT, 0x0000);
staucInterruptFinished = 1;
RestoreOldInterruptVector
This function restores the old interrupt vector.
------------------------------------------------------------------*/
//Disable hardware interrupts
_disable();
//Restore original interrupt vector
_dos_setvect(INT_NR,pOriginalInterruptVector);
//Enable hardware interrupts
_enable();
Read_IK_InterruptStatus
This function reads the interrupt status word of the IK.
------------------------------------------------------------------*/
short usAddress;
stadPositionValue1, stadPositionValue2;
stadPositionValueCom;
//Enable DOS interrupt
//Disable IRQ15
//enable IRQ15
//Interrupt finished

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis