C) Example In C For Windows 3.1X - Addi-Data ADDIALOG PA 3110 Technical Description

Analog input and output channels
Table of Contents

Advertisement

Technical description

c) Example in C for Windows 3.1x

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_SetBoardIntRoutineWin16(b_BoardHandle, v_InterruptRoutine) == 0)
{
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)
{
while (b_ReceiveInterrupt == 0);
b_ReceiveInterrupt = 0;
printf("\n Acquisition 1 %u %u %u %u %u %u %u %u \n %u %u %u %u %u %u %u %u",
i_PA3110_StopAnalogInputAcquisition(b_BoardHandle);
i_PA3110_ClearAnalogInputAcquisition(b_BoardHandle);
}
else
printf("\n Start acquisition error");
}
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
ui_SaveArray[0],ui_SaveArray[1],ui_SaveArray[2],ui_SaveArray[3],
ui_SaveArray[4],ui_SaveArray[5],ui_SaveArray[6],ui_SaveArray[7],
ui_SaveArray[8],ui_SaveArray[9],ui_SaveArray[10],ui_SaveArray[11],
ui_SaveArray[12],ui_SaveArray[13],ui_SaveArray[14],
ui_SaveArray[15]);
PA3110_SIMPLE_MODUS, 1500,0,16,
PA3110_DMA_USED,PA3110_SINGLE) == 0)
PA 3110
51

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

Subscribe to Our Youtube Channel

Table of Contents