LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RS485 Interfacing pins in myRIO

Hi,

I wanted to communicate with a device through RS485 from myRIO. But from manual what I got is, they only have UART Tx and Rx pin. I didn't find anything about RS485 in the whole manual. Is that mean myRIO don't have RS485 interfacing (like sbRIO. They have separate onboard RS485 connector).

 

I don't even find any appropriate example. I did try to implement RS485 through VISA (by changing wire mode property node), but gives error..

0 Kudos
Message 1 of 21
(7,162 Views)
Message 2 of 21
(7,155 Views)

Yaiks!! Thanks though! So this is the only way? Smiley Sad
Why they didnt just assign some pins for that Smiley Frustrated

0 Kudos
Message 3 of 21
(7,151 Views)

Greetings fahad80

 

There is another possibility, outlined in this document. Let us know what you decided to do or if you have additional questions.

 

http://www.ni.com/white-paper/9595/en/

 

Warm Regards,

 

Luis J

Applications Engineering

National Instruments

Luis J.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 21
(7,116 Views)

ASRL3 do show up, but status in MAX is showing 'Not Present'. Is it supposed be that?

0 Kudos
Message 5 of 21
(7,103 Views)

Sorry to say, but that USB-RS485 thing actually dont work. I guess, the author didn't actually test that. Linux RT do recognize the device and load the driver for it, but as he occupied the device, NI-VISA don't have access of it. Also NI-MAX depict this device's status as "Not Present".

 

So if we unload the FTDI driver (ssh->rmmod) then NI-Max can detect the device but as an USB raw device. That mean, I can't use the already available RS485 library. Because they look for any serial port.

 

I wish there were some PORT for RS485 like sbRIO.

0 Kudos
Message 6 of 21
(7,090 Views)

One thing I think worth mentioning is that there are UART TX and RX lines on the MXP connectors that can be used to interface with a serial transceiver. They cannot use "2-wire DTR controller" or "2-wire DTR controlled with echo" modes because the DTR lines do not exist on myRIO; however, you can use 4-wire or 2-wire auto modes depending on how you configure the transceiver.

 

I believe you can do multi-drop with 4-wire mode, but you cannot do multi-point. Multi-drop means multiple receivers while multi-point means there can be multiple transeivers and receivers. When in 4-wire mode, there are separate pairs for TX and RX, you can do multiple receivers but only one transmitter.

 

The UART TX and RX lines on myRIO were designed to be connected to a serial transceiver, whether it be RS-232 or RS-485. I hope this helps.

Tannerite
National Instruments
Message 7 of 21
(7,040 Views)

Hi Tannerite,

 

Thank you. I was thinking the same. So I hooked up a RS232 to RS485 conveter. And its working. The device receiving RS485 command from myRIO.

 

Now, there is still a lil bit problem. RS485 is not a full duplex protocol. To control Tx and Rx data there is a control pin in that converter IC. In sbRIO i didn't have to worry about this (i guess, it was handled internally). But in myRIO how can I control the communication flow?

 

One way to do this is manually handle the flow (by connecting the pin with digital I/O). Then i have to change the library files ( Dynamixel library). Because, in the library code, they configure the serial with visa and then change the property node (wire mode) to RS485, assuming there might Be RS485 port in the device or laptop.

 

Any suggestion?

0 Kudos
Message 8 of 21
(7,027 Views)

@fahad80 wrote:

Sorry to say, but that USB-RS485 thing actually dont work. I guess, the author didn't actually test that. Linux RT do recognize the device and load the driver for it, but as he occupied the device, NI-VISA don't have access of it. Also NI-MAX depict this device's status as "Not Present".

 

So if we unload the FTDI driver (ssh->rmmod) then NI-Max can detect the device but as an USB raw device. That mean, I can't use the already available RS485 library. Because they look for any serial port.

 

I wish there were some PORT for RS485 like sbRIO.


Did you make sure to have NI-Serial installed and deployed to the myRIO device? That is the NI driver that should be able to talk to all kinds of NI-RS232 and NI-RS422/485 hardware. Without that the NI Linux RT OS might try to load standard driver modules that aren't exactly able to deal with the specifics of the NI hardware. You definitely would loose any RS-485 specific VISA properties as that is only supported by the NI-Serial driver and none of the standard FTDI drivers.

 

EDIt: Never mind, NI-Serial seems so far not to be available for NI Linux RT targets.

Rolf Kalbermatter
My Blog
0 Kudos
Message 9 of 21
(7,017 Views)

Yeap, I tried. And yeap you are right, they are not for myRIO. Literally I tried everything. 😞

0 Kudos
Message 10 of 21
(6,999 Views)