Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Using FPGA instead of DAQ card

I'm currently using a PCIe-6351 to acquire an analog signal, trigger on a rising analog edge, and output a TTL pulse (via counter out) to two other devices when the analog trigger is received. I would like to reduce the time delay as much as possible between when the trigger level is reached and when the TTL pulse is sent, and I am considering bypassing the DAQ card altogether for this task and using some other custom hardware to generate the TTL trigger signal.

 

In the past, before we had an NI DAQ card to generate the TTL trigger signal for this sort of thing, an analog circuit was built using a comparator--for setting the trigger level--and a timer and some other circuitry (that I'm not familiar with) to set the TTL pulse width. While this did provide for a fast response, it wasn't particularly user friendly if we wanted to change the trigger level or pulse width. (Changing the trigger level and/or pulse width required physically replacing resistors and capacitors on the board.)

 

Now we're considering using an FPGA to perform this triggering task. Not only because setting the trigger level and pulse width would be simpler, but also because one of our secondary goals is to be able to programmatically change the trigger level while our analog signals are being acquired by the DAQ card. At a glance, it would seem that in order to accomplish this we would need an FPGA, an A/D converter for receiving the analog signal, and an amplifier for ensuring that our TTL output can source enough current to trigger the devices.

 

In particular, I am curious if using an FPGA and A/D converter to receive the analog signal and output the trigger pulse would be faster than using the DAQ card in the way that I do now. Also, for those of you with experience with FPGAs, where can I find economically priced FPGA kits? I imagine that it won't go over well with my supervisor if the cost of such hardware exceeds a few hundred dollars.

 

Also, if I am misguided in believing that an FPGA will help with this task or if I have failed to describe my task well enough, by all means let me know.

0 Kudos
Message 1 of 10
(4,897 Views)

I assume you have to find the trigger in your software to output the counter?  Then yes, an FPGA will be much faster.

 

While reading your post, I was thinking you should change over to a RIO card or cRIO system.  But that would cost more than you want to spend (plus requires LabVIEW FPGA).

 

As far as dev boards, I'm not well versed in those at all.  If you get with Xilinx or Actel, I'm sure they would be able to hook you up.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 10
(4,891 Views)

You should be able to set up the DAQ tasks to trigger the TTL signal from hardware.

 

Specifically if you use the Analog Comparison event to generate a start pulse and configure the counter output task to trigger off of it and be retriggerable you will not have use software timing at all. This would remove any issues relating to the speed at which the output pulses are generated relative to when the input level was reached. I can confirm that this is possible with the 6351 that you have.

 

Some methods are discussed in these examples:
https://forums.ni.com/t5/Archive-TKB/Counting-Analog-Input-Periods-Using-Analog-Comparison-Event/ta-...

https://forums.ni.com/t5/Example-Code/Retriggerable-Analog-Output-with-Analog-Trigger/ta-p/3502824

https://forums.ni.com/t5/NI-DAQmx-Examples/Finite-Analog-Voltage-Acquisition-using-Analog-Start-Trig...

 

Regards,

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
0 Kudos
Message 3 of 10
(4,858 Views)

Hi Craig_,

 

Would you be able to tell me if this is also possible on the PCI-6230?

 

Thanks,

erop

0 Kudos
Message 4 of 10
(4,800 Views)

Hi Erop,

Unfortunately the Analog Comparison event requres a DAQ card to have analog triggering. If you compare the specifcations tab on the product pages of the PCIe-6351 and the PCIe-6320 under "Triggering" you will note that the 6351 supports both analog and digital triggering (where the analog provides this functionality) and the 6320 supports digital triggering.

Regards,

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
0 Kudos
Message 5 of 10
(4,786 Views)

Thanks Craig_,

 

Would the solution then be to build an analog comparator circuit, and feed that into a digital input for triggering? 

0 Kudos
Message 6 of 10
(4,778 Views)

Erop,

 

That would be one solution to triggering a task on an analog level. It would however take a lot of work on your part and may make it hard to take Hysteresis into consideration. I have included some more documentation on this topic below.

 

Software Triggering: https://forums.ni.com/t5/NI-DAQmx-Examples/Continuous-Acquisition-with-a-Software-Analog-Start-Trigg...

 

Supported Trigger Types for X Series, M Series, E Series, C Series and B Series Boards: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kIhASAU&l=en-US

 

What Analog Channels Can I Trigger Off Of? https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000PAqISAW&l=en-US

 

What Is the Difference Between an Analog and Digital Trigger? https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019YDQSA2&l=en-US

 

The biggest question here is: How fast do you need to react to an analog level?

 

Analog Triggering gets you ideal response time, but many application's requirements can be met with software triggering as well.

 

Regards,

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
0 Kudos
Message 7 of 10
(4,769 Views)

Hi Craig,

 

I use the PCI-6230 because it is bank-isolated, which eliminates noise in my measurement when I apply analog output and measure analog input. I need to apply a trigerred output in response to an analog event within 10-50 microseconds. Typically there is a ~1 V change in the analog signal during the event, the RMS noise is ~0.05V, and the rise time of the signal is ~4 microseconds. I'd hope to use a threshold of (V_rms - 0.5V) for the trigger. I appreciate your help.

 

Thanks,

Erop

0 Kudos
Message 8 of 10
(4,751 Views)

Hey Erop,

 

Firstly I mistakenly read your card as a 6320 instead of the 6230 which you are using (It still does not support analog triggering unfortunately).

 

Your timing requirements rule out the software timing option.

 

Since this card uses ditital triggering you will need to generate a digital trigger from this analog signal as you mentioned previously for this to work.

 

Does that answer your question?

 

Regards,

 

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
Message 9 of 10
(4,743 Views)

Yes, thanks for your helpful advice, should I find a solution I'll be sure to post it.

0 Kudos
Message 10 of 10
(4,716 Views)