LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending TTL via RS-232 serial port

Hi,
I want to control a stepper motors using the RS-232 serial port. The motor already has a RS-232 to TTL cable adapter. There are 5 inputs and 1 output pins on the DB15 connector. In3(1022)   In5(1) In7(1) In8(1) In9(1) Out6(0). Each of these pin can receive a motion profile command depending if it detect a high or low Signal. My question is how can you send a high or low signal via the serial port. If you need any more information you can check this URL or the motors user manual http://www.excitron.com/Store.asp?m=Excitron&n=14&k=4140&s=Controller+User+Manual&popup=1.
 
Thank you,
Jean-Félix Péloquin
0 Kudos
Message 1 of 5
(5,106 Views)
The document you posted a link to explains how to control a stepper with a communication program like Hyperterminal. To do this in LabVIEW, you use VISA Write to send commands over the serial port. The way I read the manual, you have another 5 input pins and one output. If you also need these pins, then a second serial port could be used for three of them (you only have three outputs on a serial port) or I suppose you could use the parallel port.
0 Kudos
Message 2 of 5
(5,103 Views)

Bonjour Jean-Felix.  Since your DB15 has 5 TTL inputs, using the serial port is not a good idea.  You can control the lines on the serial port called DSR, CTS, and CD (or DCD).  As Dennis mentioned, these are only 3 lines.  What exactly does your serial to TTL converter do?  Does it take bit zero from the 8-bit received data and send it to one of the 5 inputs, bit 1 to another, and so on...?  That would be ideal.  If not, I would either use the parallel port, you would have to build your own cable.  There are parallel port examples that come with Labview.  The best solution is to use a DIO board.  You can buy a DIO device that connects to the computer through USB.  These are low cost, about $99.  They provide 24 lines of TTL in and out.  This is more than enough for you to use.  You would still have to build a cable to connect the DIO to the DB15.  There are also DIO boards that plug into a PCI slot inside the computer.  These are more expensive, around $300.  With these, you have to buy a cable and terminal block to make connections to your device.  The USB-DIO is probably the best to use.

- tbob

Inventor of the WORM Global
0 Kudos
Message 3 of 5
(5,089 Views)
Thank you for your answers,
I had just misunderstood the meaning of the 5 "other pins". I Taught It was part of the DB 15  cable. I think I'll be using some kind of cheap DIO board as you suggested since I already own one.
 
Regards,
 
Jean-Félix Péloquin
0 Kudos
Message 4 of 5
(5,082 Views)

The unit you appear to have, the FTFc15 is controlled by the serial port. The "RS232 to TTL" is just an adapter to change the levels from the "possible" +/-10V of the RS232 spec to a 0 to 5V TTL level. So basically you need to write a driver that converts motion commands in whatever syntax you desire to the command set of the FTFc15 and then use the VISA LabVIEW functions to talk to a serial port to which you have connected the converter.  There is no need to buy a DIO card, it would just make your life very much more complicated. You would then have to write a driver that would convert the FTFc15's (ASCII) commands to serial, send them out over the DIO, etc., with correct timing, etc. Whew that would be a lot of work!Just use VISA, your serial port and the ASCII commands listed in the programmer's manual.

 

Putnam Monroe
Senior Engineer
North Shore Technology, Inc.

Message Edited by LV_Pro on 07-08-2005 07:48 AM

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 5 of 5
(5,073 Views)