Manual Number: 00650-010-6
Page 25
void sinecurve()
{
int
i;
double
rads,sine;
if (counts == 0) return;
/*no point -- no curve */
clrscr();
printf(“Calculating sine wave points....”);
rads = (double) 2 * PI / (counts - 1);
/* rad per count */
for(i = 0;i <counts;i++)
{
sine = (sin(rads * i) + 1.0) * 32767;
progstruct[i] = (unsigned) sine;
}
clrscr();
printf(“Generating sine wave, press any key to stop....”);
sendtoport();
} /* end sinecurve */
Function:
trianglecurve( ) - local routine
Purpose:
Calculate the points to create a trinagle wave
Input:
None
Calls:
None
Output:
None
void trianglecurve(void)
{
int
i;
double
slope,temp;
if (counts == 0) return;
/* no counts -- no curve */
clrscr();
Printf(“Calculating triangle wave points....”);
slope = 65535.0 / counts * 2.0;
/* waveform slope */
for(i=0;i <counts/2;i++)
{
temp = slope * i;
progstruct[i] = (int)temp;
Содержание AOB8/16
Страница 1: ...Model AOB8 16 AOB16 16 Product Manual MANUAL NUMBER 00650 010 6C...
Страница 3: ...Page iv This page intentionally left blank...
Страница 7: ...Page viii This page intentionally left blank...
Страница 15: ...Manual Number 00650 010 6 Page 6 AOB8 16 AOB16 16 Manual Figure 3 1 Option Selection Map...
Страница 21: ...Manual Number 00650 010 6 Page 12 AOB8 16 AOB16 16 Manual This page intentionally left blank...
Страница 25: ...Manual Number 00650 010 6 Page 16 AOB8 16 AOB16 16 Manual This page intentionally left blank...
Страница 27: ...Manual Number 00650 010 6 Page 18 AOB8 16 AOB16 16 Manual This page intentionally left blank...
Страница 31: ...Manual Number 00650 010 6 Page 22 AOB8 16 AOB16 16 Manual This page intentionally left blank...
Страница 37: ...Manual Number 00650 010 6 Page 28 AOB8 16 AOB16 16 Manual This page intentionally left blank...