<< Previous | Next >>

servo_read_table

int servo_read_table(int which, word entry, word nent, int data[12]);

Description

Read one or more table entries, returning average, max and min of all samples in the specified group starting at entry, for nent samples.

Parameters

which
Servo (0 or 1)

entry
First sample number

nent
Number of entries starting at "entry"

data[12]
Returned data: 3 sets of 4 contiguous entries. The first set (data[0]..data[3]) contains the average; the second set (data[4]..data[7]) contains the maximum; and the last set (data[8]..data[11]) contains the minimum. The elements of each set correspond with the table data: the first element is the instantaneous error; the second is the error integral; the third is the error rate; and the 4th is the PWM output. These may be customized to have different meanings.

Return Value

0: OK
1: no such entry or entries.

Library

SERVO.LIB

See Also

servo_alloc_table, servo_graph, servo_stats_reset


Dynamic C Functions << Previous | Next >> rabbit.com