10-07-2010 04:22 AM
Hello everybody
Im realtivly new to the labview enviroment and I hope some of you can help me.
My problem is that I am trying to generate a TTL signal with Ni USB-6008 that I can use to communicate with a Little-Step-U controller.
I have tried to use the DAQmx assistant to generate the signal but without luck.
What I need the VI to do:
Front panel input for binary or asciicode
Ex: command: "E1000" tells the little step controller to make 1000 steps/min
In binary:
01000101
00110001
00110000
00110000
00110000
baud rate: 2400
My thought was that i could build an array that contained the binary or ascii code which I then could connect to a DAQmx to write the signal to the controller. But, I cant get it to work.
Any help would be appreciated
/rasmus
10-07-2010 07:54 PM
Your problem has nothing to do with your inexperience with LabVIEW. It is understanding the hardware. A USB-6008 simply cannot be used for serial/RS-232. communication. Google for "RS-232 TTL" and buy an appropriate converter.
10-08-2010 03:43 AM
Hello Dennis
I was getting to that conclusion myself...
I was just confused by the ttl compatibility listed in USB-6008 datasheet. Does this mean that the 6008 only can accuire ttl signals?
Then if I buy a RS232 to ttl converter then it would be possible to use a simple serial visa to write the commands?
And thanks for the answer
Regards
Rasmus
10-08-2010 07:45 AM
The MAX3232 IC along with 4 0.1uF capacitors will convert RS232 to TTL. Using this and a RS232 COM port may be easier as you can use the receive buffer to your advantage to capture the response from the controller. However, this is not a requirement. Looking at the spec sheet for the controller shows that the communications is 2400 bits per second Serial TTL. The commands are recognized by the start "{" and stop "}" bit pattern. It appears to me that the the 6008 should be able to control it directly by clocking in the commands a bit at a time as long as you don't clock the command in too quickly.
10-08-2010 08:58 AM
The USB-6008 can both generate and acquire TTL digital signals. TTL logic is only defined by voltage ranges for "high" and "low" states and some specs for rise time. RS232 TTL communication has a much more expansive set of requirements for timing and pattern generation.
These are the requirements for TTL generation:
For a TTL compatible input or output, there is not requirement for minimum pulse width or anything like that. The USB-6008 is compatible with the above requirements for TTL logic, but is software timed so pulse widths, time between pulses, and many other traits of a digital generation will have a fairly wide variation.
RS232 TTL communication requires all of the above, plus timing and pulse width requirements. As a result, a digital output can be TTL compatible, but not usable for RS232 TTL communication because it isn't required to meet the RS232 timing specifications.
10-08-2010 09:03 AM - edited 10-08-2010 09:04 AM
Maybe it is easier to use a USB device.
A FTDI FT232 is a USB Uart with TTL level I/O.