wiki:Docs/Prog/Manual/ApplicationLibraries/lib825ev/Weight/StartRepeatMulti

Version 2 (modified by Don Wilson, 13 years ago) ( diff )

--

StartRepeatIO

Start repeating communications main board to report weights and I/O status.

int StartRepeatMulti(uint32 interval, struct mnbd_multi_rep_counters_struct& counters);
int StartRepeatMulti(uint32 interval, struct mnbd_multi_rep_counters_struct* counters = NULL);

Parameters

  • interval - update interval in milliseconds
  • counters - structure to define any DIO counters to be reported

Return Value

  • Returns the result - OK success

Remarks

The main board or option card must already be opened by calling OpenMnBd first. The call does a wait for acknowledgement. If the application is using main board communication events these events may be called during the wait for acknowledgement.

Examples

if(StartRepeatMulti(100) == OK)
    DisplayText(0, 0, "Wt and I/O 10 times per second");
int bd = 1;
int inp = 8;

SetDIOCounter(bd, inp, dioSetCount, 0, WAIT_ACK);
SetDIOCounter(bd, inp, dioSetPrescaler, 1, WAIT_ACK);
SetDIOCounter(bd, inp, dioSetCountUp, 0, WAIT_ACK);
SetDIOCounter(bd, inp, dioSetCountLowToHigh, 0, WAIT_ACK);
SetDIOCounter(bd, inp, dioEnableCounter, 0, WAIT_ACK);

struct mnbd_multi_rep_counters_struct counters;
memset(&counters, 0, sizeof(counters));

counters.cnt1_bd = bd;
counters.cnt1_input = inp;

if(StartRepeatMulti(100, counters) == OK)
    DisplayText(0, 0, "Wt, I/O, cnt 10 times per second");

See Also

Note: See TracWiki for help on using the wiki.