===================================================================== = API-CNT(LNX) Additional Sample Programs = = Test Pulse = = 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-CNT(LNX). Please use it as a reference when using the API-CNT(LNX) development environment. - Specification =========== [Supported driver] API-CNT(LNX) [Supported development languages] gcc (C, C++) Python (3.12) [Supported devices] Devices with high-performance counter - About this sample program =========== This is a sample program that additionally implements the test pulse control function to the "High-performance Counter Sample [counter]" provided as standard. - Glossary =========== [Test pulse] - By using the test pulse, count operation can be checked without preparing an external device. - The output frequency is 100kHz fixed. Output 2-phase pulses to all channels. - The test pulse can be counted by turning on the test pulse during a count. - Depending on the device specifications, external output destination may not be selected. - Usage =========== 1. Initialization - Select the command [1 : CntInit] to specify the device name. 2. Set counter mode - Select the command [2 : Counter Mode] to specify the counter mode. 3. Set notification - Select the command [3 : Notification] to configure event notification settings. 4. Set hardware event - Select the command [4 : Event Settings] to configure hardware event settings. Here, the data can be actually output by setting the channel number and output data when general output is selected for event output signal. 5. Count control - Select the command [5 : CntStartCount] to start count. - Select the command [6 : CntReadCount] to get the count value of each channel. - Select the command [7 : CntReadStatusEx] to get the status of each channel. - Select the command [8 : CntPreset] to preset the count value. - Select the command [9 : CntZeroClearCount] to clear the count value to 0. - Select the command [10 : CntStopCount] to stop count. 6. Test pulse - Select the command [11 : Test Pulse ON] to output test pulse after specifying the test pulse output destination. - Select the command [12 : Test Pulse OFF] to stop the test pulse at the specified test pulse output destination. 7. Exit handling - Select the command [13 : CntExit] to perform the exit handling of device. 8. End Program - Select the command [q : Quit] to exit the program. - Version History ======================= Ver.1.00 (Web Release 2024.09) ---------------------------------------- - First release