You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old December 6th, 2017, 09:46 AM   #1
babido10
Member
Morocco

babido10 is offline
 
Join Date: Nov 2017
Location: rabat
Posts: 28
Exclamation script python, library snap7, Help!!

code python:

import snap7
from time import sleep
import struct
import snap7.client as c


plc = snap7.client.Client()
plc.connect("192.168.0.1")

plc.writeMem('QX0.0',True) # write Q0.0 to be true, which will only turn on the output if it isn't connected to any rung in your ladder code
print plc.getMem('MX0.1') # read memory bit M0.1
print plc.getMem('IX0.0') # read input bit I0.0
plc.plc.disconnect()

////

error line ==> plc = snap7.client.Client()

I connected with the plc but the problem stay same
if some one here can help me to resolve this problem
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
script python error , help!!! babido10 LIVE PLC Questions And Answers 2 December 5th, 2017 11:09 AM
Reading Event codes into Wonderware Ones_Zeros LIVE PLC Questions And Answers 12 October 12th, 2017 04:59 AM
Batch script executed from InTouch doesn't generate output gardarog LIVE PLC Questions And Answers 5 May 13th, 2017 06:09 AM
Any idea how to access the Omron simulator? strantor LIVE PLC Questions And Answers 9 March 13th, 2015 06:01 PM
1756-EWEB chart script / library rmckinle LIVE PLC Questions And Answers 1 June 29th, 2014 02:05 PM


All times are GMT -5. The time now is 12:12 PM.


.