02-27-2012 01:19 PM
Hi
I'm using NI PCI-60l40E to acquire current. I have 9 inputs which for each one I must check if the amplitude of the signal stays between [-x,x] (x is constant that I get from a .txt file for example x = 0.2) for 100 milliseconds according to the result I get a Boolean (true or false). My problem is that I can't follow the signal for 100 milliseconds because I can't extract the time from my signal which is a dynamic data and I don't want to use arrays to avoid memory saturation because I will have more inputs later.
02-28-2012 04:24 AM
I really need help can someone give me an idea please
I've made a search in this forum and I found an idea to use Get date/time in seconds but I need somthing more accurate since I'm working with milliseconds
02-28-2012 04:39 AM
02-28-2012 08:56 AM
Hi Mike, thanks for your reply.
I don't think that DAQ sample clock will solve my problem. What I'm trying to do sounds simple, I'm acquiring a waveform and I must check if its amplitude is less than 0.2 and greater than -0.2.If the waveform didn't exceed the limit during 100 msec than I receive 'True' else I'll receive 'False'. Any suggestions?
02-28-2012 09:14 AM
Set up your acquisition as I explained in my last post and each time through your test loop read the number of points required to represent 100msec of time. Then compare the resulting array to your limits. Use the In Range and Coerce function as it is polymorphic and can handle arrays. It will generate an array of booleans, AND the array of booleans and if the output is TRUE all is well with the world.
Mike...
02-28-2012 04:22 PM
Hi again Mike, I really appreciate your help 🙂
Well I've tried your suggestion and it works. But let me give you more details, after switching off a contact I'll have a switch bounce phenomenon which I'm supposed to measure the time that it takes and after that I must check that my waveform stays in range for 100 msec, that's why I need to extract the abscissa (from the X axis) of the point just after the bouncing of the signal and start tracking my waveform starting from that time. I've attached a photo to explain more. Thanks
02-28-2012 04:59 PM
Ok, when you set up your acquisition process configure it for gapless acquisition that means that the samples from one read can be appended directly to the samples from the previous acquisition. Hence, if a bounce starts right at the end of one acquisition cycle, the rest of the data will be in the the beginning of the next one without any gaps in time. Check the examples that ship with LV they can show you how to set things up.
Mike...
02-29-2012 02:28 AM
It sounds interesting, but considering that I am still a beginner at LV, it is a little bit difficult for me to do it, I tried to use Append Waveforms VI but I couldn't find a way to add the rest of the data at the beginning of the next one as you said, also I've search in examples but I didn't find what I need.
02-29-2012 08:28 AM
Checkthe example Cont Acq&Chart Samples-Int Clk.vi. It acquires data continuously at whatever rate you specify and sends it to a chart. The datatype it acquires is a waveform but you can change that by selecting 2D DBL from the polymorphic VI selector below the analog read VI.
I would recommend a producer consumer architecture where you have one loop (based on the example) that acquires the data and a second loop that processes it to identify bounce enevts and do the timing.
Mike...