LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

rs485 problems

Please could anyone help with this rs485/labwindows problem:
 
I'm trying to drive a  32 axis stepper motor controller from a labwindows application - it is controlled with an rs485 port. We are upgrading the pc and the software. previously it ran from an rs232 port with a CAB04 conversion cable. But it didn't run very well - query commands to the controller often came back with rubbish in the buffer. So we bought a pci card with an rs485 interface to get round this problem. But i can't get it to talk to the controller at all - i've tried alot of different things with no success. the new card also has an rs232 port - if i plug the old CAB04 cable into this everything works as it did before (including the rubbish in the buffer). I'm pretty sure the basics are right:
 
the right COM number, right cable - i've tried a straight 9 pin connector and an rs485 null modem cable. The controller data sheet says its 4 wire, so i'm using the duplex jumper settings. baud rate, parity and stop bits are all correct. Do I need to use the SetComEscape function? this is mentioned in the labwindows help but i'm not really sure what i'm doing with this function. The controller is 10 years old so the original supplier can't help.
 
Any suggestions would be greatly appreciated as i'm pretty stuck.
 
Nick
0 Kudos
Message 1 of 3
(3,260 Views)
nickev -

Do you know if the controller is expecting to see one of the control lines asserted?  e.g. CTS, RTS?

A null-modem cable is often more than just crossing RD and TD. 

RS-485 can be tristated, and you must have some way of enabling the driver (take it out of tri-state).  Some implementations use RTS to do this, some do it automatically.  If  you have a master / slave setup, that has to be coordinated (one node a master, the other a slave).  You might also have to establish bias resistor values to get things to work, and perhaps terminating resistors as well.

There's info on this at www.bb-elec.com/tech_articles/rs422_485_app_note/

Also en/wikipedia.org/wiki/RS-485

Menchar
0 Kudos
Message 2 of 3
(3,249 Views)

Before connecting the port to your application, verify that it is working.

You can do it by openning a hyper terminal window, and use the NULL modem cable you've got. Also, look at the example on Serial communication in LabWindows.

M.

0 Kudos
Message 3 of 3
(3,214 Views)