12 lines
330 B
Python
12 lines
330 B
Python
import asyncio
|
|
from asyncua import Client
|
|
|
|
async def test():
|
|
client = Client(url='opc.tcp://172.16.3.60:4840', timeout=1.0)
|
|
# await client.set_security_string('')
|
|
async with client:
|
|
node = client.get_node('i=345')
|
|
value = await node.read_value()
|
|
print(f"{node=}, {value=}")
|
|
|
|
asyncio.run(test()) |