- Interactive Q & A - Interactive Q & A (
-   LIVE PLC Questions And Answers (
-   -   plc-python (

kkhabeeb June 10th, 2019 07:53 AM

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

kallileo June 10th, 2019 02:15 PM

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:

kkhabeeb June 11th, 2019 12:20 AM

yes, friend, ihave a rs485 port

kallileo June 11th, 2019 11:03 AM

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.

kkhabeeb June 11th, 2019 11:46 PM

yes , i have done the communication with moxa (usb-rs485) ,can you get me a basic python script to communicate with the plc

kwade June 12th, 2019 07:53 AM

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

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,

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