From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How to send a variable width TTL pulse using USB 6501

I am trying to send a TTL signal to a valve once a sensor has been triggered. The valve will need to open for different periods of time during different experiments to release a varying amount of liquid, is there a way of varying the TTL pulse width using a USB 6501 and LabVIEW 8.5?
 
Thanks  
0 Kudos
Message 1 of 6
(5,210 Views)

It depends on the timing requirements you have. The 6501 is software timed so you will have to depend on the timing resolution and jitter of windows. Use the timed loop/structure or use the wait/delay functions on the timing palette. At it's most basic, you would set the DAQmx Write to a high, delay x microseconds, set the DAQmx Write to a low.

0 Kudos
Message 2 of 6
(5,209 Views)
Perhaps  you  would want to make something a PWM, I have here a code that could be useful for you.
this have been made on borland C++ builder
 
 
 
 
0 Kudos
Message 3 of 6
(5,185 Views)
Did you ever figure out how to do this?  Because actually I'm trying to do pretty much exactly the same thing.  I'm actually having trouble even outputting the digital signal at all with my USB-6501.  I was initially trying to use DAQ Assistant, but then found out I probably shouldn't be using this and instead should be using the DAQmx individual functions.  I was directed by NI Support to look at the example "Gen Dig Pulse Train-Continuous.vi," but I haven't been able to figure out how to use this for my application.   For my project I  want to send a TTL signal to vavles that release fluids as well.  I have 3 2-way liquid releasing valves that I want to be synced so that only one is open at a time (for a user specified amount of time), and they open in a regular repeating sequence.  I also have another 3-way valve controlling a vacuum that I would like to be continuously pulsing, but for specified amounts of time (e.g., 3 seconds open, 3 seconds closed, and so on).

I believe I can figure out the logic and the programming involved with figuring out the exact sequencing and timing manipulation, however, I'm having trouble just being able to output any digital signal with a varying time.  If you could offer any help on this, it would be greatly appreciated.  Thanks!
0 Kudos
Message 4 of 6
(5,013 Views)
Hi

Yes (with help) I did figure out how to do this. I have a subVI with a sequence structure with a 'wait ms' function to vary the time the valve would be open. I was going to try and explain this but probabaly easier to attach it, however it's on a different computer at the moment  but if you look here

http://forums.ni.com/ni/board/message?board.id=170&message.id=306122&query.id=77904#M306122

I have asked a different question and included my valve (ventil) vi, if you look at the modified ventil vi then thats whats I'm currently using and it works fine (since then I've changed a lot to the main (Flowers) vi so just ignore the bit about it not sending the pulses properly, I'm not using a 'master-slave' design any more and it works better now).

 I have liquid valves, which get 12v and then the 5v TTL signal triggers the current. I did find that with some of the (probably older and not so good) valves, that I needed to add a resistor in to generate enough power to open them as was only getting about 3v out of the hardware due to the drain of the valves. But this may not be a problem for you........

Hope this helps!

George
0 Kudos
Message 5 of 6
(4,977 Views)

Hi,

 

I have looked at your thread and i am facing the same issues with my usb 6510 here. I want to trigger pulse train to switch on and off for the solenoid valves but do not know exactly how to do it. Can you attach your final files on?

 

Thanks in advance

0 Kudos
Message 6 of 6
(3,603 Views)