Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not a PLC, but Ethernet-IP Protocol #34

Open
YitzHandel opened this issue Dec 12, 2022 · 1 comment
Open

Not a PLC, but Ethernet-IP Protocol #34

YitzHandel opened this issue Dec 12, 2022 · 1 comment

Comments

@YitzHandel
Copy link

YitzHandel commented Dec 12, 2022

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)

@thalesmaoa
Copy link

How did you managed to map all those infos?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants