DAQmx Retriggerable Problem

Hello folks,
I am quite a new to LabView and would be glad to use some help and advices from more experienced people. Basically I am trying to make a vi that produces a square pulse of given width whenever the trigger is activated. The pulse width is the parameter that I can change from one trig to another or keep the same in which case whenever I launch the trig the pulse of the same width is produced.
Running through examples that I found on this forum and NI support I managed to make a vi that almost work.
http://forums.ni.com/ni/board/message?board.id=170&thread.id=267677
http://digital.ni.com/public.nsf/allkb/82C9F3C15F62974E86256EBA0058CAF5?OpenDocument
As you can see on the picture in order to change the pulse width I use "Pulse Width (ms)" local variable associated with While loop that checks if "Pulse Width (ms)" has been changed and if so, after the trig, makes the pulse with the new width. This part of program works.
The one that doesn't work is when no change in pulse width has been made. When I start a vi I can trig a pulse once but cannot re-trig it, unless I change the pulse width (I can change it to some new value then put back the old value and it will work but this is not convenient).
For some reason my task is not retiggerable when the False case occurs (ie. no change in "Pulse Width (ms)"), though the Start.Retriggerable parameter in property node is set to be True. Again, it works well in the True case, when there is the change in Pulse Width (ms) variable.
Could you please point out what mistake I am making and what to do to make False case retriggereable as well.
Thanks in advance!
(PS: I am using USB-6211 card.)
Solved!
Go to Solution.
Attachments:
PulseGen_Trig_BD_True.png ‏24 KB
PulseGen_Trig_BD_False.png ‏2 KB
PulseGen_Trig.vi ‏109 KB

