

You should also avoid a long segment of wire branching off from the main run to one or more devices. To minimize the effect of noise, use twisted pairs as in Category 3 or Category 5 cable, minimize wire lengths and avoid running parallel to power cables or near noisy devices (motors, relays, fluorescent lights). Remember that a maximum number of devices (usually 32) can be addressed on each RS-485 network and the maximum wire length is generally 4000 ft (1200 m). But honestly, it is very unusual to see any devices nowadays that require hardware flow control.Wire RS-485 networks terminal-to-terminal in a daisy chain and avoid segment branches to reduce electrical reflections and improve transmission reliability I have never heard of "RTS Only" flow control, and NI-VISA doesn't have that as an option. One other thing is that I don't use the MB Init on that older library and always set the serial settings myself using the Serial Config like you have at the beginning of this VI. One other thing about the older library I use is that the VISA wire continues throughout and doesn't get hidden within the object/class wire that the purple headered library uses. Is this the same as "none"? I don't know much about this particular serial setting. In LabVIEW, I noticed that "RTS only" is not an option. In the other software, flow control is set to "RTS only", and it doesn't read correctly if I change it to RTS/CTS.
#LABVIEW MODBUS SERIAL EXAMPLE SOFTWARE#
In terms of the port settings, I checked them again and the defaults are the same as the Omega software except for flow control. It is completely unlocked so you can drill into the subVI's and see what is happening. I used that from early on before the newer ones came out and has always worked for me. Take a look and try an older Modbus library given here.
#LABVIEW MODBUS SERIAL EXAMPLE PASSWORD#
It is hard to know because those VI's are password protected. Perhaps there is a bug, or they never programmed it to. Strange, I would have thought it would close it down. I have to keep "VISA Close" in there in order for the other software to be able to access the port. I can't access it from the Omega software I mentioned earlier. When I deleted "VISA Close," the port is left open. I changed the register address, but I still get the same error. Thanks for the quick reply RavensFan, quick update: It will close out the VISA Resource and also clean up all the stuff associated with the modbus class wrote: Use the Modbus Shutdown VI that is in those palettes. And those numbers are low enough that the device should work just fine. So change 40049 to 48 and see what happens.Īs for your query delays, I've never needed to worry about them. While modbus talks about registers such as 40049, in the actual communication protocol, you drop the prefix 4, and subtract one (because the real addresses are zero based.) (It uses a default of 9600 baud since nothing is wired in.)īut the problem I see is with your Modbus Read. But I don't think you need to use the Serial Configure because all of the settings should be handled by the New Serial Master subVI. You should also disable the terminal character. You haven't wired anything into the configure, so you are using all the defaults. Are you sure you've got the serial port settings correct?
