12-01-2016 07:16 AM
Hello everyone,
I have a little problem. Since some days i try to implement the RS485 interface into my cRio fpga system. My idea was, to take the RS232 example:
and build a TTL -> RS485 converter. For this converter i need an R/W port, to switch between read and write. But I think it's very awkward and this example is to slow. If i set the baudrate to 2.5Mbaud, i only get ca. 2Mbaud. Does anybody implement the RS485 interface into the FPGA? I know, that i always need a level converter - but thats the easiest part 😉
Our first idea was to use the NI9871 module (RS485 cRio modul). But this module is not able to communicate with 2.5Mbaut.
Thank you very mich for your help and sorry for my english 🙂
Greetings
Flo
12-05-2016 07:30 AM
Hi Flo,
the NI 9871 Module should be able to communicate with more than 2,5Mbaut as you can see here:
NI 9871 (FPGA Interface) - NI-RIO Software Help 4.0
Maybe this example might help you:
Best wishes
Dennis
12-05-2016 07:54 AM
Hi Dennis,
according to the linked help entry the baudrate is set by
BaudRate = 3.6864 Mbps / (Prescaler * Divider) with prescaler=1 or 4 and Divider=1…65535
How will Nullstrom ever achieve 2.5MBaud?
If the help is correct he can reach only 3.6864MBaud or 1.8432MBaud…
12-05-2016 08:03 AM
Hi,
my bad, I thought you meant that it is not possible to set a baudrate higher than 2.5Mbaut.
You are right, it is not possible to set the bautrate to exactly 2.5Mbaut.
If you need exactly the 2.5Mbaut you will have to implement the RS485 Interface on your own into the FPGA.
There is no example Code available for that, I'm sorry.
12-06-2016 01:32 AM
Good Morning Dennis,
Thank you very much for your answer, but Gerd is right. With my 9871 module, I'm not able the reach 2.5Mbaud. And i need exactly 2.5Mbaud for this sensor.
For your information:
The main theme is, i should trigger the data communication with an external trigger signal and it's very important that the jitter between my rising edge from my external trigger and my first start bit is very small. I try to implement this on my realtime PXI System (incl. NI PXI-8433/2 Card - the card is able to communicate with 2.5Mbaud). Now I'm able to trigger the data communication but, the jitter between my rising edge from my triggersignal to the first start bit is to big (12µs).
Now i think i take the RS232 sample:
And try to change it for my application. If anybody have a little RS485 example - it would be great 🙂
Thank you vor your help...
10-01-2019 03:23 AM
Hello, I am also trying to implement RS485 interface with cRio & NI9401. I would like to know about your experience and the challenges you face.
As I understand, though NI9871 can do 3.8M Baud rate, throughput is limited to 1.5M. Did you see similar limitation with NI9401.
11-18-2019 06:46 AM
Have you had any success in converting the rs232 example and implementing it as 485 on FPGA?