Set Level Comparison Start Condition

Overview of Level Comparison

Level comparison conditions are set with two conditions, level and direction.

The above figure shows the condition establishment in the rising direction. The start condition is satisfied when the analog signal of the specified channel passed the comparison level in the rising direction. The conversion data from the black dots portion is stored in memory.

The above figure shows the condition establishment in the falling direction. The start condition is satisfied when the analog signal of the specified channel passed the comparison level in the falling direction. The conversion data from the black dots portion is stored in memory.

If both directions are set for the direction of level comparison, the start condition is satisfied when passing the comparison level in both the rising and falling directions.

Set Level Comparison Start Condition

When using level comparison start as the conversion start condition, set the level comparison start condition.
Use function AioSetAiStartLevel to set the level comparison start condition.

Ret = AioSetAiStartLevel ( Id , AiChannel , AiStartLevel , AiDirection )

In AiChannel, specify the channel that performs the level comparison.

In AiStartLevel, set the data for level comparison in binary value from the following range.
The values that can be set depend on the device.

Device with 12 bit resolution

0 to 4095

Device with 16 bit resolution

0 to 65535

In AiDirection, set the direction of level comparison from the following range.

0

Both Edges

1

Rising Edge

2

Falling Edge