extended output and readme
This commit is contained in:
@ -4,13 +4,20 @@ from asyncua import Client
|
||||
|
||||
|
||||
async def test():
|
||||
client = Client(url='opc.tcp://192.168.254.5:4863', timeout=10.0)
|
||||
client = Client(url='opc.tcp://172.16.3.60:4840', timeout=10.0)
|
||||
# await client.set_security_string('')
|
||||
async with client:
|
||||
node = client.get_node('ns=1;s=t|SERVER::A201CD124/MOT_01.AV_Out#Value')
|
||||
node = client.get_node('ns=0;i=345')
|
||||
value = await node.read_value()
|
||||
displayName = (await node.read_display_name()).Text
|
||||
print(dir(node))
|
||||
print(f"{displayName=} = {value=}")
|
||||
print(f"X1: {await node.read_data_value()}")
|
||||
print(f"X2: {(await node.read_data_value()).Value.Value}")
|
||||
print(f"X3: {dir((await node.read_data_value()).StatusCode)}")
|
||||
print(f"X3: {(await node.read_data_value()).StatusCode.name}")
|
||||
print(f"X4: {(await node.read_data_value()).SourceTimestamp}")
|
||||
print(f"X4: {(await node.read_data_value()).ServerTimestamp}")
|
||||
|
||||
asyncio.run(test())
|
||||
|
||||
|
Reference in New Issue
Block a user