node-red-contrib-cip-ethernet-ip
node-red-contrib-cip-ethernet-ip copied to clipboard
Not a PLC, but Ethernet-IP Protocol
Hi. We are reading successfully in python from a Televac pressure meter. There are no named tags that I am aware of, only numbers. I use pycomm3 to read as such, but do not understand how to do the same thing in node-red:
from pycomm3 import CIPDriver, Services, ClassCode, INT, Array, USINT, SHORT_STRING, REAL
host = '192.168.10.31'
def get_real(instance_var): with CIPDriver(host) as plc: response = plc.generic_message( service=Services.get_attribute_single, class_code=162, instance=instance_var, attribute=5, data_type=REAL, connected=False, unconnected_send=False, route_path=True, )
if response:
return (response.value)
else:
print(f'error - {response.error}')
try: meter1 = get_real(101)
How did you managed to map all those infos?