From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RS485 2 wire communication

Solved!
Go to solution

Hello All

 

I am facing some issue in RS485 2 wire communication. I have NI cRIO9045 with NI9871 Module. I have use Port 1 of this module. For two wire communication i have short(RX+ and TX+) and connected to my testing device A Data+ and short(RX- and TX-) and connected to my testing device Pin B Data-. 

I have configure Port and write IMG_20211013_121406.jpgprogram in LabVIEW FPGA. But which command i request i got same command in response.  

Please guide me how can i get right data.

 

Thank You..

0 Kudos
Message 1 of 14
(4,262 Views)

With a plain 2-wire RS-485 port, you may receive an echo of what you send. This happens if both TX and RX are always enabled.

Usually there is a mean to suppress this echo, either by dip-switch or a configuration software.

The corresponding mode is often named NO ECHO or AUTO. Read the NI9871 documentation to know how to set it.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 2 of 14
(4,253 Views)

_0-1634115912995.png

 

Please check your module property.

 

Regards,

Message 3 of 14
(4,251 Views)

Your wiring on the NI-9871 side seems to be correct.

 

But I am not sure about the other side. According to standard convention Data+ is B and Data- is A, so be careful. Line A is the negative part of the signal (to be connected to RX-/TX-), Line B is the positive part (RX+/TX+).

 

It also might be useful to use the termination resistor of 120 Ohm.

 

Regards, Jens

Kudos are welcome...
Message 4 of 14
(4,233 Views)

Hello .

I have configured NI 9871 Module 2 wire configuration. In device have Two Pin A and Pin B. So i have connected (RX+ and TX+) to Pin A of the device and (RX- and TX-) to Pin B. I also connect both sides with 120 Ohm resistance. 

But now no response, I am not receiving a single data bit.  

0 Kudos
Message 5 of 14
(4,215 Views)

This is my FPGA and RT VIRS485 FPGA.pngRTVI.png

0 Kudos
Message 6 of 14
(4,207 Views)

@amit01 wrote:

Hello .

I have configured NI 9871 Module 2 wire configuration. In device have Two Pin A and Pin B. So i have connected (RX+ and TX+) to Pin A of the device and (RX- and TX-) to Pin B. I also connect both sides with 120 Ohm resistance. 

But now no response, I am not receiving a single data bit.  


No, no, no - you already gave me a kudo, so connect A to RX-/TX- and B to RX+/TX+ !!! As I already wrote, if you have no further documentation that says otherwise, Pin A by convention is the negative line, Pin B is the positive line in 2-wire RS-485.

 

Also it might be easier to use the 9871 module in scan mode by installing the appropiate software package, because you can then use this port with the standard VISA-Read/Write VIs.

 

Regards, Jens

Kudos are welcome...
Message 7 of 14
(4,198 Views)

Thank You for your response. 

i have changed the connection but still no response. 

My cRIO have 8 module in which 6 in FPGA Mode. In this cRIO already deploy another code which is very important and in that code i am also using RS485 4 wire communication.  So i don't want any change in that code or cRIO configuration. Because that code daily used for device testing and also i have not source code of that code. I am developing new code for RS485 2 wire communication .so i connect my laptop with cRIO and doing work in new code.  I have doubt if i have change RS485 in SCAN mode my deploy code may occur some issue. 

That why i am using NI9871 Module in FPGA mode. 

Please suggest me what can i do ? I don't want any change in my deploy code

0 Kudos
Message 8 of 14
(4,178 Views)

Hi,

 

your requirements to use the FPGA are very valid. However, in order to first achieve the goal of a communication to your device it might be easier to start with the scan-interface implementation. You are probably much faster to make sure that your wiring and your communication protocol are valid. After everything works with the scan interface mode switch over to FPGA mode again. Then you "only" have to debug the FPGA code.

 

Regards, Jens

Kudos are welcome...
Message 9 of 14
(4,163 Views)

Usually, termination resistance(e.g your 120 ohm) has included in your target device.

So, you should wire without resistance.

 

The '2 Wire mode' means that every positive(+) wires are connected each other and negative(-) wires too.

So, I think you are right.

 

Regards, Jay

Message 10 of 14
(4,145 Views)