wiki:Docs/Prog/Manual/ApplicationLibraries/lib825ev/IO/StartDIOPulse

Version 1 (modified by Don Wilson, 12 years ago) ( diff )

--

StartDIOPulse

Start a digital output pulse for the main board or a DIO option card.

int StartDIOPulse(int bd, int out, uint8 cond, int count, float pulseWidth, float dutyCycle);
int StartDIOPulse(int bd, int out, float dutyCycle);

Parameters

  • bd - number of digital output card (main board output is not supported for pulse)
  • output - output number (outputs 1 - 4) only are supported
  • cond - true = start with output on, false = start with output off
  • count - count of pulses to output, 0 = continuous until StopDIOPulse
  • pulseWidth = size of the cycle in seconds
  • dutyCycle = duty cycle .5 = 50 percent duty cycle

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(StartDIOPulse(1, 1, true, 10, 2.0, 0.5) == OK)
    DisplayText(0, 0, "10 pulses 1 sec on 1 sec off");
if(StartDIOPulse(1, 4, 0.7) == OK)
    DisplayText(0, 0, "Card 1 Output 4 70 pct");

See Also

Note: See TracWiki for help on using the wiki.