Thank you for your reply Owen.
I found the error I was making. The variable "Pulse Separation" that feeds "CO Pulse Time" DAQmx event was set to 50 seconds (I didn't divide it by 1000 to make it in milisecond units). That means that even if I retrig for a new pulse immediatly after the first one, the new pulse would't show before the period of 50 seconds has elapsed (and I never waited for so long as my pulses are more in milisecond range).
Now it seems like a stupid error (and it probably is) but I thought that this variable was important only in the case of the multiple-pulse event (as set-up by "Timing: Implicit" DAQmx event). Actually, even if the "Number of pulses" is set to 1 (which was my case), it seems that though the retriggering works one won't see a pulse before "Pulse Separation" time has elapsed and that looked to me as if the retriggering did't work...
Anyway, thank you for your time Owen!
Cheers!

Similar Messages

  • DAQmx write problem

    Hi,
    I've designed a VI to send a ramp signal to a DA-converter but having difficulties executing it. The VI was designed and tested succesfully on a different system, but attempting to run it on my new system it does not work. The program simply won't finish. Using the highlight execution tool I see that the execution does not proceed from the "DAQmx write" box. Certainly this must be a problem related to settings or the software installed on my computer, but what might be missing? My system runs LabVIEW 2011 on Windows 7. I'd be very grateful if anyone out there could provide me with a helping hand.
    Attachments:
    VoltageRamp_ao0.vi ‏55 KB

    The vi will wait for 10 seconds and through an error if it is having an invalid task. Check the device name specified in the physical channel in the code and the MAX. Apart from that I don't see any problem with your code and it ran fine in my PC.
    The best solution is the one you find it by yourself

  • FTDI VCP driver NI-DAQmx driver problem...

    Hi,
    I am making use of FTDI VCP driver on Windows XP to talk to a FT245R device (through USB interface).
    I also make use of NI USB-6251card to capture signal data [pulse wave form] and make use of NI-DAQmx driver S/W to talk to the device connected to the NI card.
    I observed that when there's no read/write happening on the FTDI VCP driver,  DAQmxReadAnalogF64() returns the right data. But where there's a read/write happening on the FTDI VCP driver,  DAQmxReadAnalogF64 returns corrupt data.
    This happens even if the read/writes to FTDI VCP driver and the  DAQmxReadAnalogF64 to the NI-DAQmx driver are in two different processes.
    Could you please let me know if there's any workaround?
    Thanks a lot!
    -Abraham

    Hi Ali,
    Thanks for your response.
    By Corrupt data, I mean wrong data points. So if I request 100 data point, I will get the data count as 100, but the values are junk values.
    I took your suggestion:
    I selected the test panels and aquired samples. When the FTDI VCP driver was not being exercies, I can see the correct wavefor [regular bi-phasic pulse] in the amplitude vs samples graph. But when there's activity on the FTDI VCP driver (read/write), then the graph shows junk waveform (most of it is close to zero).
    The Systems is a dual-core CPU.
    Initially we though it was due to CPU bandwidth, but looks like CPU is used some 60%.
    A collegue of mine suggested that it could be that when both the USB [NI and FTDI] draw power at the same time, we could get junk values.
    I also tried a USB hub and did not see any change - same bad values.
    I really appreciate your response.
    Thanks!
    -Abraham

  • Daqmx read.vi timestamp incorrect problem (storing the timestamp from start task)

    Hello,
    I have a state machine with 1st state: configure DAQ where i have [daqmx create channel.vi --> daqmx timing sample clock--> DAQmx start trigger--> daqmx start trigger] connected in order
    sample clock in continuous mode, 10000 samples to read and sample rate 1000 Hz ,
    start trigger has rising edge selected with a dev1/PFI0 from a daq board.
    next state of SM is read channels which has daqmx read.vi set to 1d waveform  Nchan Nsamp.
    and the program first configures and goes to read channels state and is just waiting for the true value on PFI0,
    but the time stamp is not updated to current time/ when daqmx read starts instead it is getting the initial t0 from the time when it was in configure DAQ state of my SM in other words it stores the starting time when strart task.vi was run and then updates from then on.
    so in effect i am not getting the exact time stamp values while i am running the vi.
    i tried to build waveform by inputting the actual current time but the chart doesnot scroll and shows only few values each reading, when i tried to input the t0 from the waveform given out by read daqmx. vi, it then behaves normally..
    option #1 from this link says
    http://forums.ni.com/ni/board/message?board.id=250&thread.id=47648&view=by_date_ascending&page=2
    Try and do exactly what the driver does.  This
    will require you to do exactly what you are doing in the posted
    example.  Call the current system time immediately prior to calling the
    DAQmx Read and subtract dt * x where x is the number of samples already
    acquired.  This will require you to know exactly how many samples have
    been acquired.  This can be found by calling the Total Samples Per
    Channel Acquired property immediately prior to the DAQmx Read.  This
    introduces some points of innaccuracy.  For example, you're system time
    is already innaccurate to some amount.  In addition, it takes some time
    between calling system time, calling the total samples acquired, and
    calling the DAQmx read.  If 2 samples are acquired between calling the
    system time and total samples acquired, you could be off by a few
    samples.  For slower clock rates, you will have more accuracy. 
    but there are no samples that are acquired until the rising edge, so the number of samples is always zero before the read operation
    http://digital.ni.com/public.nsf/allkb/5D42CCB17A70A06686256DBA007C5EEA 
    this link says that
    and the number of samples in my waveform is constantly changing around 20-40, so i cannot really input the current time to build the waveform, thats what i can figure out for now..
    can somebody tell me why this is happening or is there any fix around this, how to get the current time into my daqmx read.viso it displays the currect time on my waveform chart
    Thanks,

    thanks,
    im using LV 8.6, daqmx driver 8.9.5.
    yes the program u posted get the currect time. but see attached program thats what i have in my program exactly
    if you took out the time to using the get waveform components using the waveform  from daqmx read. i still have the timestamp as the application start time. plz see attached code 8.2v and FP
    the waveform time x axis is not current, it is starting from the application start time.
    PS: samples to read = 10,000 and sample rate = 1000
    plz help..
    Attachments:
    daqmx read problemp.png ‏8 KB
    daqmx read problem.vi ‏36 KB

  • Finite pulse train generation​... how to count number of pulses?

    hi guys,
    this has probably been solved a hundred times but i just couldnt find it!!
    i have a pulse train generation happening on my ni usb-6211... using FREQ OUT, using a divisor on this, and routing it to PFI4.
    id like to update my VI so i can specify the number of pulses....
    im pretty much a noob at this stuff so any help would be greatly appreciated!! thanks!
    dan
    Attachments:
    pulse train generation.vi ‏25 KB

    Hi,
    No problem at all, we are here to help. What I’m going to do first is to point you to a bunch of examples for that might give you a better insight of the capabilities of the card in terms of finite pulse generation. What you should be looking at is called retriggerable pulse generation and here are some examples to look at: Retriggerable Finite Pause Trigger Digital Pulse Train Generation, Creating a Delayed, Retriggerable and Finite Pulse Generator, DAQmx - Retriggerable Pulse Train Generation - LabVIEW - CVI - ANSI C - VB.NET - C#.NET and Retriggerable Finite Pulse Train with Changing Pulse Specs.
    Let me know it helps
    Jaime Hoffiz
    National Instruments
    Product Expert
    Digital Multimeters and LCR Meters

  • Really need help (motor control using labview)

    hi all readers,
    im new beginner. really need help for my project. i've been assigned to monitor/control motor using labview 8.5 (using NI DAQmx). the problem is, the techinician told me that i cant use 3phase motor with this card. things that i need to displayed using labview is :
    torque
    power
    current
    voltage
    speed
    really appreciated if readers can help me with this:
    wut type of motor shud i use that compatible with NI DAQmx
    thanks a lot.

    Hi fauziana,
    NI data acquisition devices are primarily designed to take measurements, so it's a good idea to measure the signals that you have mentioned with a DAQ device.
    You also can use DAQ devices for control tasks, but for reliable and deterministic control behavioryou typically need to use a real-time operating system (not Windows!). If you want to learn more about the pros and cons of using DAQ devices for motion control tasks, please refer to these threads. Still for standard motion control tasks it's much more efficient in terms of development time, to use a dedicated motion control device for the motion control part of your application.
    In general the control part is independant from the motor type, as these devices only generate control signals (+/- 10 V). There are many power drives available, that accept this type of control signal and you should select your motor according to the requirements of your application.
    For a more detailed system consulting, please contact your local NI branch. To select the products that fit best to your application requirements a face to face discussion is much more efficient than a discussion forum thread, because there are a lot of parameters that need to be taken into consideration. If you tell me in which country you are living, I can provide appropriate contact data to you.
    Thanks and kind regards,
    Jochen Klier
    National Instruments

  • Hardware buffered analog output single shot

    Using DAQmx and M-Series hardware i'm trying to fire a single shot analog output buffered waveform.   I need the output hardware timed.  I'm able to output a hardware buffered waveform but can't figure on how to configure it for or stop it after prescribed number of cycle runs.
    Thanks in advance.
    Solved!
    Go to Solution.

    Hi,
    You have a couple of options. You can set your timing to N
    samples and you acquisition will stop when N samples have passed. Or you can
    use a counter to control the clock of the analog output and then the counter
    can be paused whenever you can.  Before
    we go and dig into the specific details of the scheme let me suggest a couple
    excellent reading materials and let me know if they help. M Series Synchronization
    with LabVIEW and NI-DAQmx, Continuous Analog Output
    with Pause Trigger and Programmatic Grounding of Output in DAQmx, NI-DAQmx: Retriggerable
    Analog Output -- LabVIEW and M Series: Analog Trigger
    Source.
    Also don’t forget to take a look at simpler examples like: Cont
    Gen Voltage Wfm-Int Clk-Pause Trigger.vi
    I hope it helps
    Jaime Hoffiz
    National Instruments
    Product Expert
    Digital Multimeters and LCR Meters

  • Multifunction E series DAQmx AI and DO problem

    Using PCI 6024E board I would like to use DAQmx to: Continuously acquire and stream to disk AI channels, and trigger a DO channel on and off using an analog input. For the DO, I need a user-adjustable delay from when the trigger is activated by AI until the DO is written high. I cannot seem to synchronize the AI and DO, and I do not know how to build a delay into a combined AI and DO While Loop. Could someone please help me, I can correspond by phone or email if needed. Thank you, matt stewart, [email protected]

    How about using the CO pulse function? I almost got this to work, but it failed. I absolutely need to have a delay from trigger to CO output. The initial delay control does not seem to reset when the trigger is set to "retriggerable" using a property node.
    The CO is a work around, for the DO problem. All I really need is a TTL pulse out, say 5 msec or so. The duration does not need to be adjusted. Does anyone know how to configure the pulse settings so that there is a consistent, user adjustable delay prior to counter pulse generation?
    Thanks for your response, and the info about the M series. Unfortunately, I have an urgent need for a functional vi within a day or two.

  • Problem with DAQmx and Real Time PCI-7041/6040E.

    Problem with DAQmx and Real Time PCI-7041/6040E.
    I have a problem with the Real Time card PCI-7041/6040E, I think it is properly installed because my software run with the traditional NI-DAQ. When I try to use the new DAQmx to acquire one signal, Labview doesn't see any device for de DAQ card 6040E.
    Information, I work on Windows XP and LabView v7.0.0 (NIDAQ RT v7.0.0, NI-Serial RT v2.5.2, NI-VISA v3.0.1 and NI-Watchdog v2.0.0).
    Could Labview RT run with new DAQmx ?
    What can I do to use DAQmx with PCI-7041/6040E?
    Thanks for your help !

    Hello,
    I refer to your posts because i am using the PCI 7041/6040E card as
    well but without any success to make it work. The problem I have
    already described in the following thread:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=120198
    Would be nice if you had a look on it, maybe you can help me. BTW, the
    thread starts with a problem of someone else, the difficulties I
    encountered are to be found a little bit to the bottom of the thread's
    page.
    Thank you!
    Dirk Völlger
    Darmstadt
    Message Edited by ratschnowski on 07-28-2005 07:14 AM

  • Problem with DAQMX on a 6025E !!

    Problem with DAQMX on a 6025E
    I work on a DAQ 6025E and I can't use the example "Write Dig Port.vi" and all others example on digital output with DAQMX. There isn't any hardware failure because the same installation functions correctly with the traditional DAQ. I want to use these channel parameters: Dev1/port2.
    I already tested to make a reset device and use "line or port configuring vi" but without successes.
    Thanks for your help!
    Attachments:
    Write_Dig_Port.vi ‏48 KB

    I took a look at the example you attached and it looks fine. Here are a few things to try out BEFORE running the example from MAX:
    1) Remove any SCXI, SCC, and accessories from the configuration in MAX so that no DIO lines are reserved for communication.
    2) Reset the driver to work in DAQmx mode for your board. To do this, first right-click the "Traditional DAQ Devices" and say "Reset Driver" and then right-click your 6025E under DAQmx Devices and say "Reset Driver" again. This should enable the driver for DAQmx.
    3) In MAX, under DAQmx Devices, run the test panel and make sure you can read/write all the DIO lines there first. If that works fine you should be able to run the example.
    Remember that the port names for the 6025E are Port 0, Port 2, Port
    3, and Port 4 (no Port 1).
    Good Luck!!!
    Sincerely,
    Brooks Bailey
    Application Engineering
    National Instruments

  • Samplerate problem using Analog In and Counter In from a NI 6259 USB. "Counter timeout" setting in DAQmx?!

    Hello,
    I got a fundamental problem with the correlation of the timer settings of the DAQmx driver in DIAdem DAQ. I dont know where the problem is located exactly but maybe someone can help me if I explain what happens:
    In my configuration I use some analog inputs from a USB 6259 with 20kHz samplerate and two counter inputs for frequency measuring via DAQmx in DIAdem DAQ.
    There has to be an extra DAQin block for the analog inputs and the counter inputs with also an extra "Clock"-block for each of them. The clock of the analog inputs runs with 20kHz hardware clock and the other one with 10Hz software clock because the hardware clock mode is not allowed or supported.
    My problem is the display refresh rate in VIEW. If the counter signal has no input (because the measured system is not active) the display seems to wait for any input and doesnt refresh the analog values on screen. If the system is active and a rectangle signal is seen by the counter in, the display refresh rate raises and the frequency value is displayed more or less accurate. Has that something to do with the counter timeout setting in the DAQin driver options block (marked in the attached image)? If i decrease the timeout, the display refresh rate gets better but not as good as without using the counter inputs in my DAQ diagram. I think the counter input is not as easy to handle as the usual analog inputs... I only want to see the measured frequency on the display during the measurement without getting any influence on the analog input channels and their displaying.
    The other problem is the display and the measurement of the frequency itself. If i check the function of the counter input in the Meas. & Automation Explorer the frequency is display correct without any dropouts or something like that. The signal I measure in DIAdem on the other side looks quite bad because there are spikes of some MHz and even more although the measured range is between 20 and 80Hz!
    Has anybody made similar experiences?
    Regards
    S. Zimmer
    Attachments:
    probs.png ‏112 KB

    Hi there,
    it seems that german is your mothertongue, so I'll reply on german.
    Digitale Eingänge müssen Software getaktet werden, da nur analoge Eingänge Hardware-Takt Unterstützung haben!
    Sie können den Hardware-Takt nur mit analogen Eingängen einsetzen, die, von einem Timer gesteuert, gepuffert Werte einlesen können. Digitale Größen verarbeitet der Hardware-Takt nicht.
    Mit dem Hardware-Takt erreichen Sie sehr hohe Abtastraten. DIAdem überträgt die gewünschte Rate und die Kanalliste auf die Karte und startet die Messung. Die Hardware erfasst die Daten selbstständig und sammelt die Daten. Der PC ist nur für den Abtransport und die Weiterverarbeitung verantwortlich.[...]
    Da digitale Signale nicht im Hardware-Takt erfasst werden können, müssen diese Signale parallel in Software-Takten ermittelt werden. Dies kann zu zeitlichen Verschiebungen führen, weil sowohl beim Start der Messung als auch während der Messung keine Synchronisierung der Timer im PC und im Messgerät erfolgen kann. Da zwei Timer nie ganz genau gleichzeitig gestartet werden und auch nie ganz genau gleich schnell laufen, stimmen die Zeiten in den Zeitkanälen nach der Messung nicht genau überein. Üblicherweise betragen die Abweichungen einige Millisekunden.[...]
    Weiters hab ich mal n Versuchsaufbau für die Frequenzmessung gemacht. Ich konnte problemlos Frequenzen messen...
    Am besten du schilderst kurz den Aufbau deiner Messung, was du messen möchtest und wie du den Max konfiguriert hast.
    Mfg Markus

  • A problem with data acquisitioning in LV 7.1 (transition from Traditional NI-DAQ to NI-DAQmx)

    Hi to everyone,
    I have a problem with data acquisitioning in LV 7.1.
    I made a transition from Tradiotional NI-DAQ to NI-DAQmx in my LabVIEW application.
    The problem I have is that when I acquire data in Traditional (without writing somewhere -
    just reading) then there is no scan backlog data. But when I acquire data in application that
    acquisition is based on DAQmx than a scan backlog indicator shows numbers from 20 to 50 for
    about 6 min and then that number quite quickly increases until I get an error (unable to
    acquire data. The data was overwritten).
    Acquisition settings are the same in both cases. When I acquire with DAQmx I use a global
    channels. Is a reason for that phenomenon in global channels data procesing? But it seems
    strange why does it flows quite smoothly for about 6 min and then it stucks?
    Best regards,
    Ero

    If you have an old Daq unit it may not be compatible with DAQMX. Which DAQ unit do you have? I think NI have a list showing which DAQ driver you can use with your card
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Problem with DAQmx Physical Channel control

    Dear LabVIEW community!
    I have installed LabVIEW, v13.0f02, 32-bit on my PC. The problem, which I face, is that DAQmx Physical Channel controls, which are used in VIs inside the LV projects, sometimes don't show me the list of DAQ devices - I can't expand the list at all. I push the button to expand the list, but nothing helps.
    But when I create VIs outside the project, and put there DAQmx Physical Channel control - everything works well.
    Note: devices are simulated via MAX.
    Is it some kind of bug in 2013 vesrion of LabVIEW? Because while using LV 2012 I didn't have such headache.
    The only thing that helps now - is to restart PC (laptop) several times; b/c restart of LV doesn't help.
    Can anyone suggest, what it can be, and how to fix this problem?
    Thank you very much in advance!

    Thank you for your answer!
    The point is, that this bug is independent from the code. DAQmx Physical Channel controls don't work even when I'm trying to use NI examples - for instance, Strain - Continuous Input.vi; Voltage - Continuous Input.vi, etc.
    I have such simulated via MAX devices: NI USB-9213, NI USB-9201, NI cDAQ-9172 with NI 9217, and 4 NI PXIe-4331 modules.
    Also, what I have noticed - front panel doesn't visualized fully (I send you the screenshot). When I'm moving mouse pointer over it, those part, which were under the mouse pointer, became clearly seen. And when I minimize, and then restor FP, it becomes fully clear visible.
    And also, this story happens when LV project is open. If I close opened projects, and open only single VIs, everything works smooth.
    Thank you very much, I hope, that this information will be useful to solve this problem.
    Attachments:
    Screen 1.PNG ‏87 KB
    Screen 2.PNG ‏107 KB
    Screen 3.PNG ‏129 KB

  • Problems with Application Builder and NI-DAQmx drivers in Labview 8.2 Professional

    Hello everyone,
    I am trying to use the application builder to create an executable so that someone without labview is capable of a remote panel connection to connect to our test laboratory.  our test laboratory uses the USB Compact DAQ  9172.  I did find some other forums that ran into a similar problem where a computer that didnt have labview installed on it looked for a particular driver (nilvaiu.dll).  The common solution appeared to be when building the installer, include the current NI-DAQmx (8.3 in our case) option and then the clients worked fine.   My question is when i use the application builder to create an installation file for this application, i get a prompt to:
    Locate the "National Instruments Device Drivers - February 2006 Disk 1" distribution. LabVIEW needs to copy a component installed or updated by the distribution to continue building the installer.
    What is confusing is that the installation cd's in our laboratory are from August 2006 (501165N-03).  It didnt make sense to me that i would need to downgrade the drivers from a few months ago, but i've been wrong before.  We just upgraded from the full development to the professional version about 2 weeks ago to utilize the application builder function.  Has anyone else ran into this problem and could this be a limitation because we purchased the software with the academic discount?
    thanks in advance
    Chris

    Chris,
    My "fix" is brute force.  Backup everything.  Removing all the NI software takes a while.  Be sure to remove leftover directories and files. 
    Altering the windows registry takes seconds and is not hard if you know what you are looking for.  I've attached a screen shot with the NI entry selected.  This is what I  deleted on by machine.  The thing to remember is that the registry controls all the software on your pc.  Delete/alter the wrong entry and you have problems.  Worst case scenario is that you could end up formating the hard drive and starting over from scratch.  I'm not trying to scare you, but I want to make sure you understand the potential for harm. 
    One thing you might try first.  NI-DAQmx 8.5 is now available for download from NI.  You might try unloading 8.3 and installing 8.5. 
    Attachments:
    regedit pic.JPG ‏102 KB

  • DAQmx VIs Timeout Problems

    Hello,
    I am trying to acquire 9 frequency input chanels thorugh PXI-6624 card.
    I have 9 independent loops for 9 frequency counter chanels. I am able to read all the frequencies above 10Hz properly.
    Now the problem is,
    Sometimes there will be no pulses, and the Counter Input DAQmx VI will wait for timeout.( I have given the timeout of 1 sec). During this time my CPU consumption goes very high and I am not able to read any of the analog inputs too.
    and say if similar condition happens to all the 9 frequency input channels then my software hangs.
    I have tried using wait mode method but i wasnt able to read any frequency with it.
    I have also read it that, when "Counter Input DAQmx VI is in timeout mode at that time we cannot make any other DAQmx VIs call". Please refer this link http://zone.ni.com/devzone/cda/tut/p/id/3166
    Thanks,
    Krunal

    What version of LabVIEW?  Did you install DAQmx AFTER installing LabVIEW?
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

Maybe you are looking for