« Close

Datasheets and User Guides

App Notes

Software & Driver

 

4.26 - PulseOutStart

Requires firmware V1.1 or higher. PulseOutStart and PulseOutFinish are used as an alternative to PulseOut (See PulseOut for more information). PulseOutStart starts the pulse output and returns without waiting for the finish. PulseOutFinish waits for the LabJack’s response which signifies the end of the pulse output.

Execution time for this function about 10 milliseconds.

If anything besides PulseOutFinish is called after PulseOutStart, the pulse output will be terminated and the LabJack will execute the new command. Calling PulseOutStart repeatedly, before the previous pulse output has finished, provides a pretty good approximation of continuous pulse output.

Note that due to boot-up tests on the LabJack U12, if PulseOutStart is the first command sent to the LabJack after reset or power-up, there will be no response for PulseOutFinish. In practice, even if no precautions were taken, this would probably never happen, since before calling PulseOutStart, a call is needed to set the desired D lines to output.

Also note that PulseOutFinish must be called before the LabJack completes the pulse output to read the response. If PulseOutFinish is not called until after the LabJack sends it’s response, the function will never receive the response and will timeout.

Declaration:


long PulseOutStart (    long *idnum,
                        long demo,
                        long lowFirst,
                        long bitSelect,
                        long numPulses,
                        long timeB1,
                        long timeC1,
                        long timeB2,
                        long timeC2)

Parameter Description:
Returns: LabJack errorcodes or 0 for no error.
Inputs:

  • *idnum – Local ID, serial number, or -1 for first found.
  • demo – Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without a LabJack.
  • lowFirst – If >0, each line is set low then high, otherwise the lines are set high then low.
  • bitSelect – Set bits 0 to 7 to enable pulsing on each of D0-D7 (0-255).
  • numPulses – Number of pulses for all lines (1-32767).
  • timeB1 – B value for first half cycle (1-255).
  • timeC1 – C value for first half cycle (1-255).
  • timeB2 – B value for second half cycle (1-255).
  • timeC2 – C value for second half cycle (1-255).

Outputs:

  • *idnum – Returns the local ID or –1 if no LabJack is found.

1 comments

Hi,

I am trying to use the 'pulseOutStart' command in Python. I have a grasp of how to determine B and C values, however, I do not fully understand how to select the digital channel that I want to control.

Also, can you provide some more detail around Number of pulses?

Thanks