Overview
Position synchronous output (PSO) functions are used to trigger an output signal when a particular condition is satisfied.
A position synchronous output channel consists of four components: the source, the comparator, the data points, and the output. The relation between these components is expressed in the following diagram:

The source is compared against one or more data points using the comparator. If any of the comparisons yield true, the output is set to 1. Otherwise, the output is set to 0. The output can be set to any I/O output bit or user memory bit.
If the comparison yields true, the index of the data point that causes the comparison to yield true becomes the active index. If multiple data points cause the comparison to yield true, the smallest index among them becomes the active index. If the SetPSOIntervalData function is used to set the data points and multiple data points cause the comparison to yield true, the data point that is closest to the current position becomes the active index. The active index can be obtained by calling the GetPSOStatus and reading the value of the returned activeDataIndex status.
Up to maxPsoChannel PSO channels can be defined. Each PSO channel operates independently of all other channels.
The current status of a PSO channel is obtained with the GetPSOStatus function. The status is returned with the PSOStatus class.