Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I generate a signal and then a sample 10us later?

Hi all,
 
I am working on some code to test a circuit and we have to generate a pulse and sample a response from this circuit with in the uS range.  I know the loops in LabView have mS resolution, but with the real-time module, is there any way where I can run these programs and specify timing within the uS range?  We have a PWM signal that is 40kHz, which is 25uS period and I need to take measurements within this period.  I need to generate a signal, then sample abotu 10uS later.  I do not need to report data to this PC at this rate, but I do need to be able to sample and ideally respond to inputs at this rate.
 
Any thoughts?
 
Thanks much,
 
Jason
0 Kudos
Message 1 of 8
(4,781 Views)
Hello Jason:
 
From the functions pallete, go to "All Functions" --> "Real-Time VIs" --> "Real-Time Timing".
There are express VI's that can create timing with resolutions of ms, us, or ticks.
 
I hope this helps.  Please inform me if you have any other questions.
 
Message 2 of 8
(4,773 Views)
Hello Debonair!
 
You can reliably run loops on a real time target up to 1Mhz.  Therefore if you want to sample once every 10us your only restriction will be can your DAQ card keep up with a 100kHz sampling rate.  What RT target do you have and which DAQ card are you using?  Let me know and we will go from there.  Have a great day!
 
Allan S.
National Instruments
Message 3 of 8
(4,763 Views)

Hi,

The scenario is this:  We need to generate a pulse that lasts for about 25uS, which will turn on some FETs.  During the middle of that pulse, we need to measure some voltages, which should be sampled perhaps 10uS after the pulse has begun.  Then, we turn off the pulse and that is the end of the test.  We have a PXI chassis with a processor card and an old 6040E board.  There is also a 6602 card, but it seems like it might be easier to just use the 6040.  So, that's the test setup.

Thanks,

Jason

0 Kudos
Message 4 of 8
(4,762 Views)

Hello JasonWB!

Here is the issue.  The RT loop can run at 1MHz which means you can do timing you need i.e. start 10us after the 25us pulse has been generated.  The next question becomes how frequently are you generating this pulse and subsequently sampling.  Since it is a 25us pulse it seems the fastested you would sample would be once every 25us or 40000 samples/s (40kHz).  The MAX sampling rate on a 6040E is 500 kHz for a single channel.  I don't see any problem with performing the operations you have described.  Let me know if you have any more questions.  Have a great day!

 

Allan S.

National Instruments

Message 5 of 8
(4,748 Views)
Thanks for the response,
 
We are testing some FETs and will only need to perform this test once - well 10 times actually, but those are separate tests.  The timing is a little different than I had stated.  Here is a more up-to-date scenario:
 
1.  We generate a positive pulse on a discrete output
2.  40uS later, we read in 8 analog voltages and save them - we need to do this in less than 10uS
3.  60uS after that, we read in the same 8 analog voltages - no time constraint
4.  We then shut off the pulse
 
That's about it and it sounds like from what you're telling me I can do this.  I am not really running in a loop, but I will probably have to use the uS delay from the Real-Time palate as suggested in a previous post.  Any loop would simply loop through the 10 identical channels with some minor set up in between.
 
Thanks again!
 
Jason
0 Kudos
Message 6 of 8
(4,743 Views)

One more thing... we are using a 6040E card to do this.

Thanks,

Jason

0 Kudos
Message 7 of 8
(4,741 Views)
Hello JasonWB!
 
The only problem I see is that you want to sample 8 channels in 10us. This means you need to sample a channel every 1.25us.  Sampling every 1.25us yeilds a sampling rate of 800kHz.  The fastest your board can sample one channel is 500kHz so you can see this is too fast.  I believe you will need a DAQ card with a higher sampling rate to successfully complete this task.  Let me know if you need more information.  Have a great day!
 
Allan S.
National Instruments
0 Kudos
Message 8 of 8
(4,730 Views)