CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Fri Apr 19, 2019 7:34 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sat Feb 09, 2019 6:37 pm 
Offline

Joined: Wed Jan 16, 2019 9:30 pm
Posts: 1
Hi,

I'd like to connect energy meter with modbus rtu protol (3 pins, gnd, rx, tx) to rpi 3. Do I need to use usb to rs485 converter or can I do it by connection directly to gpio pins (gnd, tx, rx)? What is the next step in codesys if I'd like to read registers from my device? The rpi is master then and meter is a slave? Should I prepare (install, upgrade files etc.) rpi for this connection or it is enought to use Codesys? My rpi is connected with Codesys and it works with other in/out pins well. Thank you very much for your answers.


Top
   
PostPosted: Fri Feb 15, 2019 9:46 pm 
Offline
User avatar

Joined: Tue Mar 20, 2018 11:27 am
Posts: 2
szymon077 wrote:
Hi,

I'd like to connect energy meter with modbus rtu protol (3 pins, gnd, rx, tx) to rpi 3. Do I need to use usb to rs485 converter or can I do it by connection directly to gpio pins (gnd, tx, rx)? What is the next step in codesys if I'd like to read registers from my device? The rpi is master then and meter is a slave? Should I prepare (install, upgrade files etc.) rpi for this connection or it is enought to use Codesys? My rpi is connected with Codesys and it works with other in/out pins well. Thank you very much for your answers.


Hello,

In my case, I use a USB-RS485 adapter connect directly to USB raspberry pi.
It is not necessary to upgrade anything.

After connect USB adapter, use the command "dmesg" to check the port
in my case it reports: ttyUSB0

so you need to add in /etc/CODESYSControl.cfg
(Attention you need to remove the 0 from USB0)

[SysCom]
Linux.Devicefile=/dev/ttyUSB

And ...... voala !!!!!!!!

_________________

John Martin
Distribuidor y soporte oficial de CODESYS en EspaƱa
Image
http://www.larraioz.com


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited