04-08-2021 12:05 PM - edited 04-08-2021 12:06 PM
Hi there,
I couldn't determine whether this is more Instrument Control or cRIO-specific, so I just put it here since I feel like the problem more lies within the realm of serial control itself. I am attempting to create a communication link between a cRIO-9068's onboard (COM3) RS-485 port and a slave flow meter device, an Endress+Hauser Coriolis meter. I have validated through local connectivity to the flow meter that the addresses are configured to their factory defaults:
Slave Addr = 247
Baud = 19,200
Parity = Even
Byte order = 1-0-3-2 (this is a Slave specification describing how each byte of a 32-bit Float would be sent, in sequence)
I have configured a few MODBus slave devices in the past with the cRIO-9068, and I can't seem to get this one working with the usual run-through. This is my first time utilizing COM3, the on-board serial port designated as RS-485. I am using I/O Server to create a MB.lvlib library that I use to create a range of 300000/400000-series addresses to read from. I then deploy this to my CompactRIO controller (Scan Mode configuration). The only thing I can get to seemingly indicate new values or change noticeably in realtime are the CommFail boolean (always on) and the Updating boolean (intermittent on/off).
I have consulted this link on setting up 2-Wire (Half-Duplex) communications with the RS-485 port and am complying with it.
I have consulted this link on RS485 termination, and am using a 109-ohm termination resistor on each end, though it is not a multi-node drop bus, just end to end.
I don't know if there are termination resistors automatically enabled on either device by default. I've read around and can't find anything mentioning it, so I assume I'm ok there. I tried this setup without resistors with the same result. What I have not yet been able to figure out how to do is change the serial port configuration to an explicit 2-wire mode.
This is because I don't see the option anywhere in MAX. In MAX, I don't see the advanced tabs and it's always greyed out with random serial settings and says it can't be accessed. Does having the MB.lvlib deployed to the project automatically grey this out and tell MAX that is has programmatic control? I know you can programmatically modify this via a property node setting also reference on that same URL, but when I do this in the program, it cannot "gain access to the resource" as if it's in use. All of my error outputs are code -1967353902 very similar to this user's issue but I've deleted the other Shared Variable + ModBUS library I used in the project.
Is there anything obvious I'm missing here? I really feel like it is getting that port to configure to a 2-wire mode but I just can't seem to do it anywhere.
Thank you
04-09-2021 01:49 AM
Hi,
The termination resistors must be installed to have a good network. Regardless of being multidrop or not.
But for test and short distance I use RS-485 network without them. Also works but know that it could be a problem if there are intermittent errors.
The 0V connection is omitted in a lot of connections I see. If there are no galvanic isolations beween the two connected items it is probably no problem. But if you have (multiple) galvanic isolation it could be that the 0V is necessary. I always advise to connect the 0V.
RS-485 is a differential line. a A and B, a + and -
Some manufacturers call it A- and B+.
Swapping the two lines at one side helps is manufacturers not clear in the line identification.
Kees
04-09-2021 10:36 AM - edited 04-09-2021 10:39 AM
Thanks, we're using chassis ground in this case for both device grounds, but I do connect everything as depicted below but also with pin 1 of the RS485 connection to ground nonetheless. I'll definitely try swapping the two wires going to the device RS485 terminals. They are simply labeled '+' and '-'.
One thing I failed to mention in the OP is that I'm using LV 2K15 SP1 on a Win7Pro SP1 machine and the 9068 uses NI RIO 15 drivers (same year).