Technical description Chapter 9
PA 3110
57
b) Example in C
void main (void)
{
unsigned char b_BoardHandle;
unsigned char b_Channel
[8];
unsigned int
ui_WriteValueArray
[8];
b_Channel[0] =
0
; ui_WriteValueArray [0] = 0;
b_Channel[1] =
1
; ui_WriteValueArray [1] = 2047;
b_Channel[2] =
2
; ui_WriteValueArray [2] = 4095;
b_Channel[3] =
3
; ui_WriteValueArray [3] = 0;
b_Channel[4] =
4
; ui_WriteValueArray [4] = 2047;
b_Channel[5] =
5
; ui_WriteValueArray [5] = 4095;
b_Channel[6] =
6
; ui_WriteValueArray [6] = 0;
b_Channel[7] =
7
; ui_WriteValueArray [7] = 2047;
if (Initialisation (&b_BoardHandle) == 0)
{
if (i_PA3110_WriteMoreAnalogValue
(b_BoardHandle, 1, 8,ui_WriteValueArray)==0)
{
printf (“Write test OK“);
}
else
{
printf (“Write value error“);
}
i_PA3110_CloseBoardHandle (b_BoardHandle);
}
else
{
printf (“Initialisation error“);
}
}
Summary of Contents for ADDIALOG PA 3110
Page 35: ......