CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Thu Oct 19, 2017 9:00 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
 Post subject: RS485 read failure
PostPosted: Mon Mar 20, 2017 11:31 am 
Offline

Joined: Mon Oct 31, 2016 5:49 pm
Posts: 23
Hi,

I'm trying to communicate with a TOSHIBA inverter through RS485.
I use a SN75LBC184 (MAX485 equivalent) connected to RX/TX channels of the BBB through suitable 5v - 3.3v level shifters.
I decided to control the DE/RE pins of the MAX485 in hardware, without enabling RTS/CTS pins of the UART, by means of NE555 as explained here:
http://www.mcmajan.com/mcmajanwpr/blog/2014/01/20/arduino-e-rs485/
Unfortunately, Codesys returns RESPONSE_WRONG_SLAVE (see attachment) even if i'm always able to write the registers and spin the motor. Moreover the read function occasionally works fine and i can read the registers but the most of the time the read fails.

Then, i adapted the RS485 shield for Raspberry Pi : https://www.sparkfun.com/products/13706 to work with the BBB but i get the same exact results as above.

I then tried that shield on a Raspberry Pi and I always read and wrote successfully all the registers.

I also loaded the overlay BB-UART4-RS485-00A0 to control directly the MAX485 DE/RE pins through the P9.27 pin but it does not work either. I couldn't see any signal from P9.27 using an oscilloscope.

Thanks.


You do not have the required permissions to view the files attached to this post.


Top
   
 Post subject: Re: RS485 read failure
PostPosted: Tue Mar 21, 2017 1:18 pm 
Offline

Joined: Tue Sep 15, 2015 10:23 pm
Posts: 13
you have declared Modbus_Slave under Modbus_Master. Under one port it can be Master or Slave, not both. I am not sure it this is the right way to do it.


Top
   
 Post subject: Re: RS485 read failure
PostPosted: Fri Mar 24, 2017 1:41 pm 
Offline

Joined: Mon Oct 31, 2016 5:49 pm
Posts: 23
Hi, it should be the right way. My BBB is the master wired with N. slaves along the bus.
Anyway i solved using a MAX13488E with AutoDirection Control.

Thanks.


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

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 3 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