I used only two wires to connect A and B between the RS485 module and the RIO.
The problem is that I'm able to receive the data and see them from the RIO, but sometimes I get transmission errors mostly when I power ON inverters and other devices placed between the RIO and the Arduino.
If I connect the RIO close to the Arduino, everything works fine even in presence of external noise.
It seems to be a problem related to the noise and I cannot understand how to fix it.
The wires are twisted, however, should I also connect the Ground?
Follow the links to authoritative documents within those threads.
Also, what do the 'slippery eels' at National Instruments say? I'd be asking them. Don't get me wrong, they have some super engineering staff, but sometimes it's hard to get past the frontline "is your computer plugged in" guys and girls.
This discussion comes up all too often. Those two-screw RS485 adapters are the reason. Find a 3-screw type, they're out there. The third screw is for your ground.
There are some VERY limited use cases for not connecting the grounds of the systems involved, but my approach would be to only investigate not connecting the grounds if your communications issues exist with ground in place, OR if your industrial environment precludes connecting the grounds for some reason.
As for your fibre experiment, it's going to depend on how the fibre 'isolator' handles the bus turnaround, and whether both the NI CRIO device and your Arduino code are working in concert with the isolator. It's not guaranteed.
Finally,
I also tried to use a RS485 to optical fiber converter instead to use the wires ([CMM/1S - RS485-synthetic fiber converter - Low voltage, but I still get the same problem: it works, but it is very sensitive to noise.
In this case, did you establish a ground between your Arduino power and the fiber converter's ground(that "int gnd" screw)?
As you said, it is pretty impossible to discuss this with a real tech guy from NI.
I've read your post in the topics you quoted and I can say that I do not have the three-screws module, but the 2-screws version. By the way, the ground is shared between both the power supplies used for the RIO and the Arduino, isn't it enough?
About the fiber converter, I have to check if the ground is the same with the rest of the circuit.
In my laboratory, I found a RS485 with 3-screws terminal, probably I can give it a try.
No. Use 2 twisted pairs, one for each signal. One wire carries the signal, the other one is GND. Forcing both signals into one twisted pair does not eliminate common mode interference.