02.00 DIO_Support - advantech-edge-ai/MIC-AI GitHub Wiki

2SpacerI/O Function Support

To facilitate the testing of Digital Input and Digital Output (DI/DO) functionality, Advantech provides dedicated test packages for various MIC-AI models. This section describes the general contents and structure you can expect to find within these packages.

2.1SpacerLocating the Correct Package

Each test package is a compressed archive (e.g., .tar.bz2). The filename is designed to be informative, typically including the product model and the compatible Jetpack version it is intended for. Always ensure you download the package that matches your specific hardware and software environment.

After decompressing the archive, you will find a folder containing the necessary components to build the testing tool. The primary content you will find is:

  • C Source Code File: The core of the package is a source file written in the C programming language. This file contains all the code required to build the command-line test utility.

2.2SpacerThe Test Utility

Compiling the C source file will generate a command-line test utility (often named diotest or similar). This binary program is the primary tool for conducting the hardware test.

  • Purpose: The utility is designed to let you directly interact with the hardware by setting the status of Digital Output channels and reading the live status of Digital Input channels.
  • General Usage:
    • The program typically must be run with root permissions (e.g., sudo ./<program_name>).
    • You can usually view a list of available commands and their syntax by running the program without any arguments.
    • The commands will allow you to perform the two key functions: setting an output channel to a specific state and getting the current state of an input channel.

2.3SpacerThe Guide is Key

These test packages are not meant to be used alone; they are companion tools for a detailed guide. For a complete example, you should always refer to the corresponding instruction document, such as "How to test DI and DO on MIC-713(S).pdf".

This type of PDF guide provides the essential context that you will need, including:

  • Step-by-step instructions for the entire testing procedure.
  • Important hardware connection diagrams and design notes.
  • Specific command-line examples and illustrations of the expected results.

2.4SpacerSupport Models

  • MIC-713(S)

⬆️ Top

⚠️ **GitHub.com Fallback** ⚠️