===================================================================== = API-AIO(LNX) Additional Sample Programs = = Delay Sampling = = Ver.1.00 = = CONTEC Co., Ltd. = ===================================================================== - Introduction ======================= This package is the additional sample programs to show usage examples that are not presented in the sample programs of the development environment for API-AIO(LNX). Please use it as a reference when using the API-AIO(LNX) development environment. - Specification ======================= [Supported driver] API-AIO(LNX) [Supported development languages] gcc (C, C++) Python (3.12) [Supported devices] Devices equipped with the delay sampling function (AioSetAiStopDelayTimes) - About this sample ======================= This is a sample program that sets delay sampling and performs sampling. In this sample program, delay sampling times can be specified in any value. ================================================================================ Sampling conditions |Setting sampling conditions |How to change * ================================================================================ Input method |Single-end input |Source code Input range |+/- 10[V] |Source code Memory type |RING |Source code (Change notice) Clock type |Internal clock |Source code Sampling clock |1000[usec] |Source code Start condition |Software |Source code Stop condition |Level comparison |Source code (Change notice) Level comparison CH No. |0 |Source code (Change notice) Level comparison voltage |Any value |Console Level comparison direction|Any value |Console Number of channels |1 |Source code Event factor |Event that device operation end|Source code (Change notice) Delay sampling times |Any value |Console ================================================================================ * How to change Source code : Conditions can be changed in the source code. Source code (Change notice) : Conditions can be changed in the source code, but please note that it may not work. Console : Any value can be set from the console. - Glossary ======================= [Delay sampling] Delay sampling is the sampling which is performed after the sampling stop condition is satisfied. From the sampling stop condition other than forced stop by function AioStopAi is satisfied, the sampling for the delay sampling times is performed. If the delay sampling times is set to 0, delay sampling will not be performed. [Level comparison] Level comparison is a condition that can be set to start or stop. Level comparison has two settings, level and direction. Level is the voltage/current or binary value to compare. Direction is the direction passed the level. Example : When level is set to 5[V] and direction is set to rising, the condition is achieved when the voltage value changes from 4[V] to 6[V], and the condition is not achieved when the voltage value changes from 6[V] to 4[V]. [RING] RING is one of the memory types. Sampling data is sequentially written to memory, when the upper limit of memory is exceeded, the old sampling data will be overwritten. When acquiring sampling data, the specified number of data is acquired from the latest data. Since the acquired sampling data will not be lost, the same sampling data can be acquired as many times as necessary. It is not possible to acquire sampling data during sampling. Example : If the sampling data is 1000 data and 500 data is acquired, get the data from 501st to 1000th. - Usage ======================= 1. Initialization - Select the command [1 : Device Init] to specify the device name. - Sampling conditions are set in the [Device Init]. If you want to change the sampling conditions, change the value of the setting you want to change. 2. Stop Level Comparison Setting - Select the command [2 : Stop Level Comparison Setting] to specify the level comparison condition. 3. Delay Sampling Times Setting - Select the command [3 : Delay Sampling Times Setting] to specify the delay sampling times. 4. Sampling Start - Select the command [4 : Sampling Start] to start sampling. 5. Sampling Complete - When the level comparison condition is satisfied, sampling ends and delay sampling is performed. - After the delay sampling is completed, the sampling data and the delay sampling data will be output to a file. - If sampling was stop with the command [5 : Sampling Stop], delay sampling will not be performed. 6. Exit handling of device - Select the command [6 : Device Exit] to perform the exit handling of device. - Version History ======================= Ver.1.00 (Web Release 2024.09) ---------------------------------------- - First release