===================================================================== = API-DIO(WDM) Additional Sample Programs = = General-purpose I/O with I/O direction setting = = Ver.1.30 = = 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 development environment for API-DIO(WDM). Please use it as a reference when using the API-DIO(WDM) development environment. - Specification =================== [Supported driver] API-DIO(WDM) [Supported development languages] Microsoft Visual C++ (MFC) (2015, 2017, 2019, 2022) Microsoft Visual C# (2015, 2017, 2019, 2022) Microsoft Visual Basic .NET (2015, 2017, 2019, 2022) Python (3.12) *Samples for Python are provided in CUI version. Samples for other development languages are provided in GUI version. - 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 and devices equipped with the bus master function to the "Simple I/O sample [SimpleIO]" provided as standard. - Usage for GUI version =================== 1. Initialization - Enter the name set in the Device Manager in the Device Name, and click the [DioInit] button. 2. I/O direction setting - To set the 8255 mode, enter the setting value and press the [DioSet8255Mode] button. - Enter the 8255 chip number and press the [DioGet8255Mode] button to get the set value. - To set the I/O direction, enter the setting value and press the [DioDmSetDirection] button. - You can get the setting value by pressing the [DioDmGetDirection] button. - To set the I/O direction, enter the setting value and press the [DioSetIoDirection] button. - You can get the setting value by pressing the [DioGetIoDirection] button. 3. Input/Output - To perform an input test, execute DioInpByte (1 Port Input) and DioInpBit (1 Bit Input). - To test the output, execute DioOutByte (1 Port Output) and DioOutBit (1 Bit Output). - Execute DioEchoBackByte and DioEchoBackBit to read the current output value. 4. End Processing - Click the [DioExit] button to end the use of the device. - Click the [Exit] button to exit the program. - Usage for CUI version =================== 1. Initialization - Execute the sample to specify the device name. 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 History ======================= Ver.1.30 (Web Release 2024.09) ---------------------------------------- - Add support development language Support language: Python 3.12 Ver.1.20 (Web Release 2024.05) ---------------------------------------- - Add support application framework Support application framework: .NET8 Ver.1.10 (Web Release 2022.09) ---------------------------------------- - Add support development language Support language: Microsoft Visual Basic .NET 2022 Microsoft Visual C# 2022 Microsoft Visual C++ (MFC) 2022 - End of support for the following development languages Microsoft Visual Basic .NET 2013 Microsoft Visual C# 2013 Microsoft Visual C++ (MFC) 2013 Ver.1.00 (Web Release 2021.06) ---------------------------------------- - First release