RS-485 on 5i25+7i76/7i85

More
09 Jan 2020 10:56 #154425 by rumking
Hi folks,
is it possible to use RS-485 on 5i25 with 7i76 or 7i85? I am intending to use a mV/V signal convertor which outputs RS-485. (this one: pcm-uk.com/products-services/dcell-embed...ge-digitiser-module/). This should be used for real-time force measurement and the force should be used for motion control (utilizing PID controllers, etc.).

I also came across the 5i21 which has RS-485 interface, but it would be nice to not use 2 PCI cards. From what i was able to gather, it should be possible to use RS-485 on RS-422 interface, but only when 4 wire (full duplex) connection is used. However, the convertor uses 2 wire connection. Is this a problem?

The convertor provides ASCII, MODBUS RTU or MANTRABUS-II protocols. I found that linuxcnc is compatible with MODBUS, but I don't have any experience with it, so I am really confused here.

Please Log in or Create an account to join the conversation.

More
09 Jan 2020 20:25 #154482 by andypugh
Replied by andypugh on topic RS-485 on 5i25+7i76/7i85
With firmware that puts a serial UART on the serial expansion port of the 7i76 you can probably get the data in to HAL, but you would probably need to cobble together a driver.

Sample .comp file here, might be fairly close:
github.com/LinuxCNC/linuxcnc/blob/master...ivers/mesa_uart.comp

Please Log in or Create an account to join the conversation.

More
13 Jan 2020 13:46 - 13 Jan 2020 13:47 #154757 by rumking
Replied by rumking on topic RS-485 on 5i25+7i76/7i85
Andy, thank you for the reply. I created a bitfile with UART on the 7i85 like so:

IOPortTag & x"00" & PktUARTRTag & PktURDataPin, -- I/O 00 PIN 1 PIN 1
IOPortTag & x"00" & PktUARTTTag & PktUTDataPin, -- I/O 01 PIN 14 PIN 2

I got the bitfile generated successfully, but I am afraid this is not possible as the 7i85 has RS422 interface (and I should be using UART on RS485 interface, correct?).

When I --readhmid the 5i25, I get a weird output right where the UARTR/UARTT should be:

1 17 IOPort (unknown-gtag-28) 0 Unknown-Gtag28-Chan0-Pin1 (In)
14 18 IOPort (unknown-gtag-27) 0 Unknown-Gtag27-Chan0-Pin129 (Out)

Does this happen due to broken bitfile? Or is it some mesaflash (using v3.4.0) bug?
Last edit: 13 Jan 2020 13:47 by rumking.

Please Log in or Create an account to join the conversation.

More
13 Jan 2020 13:56 #154758 by PCW
Replied by PCW on topic RS-485 on 5i25+7i76/7i85
I think Mesaflash does not have the PktUART tag/names yet. I will try and add this is the next few days.

Please Log in or Create an account to join the conversation.

More
13 Jan 2020 14:24 #154760 by andypugh
Replied by andypugh on topic RS-485 on 5i25+7i76/7i85
It might be simpler to use the plain UART rather than PkTUART.

(or, it might not)

Please Log in or Create an account to join the conversation.

More
13 Jan 2020 14:27 #154761 by andypugh
Replied by andypugh on topic RS-485 on 5i25+7i76/7i85
You might need advice from PCW on the compatibility of RS422 and RS485 physical layers, but I think that they are compatible in the case of Mesa hardware

Please Log in or Create an account to join the conversation.

More
13 Jan 2020 14:45 - 13 Jan 2020 16:28 #154762 by PCW
Replied by PCW on topic RS-485 on 5i25+7i76/7i85
Unfortunately neither the 7I76 nor the 7I85 have RS-485 capable interfaces (no drive enable)

You can fake it pretty well for low speeds by adding series resistance on the
TX outputs before they connect to the RX pair

Mesa 25 pin daughtercards/FPGA cards with 485 capable differential I/O:

7I74, 7I76E (Rev C), 7I77,7I89,7I94,7I95,7I96,7i97,7C80,7C81
Last edit: 13 Jan 2020 16:28 by PCW.

Please Log in or Create an account to join the conversation.

More
13 Jan 2020 17:05 #154772 by rodw
Replied by rodw on topic RS-485 on 5i25+7i76/7i85
Peter, how do we know what revision of the 7i76e we have?

Please Log in or Create an account to join the conversation.

More
13 Jan 2020 18:11 #154775 by PCW
Replied by PCW on topic RS-485 on 5i25+7i76/7i85
There's a revision letter on the card, but there are no rev C cards in circulation yet (still at assembly)
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

More
13 Jan 2020 21:26 #154785 by rumking
Replied by rumking on topic RS-485 on 5i25+7i76/7i85
And what about using a RS422 to RS485 convertor?

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.317 seconds
Powered by Kunena Forum