EB062 RS485 board bit tricky

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
myval
Flowcode V4 User
Posts: 40
Joined: Sun Feb 22, 2009 6:54 am
Location: Sydney
Has thanked: 2 times

EB062 RS485 board bit tricky

Post by myval »

I have spent couple of days trying to get eb062 working and I might have discovered a hardware/ design fault connector J17 should have RX1 on pin 5 not RX2 I think, at least it would make sense :-)
Not a biggie bit of soldering will fix that but the main issue I have some devices with SP485 and LTC485 and I can not get the eb062 to comunicate with them at all.
I have checked wiring pinouts code like 100 times eerything seems to be good. If I connect my devices to the rs485 to 232 adapter and cutecom on the computer it comunicate ok if I connect EB062 the same way to the computer it comunicate ok but when I connect them together boards to eb062 nothing happens no matter what I try.

I am wondering if there is any known compatibility issue betveen DS75176 used in eb062 and all my other rs485 drivers?


thanks
Josef

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: EB062 RS485 board bit tricky

Post by Benj »

Hello Josef,

I've had a look at the schematic for the board and you are correct the connection to J17 should be RX1 and not RX2. Not sure how this bug made it through the sign off process but I will make sure this gets flagged and fixed. Many thanks for reporting it.

No known compatibility issues I am aware of. Do you have access to a scope or anything else you can use to check the signals.

myval
Flowcode V4 User
Posts: 40
Joined: Sun Feb 22, 2009 6:54 am
Location: Sydney
Has thanked: 2 times

Re: EB062 RS485 board bit tricky

Post by myval »

Right here it is Have not touched settings on the scope for easier comparison. One is SP485 and the other DS75176 same termination. Both using the same flowcode routine sending 0b01010101, 19200 8bit 1stop no parity
Attachments
Sp485.jpg
Sp485.jpg (28.91 KiB) Viewed 9546 times
DS75176.jpg
DS75176.jpg (28.8 KiB) Viewed 9546 times

myval
Flowcode V4 User
Posts: 40
Joined: Sun Feb 22, 2009 6:54 am
Location: Sydney
Has thanked: 2 times

Re: EB062 RS485 board bit tricky

Post by myval »

I think I worked this one out. The story is. It all started with using channel one which has that rx2 instead of rx1 so it did not work and after I moved everything to CH2 I forgot to move my data dir pin. So it does communicate cool but I ran into another problem.
address_array = ""
temp = Length$(address_array)
Displays 0 which is correct

address_array[0] = 'a'
address_array[1] = 'b'
address_array[2] = 'c'
address_array[3] = 'd'

temp = Length$(address_array)

in simulator/ debugger displays 4 and if I load it into ECIO40 it displays 6???
I am kind of positive I am missing something but I can not see what it is???

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: EB062 RS485 board bit tricky

Post by Benj »

Hello,

Variables in RAM are always unintialised when you run the program so it is always a good idea to initialise the contents.

Try adding this to your calculation icon.

address_array[4] = 0

This will terminate the array and allow the size calculation to work correctly on hardware.

myval
Flowcode V4 User
Posts: 40
Joined: Sun Feb 22, 2009 6:54 am
Location: Sydney
Has thanked: 2 times

Re: EB062 RS485 board bit tricky

Post by myval »

I thought I was initialising it with that first address_array = ""
so If I understand that right every time I change items in array I have to add oat the end of it?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: EB062 RS485 board bit tricky

Post by Benj »

Hello,

Ah I see, the first thing you are doing

address_array = ""

is essentially nullifying the start of the string like this.

address_array[0] = 0

But the rest of the data from location 0 onwards does not necessarily have to be 0.

So if you are manually adding data you need to add your own null to the end of the string to get the length function and others to work correctly.

Doing this

address_array[0] = 'a'
address_array[1] = 'b'
address_array[2] = 'c'
address_array[3] = 'd'
address_array[4] = 0

is essentially the same as doing this with a string variable as the null byte at the end of the string will be automatically added for you.

address_array = "abcd"

myval
Flowcode V4 User
Posts: 40
Joined: Sun Feb 22, 2009 6:54 am
Location: Sydney
Has thanked: 2 times

Re: EB062 RS485 board bit tricky

Post by myval »

Ok too easy Thank you for your help, it works fine now.

myval
Flowcode V4 User
Posts: 40
Joined: Sun Feb 22, 2009 6:54 am
Location: Sydney
Has thanked: 2 times

Re: EB062 RS485 board bit tricky

Post by myval »

Here comes another problem :-)
I am fighting automatic address detection when I enable 9bit com all 9bit data sent to the device trigger interrupt. I can not work out what is the purpose or use of ADDEN?

thanks
Josef

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times

Re: EB062 RS485 board bit tricky

Post by Enamul »

Hi Ben,

From this post I think you know that your RS485 board has a connection problem and I think you should add a note on the already produced EB062 boards which you are selling so that whenever anyone buy one he will immediately know the issue. At the same time the problem in your data sheet to check the test.hex for checking the EB062 board. If anyone just follow the instruction in the J16>RX and J19>TX, which I got from the document file of EB062 - RS485 Board Test Files.zip folder.

Please update that in the datasheet of the board.

Enamul
Enamul
University of Nottingham
enamul4mm@gmail.com

Post Reply