AIO one channel loopback

 1'''
 2AIO - AIO_one_channel_loopback.py
 3
 4This example demonstrates the process of AIO loopback with specific channels.
 5It involves using AO pins to send signals and AI pins to receive signals on a single device, commonly referred to as "loopback".
 6The AI and AO pins are connected using a wire.
 7The AO range is -10 to 10 V.
 8
 9First, it reads AI data and displays its corresponding values.
10Following that, it writes digital signals to the AO pins and reads AI on demand data once again.
11
12For other examples please check:
13    https://github.com/WPC-Systems-Ltd/WPC_Stand-alone_Python_release/tree/main/examples
14
15Copyright (c) 2024 WPC Systems Ltd.
16All rights reserved.
17'''
18
19## WPC
20import pywpc
21
22## Write AO vaule -10(V) in channel 0
23ch0 = 0
24voltage0 = -10
25status = pywpc.AO_writeOneChannel(ch0, voltage0)
26print("AO_writeOneChannel status: ", status)
27
28## Read data acquisition
29ai_data = pywpc.AI_readOnDemand()
30print(ai_data)