02-19-2008 02:48 AM
02-19-2008 06:44 AM
According to the cFP docs, 485 port does not support 2-wire mode. Out of curiosity I ran a couple of tests and found that while it might work sometimes, 2-wire mode is not reliable on the cFP 485 port.
In my case I ended up purchasing rs232-rs485 adapter that could handle 2-wire mode and used the 232 port on the cFP.
02-19-2008 11:08 PM
According to the cFP docs, 485 port does not support 2-wire mode. Out of curiosity I ran a couple of tests and found that while it might work sometimes, 2-wire mode is not reliable on the cFP 485 port.
In my case I ended up purchasing rs232-rs485 adapter that could handle 2-wire mode and used the 232 port on the cFP
I readout so many answers on the NI site that they used Rs-232 to RS485 adapters. But my simplest queation that if RS-485 Port is available on the cFP-2120 then why we need some external adapter.
Ok. i agree that 2 wire will not give consistent results. can you please explain me how i can use my 4-wire RS-485 device.
Also i have one RS-485 to RS-232 Adapter, can you please tell me how i can use that using the installed port on the cFP-2120.
I am new to Labview, please give information in detail.
02-20-2008 07:19 AM - edited 02-20-2008 07:23 AM
Let me clarify. It is only when interfacing to a 2-wire 485 device that you need the adapter. The cFP 485 port will work just fine with a 4-wire RS485 device.
To use the 485 adapter simply wire it between the 2-wire device you need to communicate with and the RS232 port on the cFP. The documentation for the adapter will tell you what connections need to be made. The cFP documentation contains pinout information on its serial COM ports. The manual for your 2-wire device should have info as well. The vi on your cFP then uses the NI-VISA functions to communicate to the RS232 port.
Suggest you see this thread for Ravens Fan's very good explanation of differences between RS232 and RS485. http://forums.ni.com/ni/board/message?board.id=110&thread.id=6102
02-22-2008 10:45 PM
Ok. Thanks for the link. but it is suggesting the RS-232 to RS-485 converters.
I want to use the RS-485 Port installed on the cfp-2120. so i should't need any RS-485 to RS-232 converter. As my device is RS-485 itself with 4 wire.
I purchsed a RJ-50 connector, so can anybody tell me the wiring of RJ-50 with my 4 wire device.
As my cfp-2120 support RS-485 communication, so why i need these converts.
Also guide me how i can configure my RS-485 Port in VISA.?
I m new to Labview so i m asking these basic question.
02-23-2008 10:20 PM
I am a little confused by your statement "I have cFP-2120 with one RS-485 Port, One RS-422 and one RS-232 Port available". The cFP-2120 has 3 RS-232 ports and only 1 RS-485 (or RS-422).
Look in the manual for the cFP-2120. Here is a link. http://www.ni.com/pdf/manuals/371380b.pdf Pages 3-7 thru 3-10 have information and pinouts for the serial ports. It also tells how the RS-485 port is a 4-wire port, but it can connect to a 2-wire RS-485 installation with jumpers and special programming to account for the echo back of outgoing commands. Another alternative to 4-wire to 2-wire conversion is to get an RS-485 isolator that would have switches to set one side to 4-wire and the other side to 2-wire. I have used this one from B&B electronics successfully. Though you say you are using 4-wire on your device, so you would not need it unless you have the need for electrical isolation between the device and your cFP. Perhaps the discussion of 2-wire was a misunderstanding.
Remember that the transmit lines from your device will go to the receive lines of your cFP and vice versa. The polarity of + and - should match between the two devices. TX+ to RX+, TX- to RX-, RX+ to TX+, RX- to TX-, and GND to GND)
As for VISA, you would just configure it like you would any RS-232 device with the baud rate, parity, and stop bits to match your device.
Centerbolt, thanks for the kind words and posting the link to the other thread.![]()
02-24-2008 10:59 PM
Ravens Fan
It's kind of funny that the manual talks about 2-wire mode when NI does not recommend or support 2-wire mode on the cFP 485 port. When NI couldn't give me a good answer as to why, I ran some tests of my own. My own testing revealed a serious gottcha. What I discovered was that the cFP 485 port was very slow when it came to letting go of the Tx drivers after a transmission from the cFP. This meant that if I sent a command to a 485 instrument and it replied too quickly, the data was lost because of the conflict between the two ports.
02-24-2008 11:22 PM
02-24-2008 11:35 PM
Ravens Fan,
A lot of the adapters use a 555 timer configured as as retriggerable one-shot to control direction. Timer is triggered when data is transmitted from the RS232 side. The baudrate switches change the timing (resistor in RC of timer )of the one-shot. Timeout is usually set to be about one byte long. I've even built several from scratch to build into some stuff. I should post the schematic one these days.