===================================================================== = API-DIO(LNX) Additional Sample Program = = General-purpose Input/Output Sample with I/O Direction Setting = = Ver.1.10 = = CONTEC Co., Ltd. = ===================================================================== Introduction ================= This package is an additional sample program to show a usage example that is not presented in the sample program provided in the API-DIO(LNX) development environment. Please use it as a reference when using the API-DIO(LNX) development environment. Specification ================= [Supported driver] API-DIO(LNX) [Supported development languages] gcc (C, C++) Python (3.12) About this sample ================= This is a sample program that additionally implements the I/O switching function for devices equipped with the i8255 mode 0 equivalent function, devices equipped with the bus master function and other devices that support I/O direction setting to the "Input Output Sample [inout]" provided as standard. Usage ================= 1. Initialization - Specify the device name set in the config as a parameter when executing the sample. If parameter is not set, "DIO000" is used. Example) ./inout_direction DIO001 2. I/O direction setting - To set the 8255 mode, enter 's8' while waiting for command input, then enter the setting value. - To get the setting value of 8255 mode, enter 'g8' while waiting for command input, then enter the 8255 chip number. - For the values that can be set, please refer to the DioSet8255Mode item in the Function Reference of HELP. - To set the input/output direction, enter 'sd' while waiting for command input, then enter the setting value. - To get the input/output direction, enter 'gd' while waiting for command input. - For the values that can be set, please refer to the DioDmSetDirection item in the Function Reference of HELP. - To set the input/output direction, enter 'si' while waiting for command input, then enter the setting value. - To get the input/output direction, enter 'gi' while waiting for command input. - For the values that can be set, please refer to the DioSetIoDirection item in the Function Reference of HELP. 3. Input and Output - To test the input, execute 'ip' or 'ib' while waiting for command input. - To test the output, execute 'op' or 'ob' while waiting for command input. - To get the current output value, execute 'ep' or 'eb' while waiting for command input. 4. End Processing - If you enter 'q' while waiting for command input, the program will exit. Version up history ======================= Ver.1.10 (Web Release 2024.09) ---------------------------------------- - Add support development language Support language: Python 3.12 Ver.1.00 (Web Release 2023.07) ---------------------------------------- - First release