Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

TTL signal generation and control for valve

Hi,

 

I am very new to NI and LabView and I need some help.

 

I have a fluidic valve that I need to provide a control signal to. The control signal is a 0-5 Vdc TTL signal (ON/OFF) that is used to regulate two power inputs to the valve (24V and 3.5V) which opens and closes the valve. 

 

I need to be able to precisely control this signal in terms of frequency and duty cycle. I also need to be able to provide both a continous signal and a single pulse signal.

 

Basically, I need LabView and the DAQ to serve as a function generator to provide a controllable 0-5V TTL signal.

 

My questions are what kind of DAQ do I need in terms of inputs and outputs (digital, analog, counter?) and how would generate this TTL signal in LabView?. I have this NI 9205 module and with a cDAQ-9172 and a cRIO-9204 chassis but I think the module is input only. I believe I need input and output.

 

Thanks!

0 Kudos
Message 1 of 8
(7,726 Views)

Hello Alex,

It looks like you need a digital output module. In order to be more specific than that I would need more information:

 

  1. How many digital (0-5V TTL) outputs do you need for your application.
  2. How many digital (0-5V TTL) inputs do you need for your application.
  3. What current requirements do you have on your digital outputs? Sinking or Sourcing? 1 μA, 1 mA, 1A drive current?
  4. What about for your inputs?

It should be possible to find a digital module(s) for your application, but more information is needed.

Regards,
Dan King

Message 2 of 8
(7,703 Views)

Dan_K,

 

1. As of right now I need only 1 digital output but in the future at least 2.

2. Right now only 1 input but in the future at least 2.

 

I am really not sure about current requirements for input and ouput. In the manual the driver circuit does not give any indication of current requirements. All it says is that I need a 0-5 V TTL signal.

 

Also I am wondering. Would it be possible to use an analog function (a 0-5Vdc square wave) to to the same thing as the TTL signal?

 

Thanks

 

 

0 Kudos
Message 3 of 8
(7,700 Views)

Hi Alex,

 

Given that you already have a cDAQ chassis, I'd start by looking into the 9401 or 9402.

 

The 9172 has two counters built into the backplane which can be accessed by putting a clocked DIO module (like the ones listed above) in slot 5 or 6. 

 

If the module is in slot 1-4, it can be used to perform correlated digital I/O.  That is, you can clock an arbitrary bit pattern out (or acquire the digital waveform) based on a generated sample clock.  You'd probably end up using either the Frequency Output or one of the on-board counters to generate your sample clock.

 

 

I think for you the best bet is likely to go for Correlated DIO since you would have the option to scale this up to more lines (4x 9401s would give you up to 32 clocked DIO lines).  The direction of the lines on the 9401 is configurable by nibble (e.g. lines 0-3 could be outputs, lines 4-7 inputs).

 

The drawback with using correlated DO is that you would have to build the appropriate digital waveform to give you the frequency and duty cycle that you needed.  The counters are very easy to program to do this, and use an 80 MHz timebase so you can get better resolution than you would on the DO lines.

 

 

Can you elaborate more on your timing requirements for both inputs and outputs?  What do you need to measure on the input?

 

 

If you do just need 2 inputs and 2 outputs and it makes more sense to use counters, you could switch over to one of our newer cDAQ chassis (e.g. 9174) or X Series boards which have 4 counters available.  Counters can be used to generate pulses or to measure things like digital frequency and duty cycle.

 

 

You could technically use an analog output, but it's probably not ideal.  I would be worried about the glitching of the DAC causing duplicate edges to be detected (although maybe that's not an issue for your application).

 

 

If you want to program on the cRIO that's also an option, although it might be a little more difficult to get started and it doesn't sound necessary for your application.

 

 

Best Regards,

John Passiak
Message 4 of 8
(7,679 Views)

Hi,

 

Thanks for all the help. I found out some more information from the supplier of the valve.

 

The control signal apparently requires 10-20 mA of current.I believe I would need a sourcing digital output because the DAQ is providing the voltage and the valve is the load and grounded. Does that sound correct? I looked at the specs for the 9401 and I think its sourcing current is only 2 mA. So I'm guessing that module would not work?

 

 

Also in correcting in what I said previously as I didn't understand how the DAQs work, I don't think I need any digital inputs as I'm not measuring anything or reading from another channel, instrument, etc.

 

I think I only need digital outputs that would be capable of sending 0-5 TTL pulses that I can control frequency and duty cycle to my driver circuit. The TTL signals need to have a very fast rise time in order to trigger the timing chip in the driver so I'm guessing the timing req's on the output need to be fast.

 

Thanks again

 

Alex

0 Kudos
Message 5 of 8
(7,661 Views)

Hello Alex,

In this case I would recommend the NI 9474. You will have to supply an external 5 V power supply, but this will be able to supply the current you need for your relays.

Regards,
Dan King

0 Kudos
Message 6 of 8
(7,642 Views)

Hi Alex,

 

I see that you used a dispensing valve. I am having similar problems. I am using a VHS valve from the LEE company. The driver requires a control signal (TTL signal), which i have managed to generate (0/5V). The problem is that when purging the valve, the TTL signal must be cycled at different frequencies. I don't know how to do this.

What solution did you come up with? Your comments will be highly appreciated!

 

regards,

/Dan

 

0 Kudos
Message 7 of 8
(7,102 Views)

Greetings Dan,

 

I might suggest taking a look at the following DevZone example to see if it provides any insight into achieving the type of output you are after.

 

Generate a Continuous Digital Pulse Train With a Variable Frequency Using Event Structure

https://forums.ni.com/t5/Example-Code/Digital-Pulse-Train-with-Frequency-Update-using-Event-Structur...

 

Hope this helps.

 

Michael G

Michael G.
Applications Engineer
National Instruments
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Self-realization: I was thinking of the immortal words of Socrates, who said, "... I drank what?"
0 Kudos
Message 8 of 8
(7,077 Views)