D) Example In C For Windows Nt / 95 (Asynchronous Mode) - Addi-Data ADDIALOG PA 3110 Technical Description

Analog input and output channels
Table of Contents

Advertisement

Technical description

d) Example in C for Windows NT / 95 (asynchronous mode)

void main(void)
{
int i_Cpt;
unsigned char b_Gain [4];
unsigned char b_Polar [4];
unsigned char b_Channel [4];
unsigned char b_BoardHandle;
if (Initialisation(&b_BoardHandle) == 0)
{
if (i_PA3110_SetBoardIntRoutineWin32(b_BoardHandle, ASYNCHRONOUS_MODE,
{
b_Channel[0] = PA3110_CHANNEL_0;
b_Gain
[0] = PA3110_1_GAIN;
b_Polar
[0] = PA3110_UNIPOLAR;
b_Channel[1] = PA3110_CHANNEL_1;
b_Gain
[1] = PA3110_1_GAIN;
b_Polar
[1] = PA3110_UNIPOLAR;
b_Channel[2] = PA3110_CHANNEL_2;
b_Gain
[2] = PA3110_1_GAIN;
b_Polar
[2] = PA3110_UNIPOLAR;
b_Channel[3] = PA3110_CHANNEL_3;
b_Gain
[3] = PA3110_1_GAIN;
b_Polar
[3] = PA3110_UNIPOLAR;
if (i_PA3110_InitAnalogInputAcquisition (b_BoardHandle,4,b_Channel,b_Gain,b_Polar,
{
b_ReceiveInterrupt = 0;
if (i_PA3110_StartAnalogInputAcquisition (b_BoardHandle) == 0)
{
for (i_Cpt=0;i_Cpt<4;i_Cpt++)
{
while (b_ReceiveInterrupt == 0);
b_ReceiveInterrupt = 0;
printf("\n Acquisition 1 %u %u %u %u",ui_SaveArray[0], ui_SaveArray[1],
}
i_PA3110_StopAnalogInputAcquisition(b_BoardHandle);
}
else
printf("\n Start acquisition error");
i_PA3110_ClearAnalogInputAcquisition(b_BoardHandle);
}
else
printf("\n Acquisition initialisation error");
i_PA3110_ResetBoardIntRoutine(b_BoardHandle);
}
else
printf("\n Interrupt routine initialisation error");
i_PA3110_CloseBoardHandle(b_BoardHandle);
}
else
printf("\n Initialisation error");
}
Chapter 9
0,NULL,v_InterruptRoutine) == 0)
PA3110_SIMPLE_MODUS, 1500,
0,4,PA3110_DMA_NOT_USED,PA3110_SINGLE)==0)
ui_SaveArray[2], ui_SaveArray[3]);
PA 3110
47

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ADDIALOG PA 3110 and is the answer not in the manual?

Questions and answers

Table of Contents