Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

ttl generation with ni-usb-6008

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

0 Kudos
Message 1 of 6
(5,009 Views)

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.

Message 2 of 6
(4,990 Views)

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

 

0 Kudos
Message 3 of 6
(4,980 Views)

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. 

0 Kudos
Message 4 of 6
(4,973 Views)

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:

 

  • 0 V to 0.8 V = logic low
  • 2 V to 5 V = logic high 
  • Maximum rise/fall time = 50 ns 

 

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.

Seth B.
Principal Test Engineer | National Instruments
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 5 of 6
(4,967 Views)

Maybe it is easier to use a USB device.

 

A FTDI FT232 is a USB Uart with TTL level I/O.

0 Kudos
Message 6 of 6
(4,964 Views)