winIDEA SDK
test_hil_read_write.py
1# This script is licensed under BSD License, see file LICENSE.txt.
2#
3# (c) TASKING Germany GmbH, 2023
4
5import isystem.connect as ic
6
7
8winidea_id = ''
9
10
11def test_readWrite():
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
14
15 hilCtrl = ic.CHILController(connMgr)
16 D0_0_URL = 'ADIO.DIO1.Channel[D0_0]'
17
18 d0_0Value = hilCtrl.read(D0_0_URL)
19 print(f"Digital D0_0 state: {d0_0Value}")
20
21 hilCtrl.write(D0_0_URL + ': ' + 'HIGH')
22
23
24if __name__ == "__main__":
25 test_readWrite()