04-29-2013 01:13 PM
Hi-
I have successfully used RS232 library to communicate with one RS485 device. I now have multiple devices using the same Rx and Tx lines. Three of the 4 devices have their own dll and can communicate effectively despite each other. My problem occurs when the one device I am talking to using the RS232 library now has to share the lines with the other devices. Are there any ways around this? All I can think of is to see if I can use the NI Serial library commands with my non-NI PCIe card. OR, buy the NI 485/422 card and use the NI Serial commands. Any other suggestions?
Thanks.
04-30-2013 11:53 PM
The only interfaces you can connect with NI Serial are in the read me file.
http://download.ni.com/support/softlib//serial/Serial%20NickD/WIN3/Win32/readme.html#PciInterfaces
I can't think of much else to suggest but using NI Serial commands.
05-02-2013 02:30 AM
I think the problem is that you cannot control the TX driver of the 4th device.
Using the RS232 library does not mean that the board cannot have its own driver.
I believe, that 4th device does probably have some advanced settings in its Properties window in Device Manager.
There you can set it to automatically turn off its TX driver when not talking.
After that you should still be able to control the port with RS232 library and it will behave according to the settings in Device Manager.
We can use Fastcom Commtech boards (which are configured for RS422 by defualt) in RS485 mode without problems with the RS232 library using this method.
Hope this helps,
05-07-2013 03:39 AM - edited 05-07-2013 03:59 AM
The fundamanetal difference between RS232 and RS485 is the ability to connect to multoiple devices. The devices also normally work in a "speak only when spoken to" mode and this is achieve by adding a device address in the protocol. The NI serial library is oblivious to most of this and doesn't care if it's RS232 or RS485. The problem with your 232 device is that it will speak everytime when any other device is adddressed, so you should make it comply to 485 standards. This can be done with RS232 to RS485 convertors. You can do a search on Google for this. The ones I use and have the least amount of problems with is either from Advantech (<http://www.advantech.com/products/search.aspx?keyword=RS-232#search> and <http://www.advantech.com/products/search.aspx?keyword=RS-232#search>) or BB Electronics. (<http://www.bb-elec.com/Products/Serial-Connectivity/Serial-Converters/Port-Powered-RS-232-to-RS-485-...>)
Best Regards
05-10-2013 02:15 AM
Eren Balci is spot on, but if you cannot see anything in the advanced properties you might also want to check if your RS485 card has any DIP switches to set the mode. Ours has.
Marcel
05-10-2013 05:31 AM
Thank you all for the suggestions. I will check the dip switch settings on the board. The other thing I was trying to do was use the dll's that came with 3 of hte 4 devices. For each device, the dll needs to open the port. I think this is also a problem as the port should only be opened once, no matter how many nodes or devices are connected. Right? If that's the case, I will have to write my own ascii commands and not user the dlls that came with each device. Please let me know if I am wrong on this...
Thanks again for the help.