06-21-2013 06:31 AM
Dear All,
i'm a Labview-newbie (using Lv 2010) and struggling to learn... What i'm willing to do is quite simple - i have a voltage signal 0-10V from a LEM sensor, which i'm reading with a PCI-6221 via BNC-2110 board. This signal contains some peaks (variable, occurring with max. 400-500 Hz) which i would like to trigger. If a peak occurs, an analog voltage output signal with adjustable delay and adjustable "signal high"-time should be set to turn on a valve. The output signal has to be synchronised to peak occurrence, hence i cannot output a squarewave signal with a defined frequency.
The reading part works great with DAQ assistant wizzard, but i'm struggling with the triggering. If i use "Trigger and Gate" from Express library, i'm getting just the first trigger from the read samples. What i'm aiming for is a trigger and according output signal for each pulse that occurs. With the "Trigger" from DAQmx library i've also didn't achieve what i was hoping for... I was already so far to implement a small microcontroller board to do that (something i did for an I2C communication after failing in Labview), but then decided to give Lv a one last chance. I didn't attach the VI, as it's just a DAQ assistant wizzard based read and a graph...
Do you have any ideas how to solve my problem?
Thank you in advance!
Cheers,
Michal
06-21-2013 07:50 AM - edited 06-21-2013 07:52 AM
Just an idea:
I would use the counter/timer for your pulse generation, one for the delay one for the duration
Configure the analog trigger to the level from the LEM and route the trigger event to the counter.
Configure for finite aquisition with only one sample and rearm the task
For analog sample AI0 has to be used (if I remember rigth)
Maybe the trick to get all events is to specify number of samples to match the delay time and use the event as a start event for the pulse out counter.
I don't know if the DAQmx with the 6221 support multiple record aquisition...
Last exit: Use a DIY comparator to generate a digital input for the timers...
06-24-2013 10:50 AM - edited 06-24-2013 10:51 AM
Hi Henrik,
thank you for your advice. I tried the whole morning to get it working with counters today and the only thing i was able to achieve was a non-synchronous triggering. So i decided to get out my trusty small microcontroller boards and was ready within 2 houres with it... Labview vs. microcontroller is now 0:2 down, not good.
Nevertheless, i'm setting my parameters (delay & pulse time of my output signal) via usb and would like to implement it to Lv, as this is supposed to be my main control environment.
Cheers,
m.
06-24-2013 03:31 PM - edited 06-24-2013 03:33 PM
Don't mind 😉
I would have used a LM399 , 555 or 4093 and real buttons for the delays 😄
03-14-2016 07:31 AM
Dear all,
I am using a PXIe-5171R oscilloscope for a data acq. application. I need the streams from all 8 analog input channels where one these 8 channels has to be used as my external analog trigger source (I use channel 0) . The problem I currently face is that with the use of the code I've attached to this post, I can acquire a finite number of samples from all channels or I have the option to acquire infinitely so long as the memory isn't full. When the latter happens, the acquisition process doesn't distinguish between post-triggered and pre-triggered data, therefore they are all included in the samples also, I ca not determine for how many trigger pulses I want the acq. to be performed. I have tried to fix this problem with the DAQmx functions but this particular device (5171R) is not supported by DAQmx. I would really appreciate it if someone can kindly help with a modification to the code that allows me to acquire data in continuous fashion only after a certain threshold in the trigger signal is achieved and also to be able to determine for how many trigger pulses the acq should run . Thank you in advance. All ideas are welcome.