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

Problem to write tags Micrologix 1100 #56

Open
lcflorindo opened this issue Apr 2, 2019 · 0 comments
Open

Problem to write tags Micrologix 1100 #56

lcflorindo opened this issue Apr 2, 2019 · 0 comments

Comments

@lcflorindo
Copy link

lcflorindo commented Apr 2, 2019

Hi all,

i'm trying to write the tag N7:2/1 with 1 or 0, but everytime i get an different error:

from pycomm.ab_comm.slc import Driver as SlcDriver

plc = SlcDriver()
#Open communication to PLC
if plc.open("192.168.0.1"):
   #Write tag
   plc.write_tag(('N7:2/1', 1, 'BOOL'))
   #Read tag
   print (plc.read_tag("N7:2/1"))
#Close communication when done
plc.close()

and returns the error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-114-a1059e9943b1> in <module>
      5 if plc.open("192.168.0.1"):
      6    #Write tag
----> 7    plc.write_tag(('N7:2/1', 1, 'BOOL'))
      8    #Read tag
      9    print (plc.read_tag("N7:2/1"))

TypeError: write_tag() missing 1 required positional argument: 'value'

I already gave the 'value' argument, another one that shows up is about '3 arguments required, you gave 4' even I giving exactly 3.
can someone help me?

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

1 participant