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 June 10th, 2019, 06:53 AM   #1
kkhabeeb
Member
India

kkhabeeb is offline
 
Join Date: Jun 2019
Location: india
Posts: 3
Smile plc-python

hello friends,am new to this group, currently am working in automation company,so i have to communicate my python with my unitronics PLC v350 to fetch and write process variable, any one can give me a simple program or introduction
  Reply With Quote
Old June 10th, 2019, 01:15 PM   #2
kallileo
Member
Greece

kallileo is offline
 
Join Date: Jun 2008
Location: Thessaloniki, Macedonia, Hellas
Posts: 209
Does it have RS485 or Ethernet ports?
You could AdvancedHMI (google it) and use it to communicate with your PLC.
It supports VB.Net and C#.
For Python you need a Modbus library and I believe you can easily find one if look it up.

For example:

https://sourceforge.net/projects/eas...dp-rtu-python/
__________________
automationofthings.blogspot.com

Last edited by kallileo; June 10th, 2019 at 01:17 PM.
  Reply With Quote
Old June 10th, 2019, 11:20 PM   #3
kkhabeeb
Member
India

kkhabeeb is offline
 
Join Date: Jun 2019
Location: india
Posts: 3
yes, friend, ihave a rs485 port
  Reply With Quote
Old June 11th, 2019, 10:03 AM   #4
kallileo
Member
Greece

kallileo is offline
 
Join Date: Jun 2008
Location: Thessaloniki, Macedonia, Hellas
Posts: 209
Connect the PC to plc using a USB to rs485 converter. Then setup modbus rtu slave on your plc and use your Python code to read and write data.
__________________
automationofthings.blogspot.com
  Reply With Quote
Old June 11th, 2019, 10:46 PM   #5
kkhabeeb
Member
India

kkhabeeb is offline
 
Join Date: Jun 2019
Location: india
Posts: 3
yes , i have done the communication with moxa (usb-rs485) ,can you get me a basic python script to communicate with the plc
  Reply With Quote
Old June 12th, 2019, 06:53 AM   #6
kwade
Member
United States

kwade is offline
 
Join Date: May 2013
Location: sc
Posts: 326
It seems like a lot of good example code already exists. It is generic, but maybe you can mod it to suit your needs.

Look here
https://pymodbus.readthedocs.io/en/v...us-client.html

I don't know python, but from a quick read, it seems to support reading/writing coils/registers using pymodbus TCP, UDP, ASCII and RTU,
  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
What can i do to get better at coding controls logics? Jrivers010 LIVE PLC Questions And Answers 54 August 23rd, 2017 05:08 PM
PLC Update - Back Issues Collection Now Available! Phil Melore LIVE PLC Questions And Answers 11 October 22nd, 2015 02:17 AM
PLC and Python Communication, HELP DiegoE LIVE PLC Questions And Answers 25 February 23rd, 2015 06:52 AM
Siemens PLC won't auto-run after power-up Lamboom LIVE PLC Questions And Answers 5 August 19th, 2014 04:32 PM
PC to PLC Protocol TheRixta LIVE PLC Questions And Answers 13 December 17th, 2008 12:56 PM


All times are GMT -5. The time now is 06:17 AM.


.