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.
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.
10-13-2021 03:12 AM
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 program 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..
Solved! Go to Solution.
10-13-2021 04:04 AM
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.
10-13-2021 04:06 AM
Please check your module property.
Regards,
10-13-2021 06:46 AM
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
10-13-2021 10:21 AM
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.
10-13-2021 11:08 AM
This is my FPGA and RT VI
10-13-2021 12:02 PM
@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
10-13-2021 10:49 PM
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
10-14-2021 05:19 AM
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
10-14-2021 07:27 PM - edited 10-14-2021 07:28 PM
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