WriteWaveformPulseTrain
Requests a series of pulses be sent out a specified discrete output line, and produces a Waveform data structure containing the pulse train data.
- This function is enabled only when the vision system is Online.
- When transitioning between Online and Offline states, any currently executing Waveform function will be stopped immediately, and all queued waveforms will be dropped. The Waveforms will only begin when the In-Sight vision system is Online.
- After the function is triggered to begin the Waveform, the Waveform will continue in the background until it completes its cycle.
- Only one Waveform may be generated at a time, regardless of the number of WriteWaveformPulseTrain functions in the job, or the number of output lines dedicated to the function(s).
WriteWaveformPulseTrain Inputs
Syntax: WriteWaveformPulseTrain(Event,Output,Period,Duty Cycle,Pulse Polarity,Queuing,Idle Periods,Number of Pulses)
Parameter | Description | ||||
---|---|---|---|---|---|
Specifies the event on which to begin the waveform. This parameter must be a reference to one of the following:
Note: When the default
Event reference is deleted, the value is replaced by a checkbox. If another
cell is referenced as an event, the function will conditionally run based
on the referenced cell. If the checkbox is enabled, the function will
always run when any inputs to the function are updated.
|
|||||
Specifies the output line to be used. Any discrete output line may be used, e.g. high-speed, an In-Sight vision system's user-configurable LEDs or additional I/O module outputs (if connected). Note:
|
|||||
Specifies the total amount of time (in milliseconds) from the start of one pulse to the start of the next pulse (10 to 10,000; default = 1000). |
|||||
Duty Cycle |
Specifies the percent of time (a percentage of the Period parameter) that the pulse spends in the active state (0 to 100%; default = 50). Note: The actual duty cycle will be the closest possible, given the limitations of the In-Sight vision system and the I/O module used. The Duty Cycle will be less accurate if the Period parameter is set near its minimum value.
|
||||
Pulse Polarity |
Specifies the polarity of the pulse.
|
||||
Queuing |
Specifies whether or not Waveform queuing is enabled or disabled.
|
||||
Specifies the number of periods (0 to 10000; default = 3) that the function waits in the idle state after the Waveform has completed before beginning the next Waveform. | |||||
Number of Pulses | Specifies the total number of pulses (1 to 10000; default = 10) that constitute the pulse train. |
WriteWaveformPulseTrain Outputs
Returns |
A Waveform data structure containing the pulse train data, or #ERR if either input parameter is invalid. |
WriteWaveformPulseTrain Examples
The following figures illustrate the parameters of the WriteWaveformPulseTrainfunction. In each example, there are three (3) pulses and two (2) idle periods.
-
WriteWaveformPulseTrain Function with Pulse Polarity set to High:
-
WriteWaveformPulseTrain Function with Pulse Polarity set to Low: