Easyi3C is a leading supplier of embedded system tools that simplify the development and debugging of various communication protocols. The company offers a range of products designed to help engineers and developers use I3C/I2C , USB and MIPI, JEDEC, MCTP and other protocols more efficiently.
A customer recently asked us whether it is possible to control the Tower I3C Host Adapter in LabVIEW. To answer this question, we created this blog post.
This section mainly refers to the NI official websitehttps://www.ni.com/docs/zh-CN/bundle/labview-api-ref/page/menus/categories/computer/python-node-mnu.htmlUsing Python nodes is mainly divided into three steps:
Opens a Python session for a specific Python version. Python sessions are required when configuring multiple Python nodes to run with specific Python versions and in the same process.
Input/Output
|
Call Python functions directly.
The Python node is an expandable function that displays the data types of its wired inputs and outputs. You can configure the Python node to specify the Python session, module path, and function name.
The Python Node is not supported on Real-Time or FPGA targets.
Input/Output
|
Close the Python session.
Input/Output
|
With the previous theoretical preparation, we can use the Python node function of LabVIEW to control our Tower I3C Host Adapter.
Refer to the Userguide of Tower I3C Host Adapter. The Python version on our computer is 3.12. Then select the corresponding version of whl to install. The installation steps are as follows:
Make sure the correct version is installed.
Note: The whl package here is 64-bit. According to LabVIEW official requirements, you must also install the 64-bit version of LabVIEW for it to run properly. In addition, before use, be sure to ensure that our USB driver is successfully installed.
# ========================================================================== # -------------------------------------------------------------------------- # Copyright © 2025 by Easyi3C, Inc. # All rights reserved. # -------------------------------------------------------------------------- # ========================================================================== import sys from ezi3c.api import * def register_read(Slave_address, Register): # open adapter ez = ez_open() if not ez: print("Cannot open Adapter") sys.exit(-1) # setaasa ez_ccc_setaasa(ez) # i3c read ret, data = ez_i3c_write_read(ez, Slave_address, Register, 1) # close adapter ez_close(ez) return data
Our example above is to read the register through the I3C protocol.
Right-click in a blank area and find the following options:
Click on the red box above, and the following interface will appear:
According to the theoretical part of the first section, drag the three icons above, Open Python Session, Python Node, and Close Python Session to the blank space, and then connect and configure as shown below:
Now return to the Front Panel of the .vi file, as shown below:
Enter the corresponding information on this interface as follows:
Click the red circle to run, and you can see the read data updated in the Reigster value box.
Notes: The function name here must be consistent with the definition in Easyi3C test.py, and the input parameters must also be consistent with the definition in the register_read function.
Through the simple I3C register read operation above, we can see that the Tower I3C Host Adapter can be easily integrated into LabVIEW, which is convenient for customers with this need. The above is just one way to use our device in LabVIEW. According to the instructions on the LabVIEW official website, our device can also be controlled in the following two ways: 1. Use System Exec.vi to execute Python scripts; 2. Communicate via TCP/IP or shared files; for more detailed usage, please refer to the LabVIEW official website documentation. This shows that the Tower I3C Host Adapter can be easily and cost-effectively integrated into LabVIEW. Compared with I3C Host Adapters using NI solutions on the market, such as those based on PXIe-6594, refer to the NI official website, the starting price is 275,555 RMB, the link is as follows:https://www.ni.com/zh-cn/shop/model/pxie-6594.html?namespace=s7classicThe price comparison advantage is obvious. Combined with our GUI, it is very convenient for engineers to get started with verification and use. At the same time, Python scripts can also be used to easily build complex automated testing environments.