Daqmx howto stop trigger on timeout

Hello,
I've got a problem on a trigger.
When my signal doesn't arrive, the trigger doesn't occur. My task has also a time-out, so when the timeout arrives, I want to sto the task. But then in the "RemoveHandler" function an exception is raised. In fact I want to stop the trigger when
a timeout occurs.
Could you help me ?
Thanks.

Bon ne voyant pas de réponse, j'essaie de préciser le pb :
* je fais une acquisition qui démarre sur triggerde la voie AI1
* la lecture se fait de manière asynchrone sur la voie AI1
* j'attends l'arrivée d'un evenement posté sur réception handler
m_P_O_toolBox->F_acquisitionTrigger
m_P_O_toolBox->startTension
* Attente fin de la mesure pedant 10s maxi
F_waitingForDataReadyTension (m_P_O_toolBox->F_getEventDataReadyTension(), (DWORD) 10000)
* Arret mesure
       F_stopperTrigger;
Tout va bien lorsque le signal de trigger arrive.
En revanche si le signal de trigger n'arrive pas, je sors en time-out dans la fonction "waitingForDataReadyTension"et lorsque je fais un arrêt de la tâche j'ai l'erreur -200284.
Après quelques recherches je pense que c'est parce que le trigger attends toujours le signal de déclenchement . Et apparemment on ne peut pas arrêter une tache quiest bloquée sur un trigger ...
Donc ma question est simple :
Comment faire pour stopper un trigger ?
j'ai un semblant de réponse avec le code suivant "F_stopperTrigger (true)":
* stopper la tache  CDaqmxTask
* stopper le trigger 
* relancer la tache
mais cela ne semble pas fonctionner , j'ai parfois toujours l'erreur -200284  ...
Quelqu'un a-t-il une idée car là je sèche depuis un bon moment.
Merci.
 je joins le code source des classes pour infos.
Attachments:
pb_stop_trigger.txt ‏16 KB

Similar Messages

  • Start and Stop Trigger using PXI-6120 and DigitalSta​rtAndStopT​rigger.vi not working :-(

    Hello,
    I've been trying for a while now to get my PXI unit to capture a waveform between a Start and Stop (Reference) Trigger using the NI example DigitalStartAndStopTrigger.vi downloaded from the NI website. However, whilst the start trigger and stop trigger seem to be working i.e. the VI runs and stops at  the correct times there is never any data read from my DAQmx compatible PXI-6120 card. So I can see the VI is running around the aquisition loop but the Property Node AvailSampPerChan is always returning zero... this has me slightly puzzled. I thought this might just be a driver issue so I've updated my box to the following software versions (see below) and installed the latest drivers e.g. DCDNov07.exe (also from the NI site) but nothing has changed.
    my software as of now.
    Labview 7.1 (with the 7.1.1 upgrade applied)
    Max 4.3.0.49152
    DAQmx 8.6.0f12
    Trad DAQ 7.4.4f7
    before I updated I had the same problem but with the following versions:
    Labview 7.1 (with the 7.1.1 upgrade applied)
    Max 4.2.1.3001
    DAQmx 8.5.0f5
    Trad DAQ 6.9.3f4
    So to cut a long story short I still have the same problem with the triggers... does anybody have any ideas what is going wrong?
    To add insult to injury it the traditional DAQ example ai_start-stop_d-trig.vi was almost working correctly before I did the upgrade. It had the strange behaviour of capturing the AI0 channel but on the wrong edges (e.g. if I set Start on Rise and Stop on Fall it would do the opposite, Start on Fall and Stop on Rise).
    I'm going to leave my box doing a mass compile over night but i'd really like it if someone could suggest a solution or point me in the right direction.
    Many thanks,
    Mike

    Hi Graham
    I'm out of the lab today but I'll try and answer your questions as best I can...
    1) What are the values you have set for Buffer size, Rate, samples per read and post trigger Samples?
    At the moment I have all the values (e.g. sample rate, buffer size etc) unchanged apart from the ones I mentioned in my previous post (see above). I have in the past played around with changing the buffer sizes and rates in the example VI but as this appeared to have no effect on the behaviour I now have them setup as in the download.
    2) Does the program end after the stop trigger is implemented?
    Yep, if I toggle the trigger line high then low I see the program exits the read loop and the VI stops running as expected.
    3) Lastly can you give me the details of triggering method. Are you
    using a digital train of users set digital pulses? how long is the
    program running.I'm using the WriteDigChan.vi to manually toggle the first digital line of the PXI-6733 card which is wired directly to PFI0 of the PXI-6120 card. Generally, I just start the VI running  and then toggle the line high, wait a couple of seconds and then toggle it low.
    To me it all looks like it should be acquiring samples but as I said yesterday it just refuses to fill the buffer with any data (and hence no samples are read).
    Any ideas? and thanks for you help,
    Mike

  • Continuous data acquisition using NiDAQmx with a start and a stop trigger

    I'm sorry if this has been answered many times before, I can't quite seem to find the answer I'm looking for.
    I am using LabWindows CVI version 7 and NiDAQmx with a PCI6023E.
    I wish to acquire data continuously using an external clock as a timebase - I am happy with this.
    I wish the acquisition to start when an external signal (say on PFI7) goes high. I am also happy with this.
    What I also need is for the acquisition to stop when the signal on PFI7 goes low, or possibly when a signal on say PFI8 goes high. I'm not too concerned about which approach to use.
    How do I stop the acquisition with an external signal?
    Thanks in advance,
    Crispie

    I don't have CVI installed, but I've attached screen shots of a LabVIEW program that I believe accomplishes what you are trying to do. Translating it to the C API should be straight forward. I'll try to explain what the program is doing since it's using some of the more advanced features of the driver. Also, the DAQ device you are using doesn't support a true "stop" trigger so I'm using a reference trigger to get as close to the desired functionality as possible.
    First, the program configures a finite acquisition that uses both a start trigger and a reference trigger. The acquisition is using an external sample clock and will acquire 4 samples (2 pre-trigger samples and 2 post-trigger samples). Four may seem like an odd number here, but it allows us to emulate the functionality of a stop trigger as close as possible. Given this configuration, you must acquire at least 2 samples before the "stop" trigger is recognized, and you must acquire 2 more samples after the "stop" trigger is recognized. Hopefully this restriction is acceptable. You can always discard the last two data points after the stop trigger if they're not of interest, but you're stuck always acquiring at least two points between when the start and stop triggers are recognized.
    The program also overrides the default buffer size and read position. By default, the DAQmx driver will pick a buffer size exactly big enough to fit the pre-trigger and post-trigger data (4 samples in this case) and will begin reading data from the start of the pre-trigger data. Explicitly allocating a larger buffer will allow your acquisition to execute without receiving buffer overflow errors, and changing the default read position will allow you to read all of the data between the start and stop triggers as it is acquired and not just the pre-trigger and post-trigger data.
    Finally, the while loop takes care of reading the data. In this case, the loop continues to read data until the task is done and there are no longer samples available for reading from the buffer. The number of samples read per iteration is the lesser of the user specified amount or the number of samples available for reading from the buffer.
    I hope this helps. Good luck.
    Attachments:
    Stop_Trigger1.JPG ‏40 KB
    Stop_Trigger2.JPG ‏43 KB

  • Looking to set a combination of channels to set-up a start and a stop trigger

    Hi,
    I have already set-up a VI to acquire data using traditional NI-DAQ. I am using DAQ board PCI-6033E, which has an SCB-100 to which are connected my sensors.
    I can acquire data in LabView using this set-up. I am looking for a simple VI which will allow me to scan any of the channels that I am acquiring data through and trigger my acquisition through software. I did see a lot of triggering VI's, but most of them were for hardware acquisition.
    Furthermore, I am also looking to make a combination, wherein I should be able to set-up a combination using more than 1 channel which could act as my trigger. I.e. If certain 'n' channels that i specify are 'high' start acquisition. Similarly for the stop trigger.
    Thanks,
    -Sachin

    Hello Sachin,
    If you look in the NI-DAQmx Help, you will see that you can select any AI Channel to trigger the acquisition of multiple channels. Keep in mind that you will need to make sure that the AI trigger source must be first in the scan list. With this in mind, I have created a quick example which takes a task, checks to see what channels are listed, then reorders that scan list by putting the trigger source first.
    I hope this helps. Let me know if you have any further questions.
    Regards,
    Sean C.
    Attachments:
    SelectableAnalogTrigger.vi ‏189 KB

  • How to setup "Stop Trigger"?

    There’s a signal(only persist a few seconds) to be measured.I use a digital trigger to start the measurement,but the question is:how to config a digital trigger to use its falling slope to stop a test?
    The DAQmx’s function to config a “stop trigger” is called “Reference trigger---DAQmxCfgDigEdgeRefTrig”,which means set up a trigger in finite samples(to set up preSamples count, and the “postSamples”can be auto caculated using “samples per channel” minus “preSamples”.----What does postSamples mean?When then pre-defined slope comes ,the measurement stops,isn’t it? ).
    But I want to acquire the data continuously,not stopping until received the digital trigger signal’s falling slope. So before the trigger singal’s falling slope comes,I don’t know how many samples I might have acquired.
    What’s more,the “reference trigger” doesn’t support “continuously measurement”,it supports only “finite measurement”.So,when the samples reaches the sample count defined in “DAQmxCfgSampClkTiming”,while the falling slope have not come yet, then the measurement might stop. how can I set up the “stop trigger”?
    If there is a way to config this trigger,then the total sample count might exceed the “samples per channel” count,how can I detect when buffer is full?Should I write a cycle to detect the buffer status(using the function “DAQmxGetReadTotalSampPerChanAcquir”)? Would this kind of detection slow down the sample speed?
    ^_^^_^

    There’s a signal(only persist a few seconds) to be measured.I use a digital trigger to start the measurement,but the question is:how to config a digital trigger to use its falling slope to stop a test?
    The DAQmx’s function to config a “stop trigger” is called “Reference trigger---DAQmxCfgDigEdgeRefTrig”,which means set up a trigger in finite samples(to set up preSamples count, and the “postSamples”can be auto caculated using “samples per channel” minus “preSamples”.----What does postSamples mean?When then pre-defined slope comes ,the measurement stops,isn’t it? ).
    But I want to acquire the data continuously,not stopping until received the digital trigger signal’s falling slope. So before the trigger singal’s falling slope comes,I don’t know how many samples I might have acquired.
    What’s more,the “reference trigger” doesn’t support “continuously measurement”,it supports only “finite measurement”.So,when the samples reaches the sample count defined in “DAQmxCfgSampClkTiming”,while the falling slope have not come yet, then the measurement might stop. how can I set up the “stop trigger”?
    If there is a way to config this trigger,then the total sample count might exceed the “samples per channel” count,how can I detect when buffer is full?Should I write a cycle to detect the buffer status(using the function “DAQmxGetReadTotalSampPerChanAcquir”)? Would this kind of detection slow down the sample speed?
    ^_^^_^

  • Data acquisition from analog start trigger to analog stop trigger

    Hi,
    I'm trying to start and to stop a data aquisition by using an analog input trigger. I'm using NI-USB-6251. At input channel ai0 is a sin-signal connected. At input channel apfi0 is an analog trigger signal connected. I can start the trigger signal by pushing a button on my frequency generator. Here's a part of my code:
    Hi,
    ich versuche eine Messung mit einem analogen Eingangssignal zu starten und zu beenden. Ich benutze die Messkarte NI-USB-6251. An Eingang ai0 ist ein Sinus-Signal angeschlossen. An Eingang apfi0 ist der Triggereingang angeschlossen. Das Triggersignal löse ich immer per Tastendruck auf dem Funktionsgenerator aus. Hier ist ein Teil des Quellcodes:
    TaskHandle taskHandle = 0;
    int32 read;
    float64 *data;
    float64 sampleRate = 1000; //Samples per Channel per Second
    uInt64 sampsPerChan = 4000; //Samples per Channel to read
    int sumOfChan = 1;
    double triggerLevel = 2.0;
    double min = -0.2;
    double max = 0.2;
    double timeOutReadAnalog = 10.0;
    void calculate()
    DAQmxCreateTask("", &taskHandle);
    DAQmxCreateAIVoltageChan(taskHandle, "/dev1/ai0", "", DAQmx_Val_Cfg_Default, min, max, DAQmx_Val_Volts, NULL);
    DAQmxCfgSampClkTiming(taskHandle, "", sampleRate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, sampsPerChan);
    DAQmxCfgAnlgEdgeStartTrig (taskHandle, "/dev1/apfi0", DAQmx_Val_RisingSlope, triggerLevel);
    DAQmxCfgAnlgEdgeRefTrig (taskHandle, "/dev1/apfi0", DAQmx_Val_RisingSlope, triggerLevel, 3000);
    DAQmxStartTask(taskHandle);
    if( (data=malloc(sampsPerChan*sumOfChan*sizeof(float64)))==NULL )
    MessagePopup("Error","Not enough memory");
    //set start and stop trigger
    //set breakpoint here
    DAQmxReadAnalogF64 (taskHandle, -1, timeOutReadAnalog, DAQmx_Val_GroupByChannel, data, (sampsPerChan * sumOfChan), &read, NULL);
    I've choosen the sample rate (1000/s) and the samples per channel (4000), that the aquisition needs 4 seconds to be complete. I can start the aquisition by Start-Trigger, but I think I have a problem with the function DAQmxCfgAnlgEdgeRefTrig. Actually the array will always be filled with 4000 values. I thought I can start the aquisition by triggering once and e.g. after two seconds triggering again for stopping aquisition with result of 2000 values in the array. I hope you can help me with this problem.
    Ich habe die Sample Rate (1000/s) und die Samples pro Kanal (4000) so gewählt, dass die Aufzeichnung 4 Sekunden dauert. Ich schaffe es auch die Aufzeichnung über den Trigger zu starten, jedoch funktioniert das Stoppen mit der Funktion DAQmxCfgAnlgEdgeRefTrig nicht. Aktuell ist es so, dass das Array immer mit 4000 Werten gefüllt wird.
    Ich hatte mir erhofft, dass ich durch einmalige Triggerung die Messung starten kann und beispielsweise nach zwei Sekunden erneut triggere und die Messung damit stoppe und dann nur 2000 Werte eingelesen habe.
    Ich hoffe, ihr könnt mir dabei helfen.

    Hi Martin,
    I looked over your code and noticed that you called the function without checking the returnvalue.
    Try to change the line to the following:
    First: define a new int32 value and call it for example: errorcode
    Second: The function returns a status code, wich if it fails, includes an error code so save this code in the new generated value
    errorcode = DAQmxCfgAnlgEdgeRefTrig (taskHandle, "/dev1/apfi0", DAQmx_Val_RisingSlope, triggerLevel, 3000);
    and try to run the programm and read out this value.
    If you got this value, please post it here and I will try to help you if I can.
    Regards
    Philipp

  • How can I create software start and stop trigger in LabView using 6023E series DAQ card? I don't want to use the external trigger.

    I am using 6023E DAQ card to collect the signals, such as AE, Force, Torque from the machine. I want to collect only some part of signal for example between start triger and stop trigger. I'd like to know how I can creat those triggers in LabView from one of the channels that I am acquiring at the same time. I found one or two library file that is only for start trigger. I know that this is availabe in some of DIAdem functions. Please let me know if you have done some example for this requirement.

    If you are wanting to create a software trigger based on an analog input voltage in LabVIEW, there are several options. One suggestion would be to compare the voltage values from one input channel to a number within a loop. If the input voltage crosses that threshold (is greater than the number), have a case statement that will acquire data from the other channels. This would simulate a software start trigger in LabVIEW.

  • In APEX clicking the hyper link doesn't trigger session timeout page

    Hi All,
    I have a question about the session time out in APEX application. I have created a simple APEX application. In the SQL report region section, i have code like this:
    SELECT DOC_Name, DOC_URL,
    '<a href="' || DOC_URL || ' target="_blank"/">Download file</a>' pdf_link
    FROM test_table
    where emp_number =00010001
    When user clicks on the hyper link, it will display the destination page to user(for example if DOC_URL = 'http://forums.oracle.com', it will display the oracle forum page in a new browser).
    But the issue is that, after user's session timeout (I set for 240 seconds through Shared Components>Edit Security Attributes, i set max the session timeout for example 240 seconds), when i click on this hyperlink, it doesn't trigger my session timeout page and it still displays the page (oracle forum page).
    Why in APEX clicking the hyper link doesn't trigger session timeout page after the user session timeout???
    how to implememt or fix to trigger the session timeout page after clicking on the hyperlinks?
    (BTW, our APEX version is 3.2)
    Thanks!

    Hi Lily,
    the reason for that behavior is that APEX is not involved anymore if you click on an external link. That's completely handled by your browser.
    To involve APEX timeout handling you could redirect to a specific page in your application which performs the final redirect.
    For example:
    1) Create a new page 999
    2) Create hidden page item P999_URL
    3) Create a before header PL/SQL process with the following source
    owa_util.redirect_url('http://'||:P999_URL);
    apex_application.g_unrecoverable_error := TRUE;If you want to embed a link, create a link to page 999 and set the page item P999_URL to forums.oracle.com
    You could also add a white list into the above code to verify that you are just redirecting to valid URLs, so that nobody is using your trusted application URL for phishing attacks.
    Hope that gives you a direction
    Patrick
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Acquiring data continuously with a start and stop trigger

    I am currently acquiring data continuously (1000 samples at 5k/s) using a start trigger to start the acquisition and stopping the acquisition with a digital line. The problem with this is that I want the acquisition to stop immediately on a trigger, in otherwords I don't want it to finish with 500 or 200 samples of useless data. I am using a PCI 6024 E. Any suggestions would be appreciated.

    The trick will be to minimize the number of post-trigger scans that will occur after your stop trigger. The stop (reference) trigger requires a minimum of 2 post-triggered scans. Therefore, the way to stop your acquisition as soon as possible is to configure your stop trigger to have only 2 post-triggered scans.
    I've included a little bit of code to illustrate this in LabVIEW 7.0. The number of post-trigger scans will equal the buffer size less the number of pre-trigger scans. Since the minimum number of post-triggered scans is 2, we'd have to set the number of pre-trigger scans to the buffer size less 2. This is wired as the minimum number of pre-trigger scans acquired input to the AI Control.vi in the example.
    This should do what you're
    after. Best of luck to you as you get this all put together.
    Jim Laudie
    Applications Engineer, National Instruments
    Attachments:
    example.vi ‏85 KB

  • How to use counter as an start and stop trigger in 6009

    Hi ALL.
    I'm using USB 6009 as a subject of to acquire data.
    I would like to know on how to use the counter digital input as a start and stop trigger. 
    The acquisition will only start when the first pulse of the digital signal is received and it will stop when the desired number of pulse is received.
    I was trying to use the VI as attachment as my reference. However, after tried, the VI is not working for USB 6009 as the counter input cannot be used as a trigger.  
    I would be happy if anyone could suggest me some ideas on this matter.
    Thanks.
    Attachments:
    DigitalStartandStopTrigger.vi ‏32 KB

    Hi Kate. 
    Thanks for your response.
    For your information, I've design my VI using the counter method. However, it doesnt work well. Please see the figure below. The file also attached with this reply.
     At first, the first counter from Device 2 will start counting. If the counting equal 0, then the acquisition for Device 1/AIO also the counter of Device 1/ctr0 begin acquiring data and counting the edges respectively.
    However, when I did the test, it doesn't work as wanted. It is happened because when counter of device 2 in not equal to 0, the acquisition for Device 1 not happened as it will go to false state.
    Is there anything that someone could suggest on how to start the acquisition for device 1 only and if the counter of device 2 is equal to 1. I would like the acquisition of device 1 start only when the counter of device 2 is equal to 1. I cannot use the trigger as 6009 is not support for it. 
    -Fird- 
    Message Edited by Fird on 07-02-2009 04:28 AM
    Attachments:
    Acquire Data Test 4.vi ‏27 KB

  • Stop trigger, how to specify the analogy trigger channel?

    Dear All,
    In fact, I am using DAQ2204 cards from ADLINK, which is more or less equivalent to NI E-series muttifuntion board. However, I have some problems with regard to my data acquisition program. Basically, it is about a middle/stop trigger application, which means data acquisition will be starting once the specified analogy channel (for example, channel 0) exceeds a prescribed value.And, data both before and after trigger will be acquired. However, I do not quite understand how to physically make the I/O connection and specify the analog trigger channel and level.
    According to the board User's Guide, 'SRC1 can be used for all trigger modes while SRC2 can only be used for post and delay trigger modes'. I have come across similar description with NI examples before. It would therefore be very appreciated if anybody can help. Thanks in advance.

    Hi dragondriver,
    I'm providing below links to 2 documents that discuss wiring considerations that are applicable to your device.  Hopefully this information is helpful!
    E Series User Manual
    http://www.ni.com/pdf/manuals/370503k.pdf
    Field Wiring and Noise Considerations for Analog Signals
    http://www.ni.com/white-paper/3344/en#toc5
    Josh B
    Applications Engineer
    National Instruments

  • Stopping Trigger at WebLogic Server

    How can I stop trigger? I got an application that starts trigger on the server
    side, and ScheduledTriggerDef.schedule() returns unique key. The trigger is started
    and the application ends.
    How can I stop this trigger from another application having this unique key?
    Thanks in advance
    Randy H.

    seems like a classpath problem to me.
    Pls post this question to commerce server group for better explanation.
    Kumar
    German Faiella wrote:
    Hi,
    We installed the BEA WebLogic Server on HP-UX 11.0 and it works fine. After that, we installed the BEA Commerce Server but, when we tried to run the StartCommerce.sh command, we received the follow message:
    Thu Oct 05 19:55:13 GMT 2000:<I> <WebLogicServer> Loaded License : /u02/local/weblogic/license/WebLogicLicense.xml
    Thu Oct 05 19:55:13 GMT 2000:<I> <WebLogicServer> Server loading from weblogic.class.path. EJB redeployment enabled.
    The WebLogic Server did not start up properly.
    Exception raised: java.lang.reflect.InvocationTargetException
    java.lang.reflect.InvocationTargetException
    at weblogic.Server.startServerDynamically(Server.java:99)
    at weblogic.Server.main(Server.java:65)
    at weblogic.Server.main(Server.java:55)
    java.lang.NoClassDefFoundError
    Could anyone help us????
    Thanks in advance,
    German

  • 5112 Stop Trigger

    Hallo,
    on examining the Synchronization examples for the 5112 I came across the "Stop Trigger".
    What is it?
    How and when and where is this signal generated?
    Is there something to configure with this Stop Trigger
    I couldn't find any information in the NIScope Help, neither the 5112.
    Thank you for your help

    When you are configuring a trigger for your acquistion with niScope, you are really configuring a reference or stop trigger. This trigger has a reference position with relation to the record that you are acquiring. By default, the trigger occurs at the 50% mark in the record so that you have half of your data before the trigger and the other half after the trigger. Where the trigger occurs can easily be changed in software with the reference position input in the niScope Configure Horizontal VI.
    Now that we have an idea of what the reference or stop trigger is, in the synchronization example, the master is exporting its stop trigger to share it with the slave NI-5112. This way both boards are triggered at the same time without having to provide the same trig
    ger condition to both boards simultaneously.
    Hope that clears some stuff up.
    Jack

  • How do I implement a stop trigger for my 6602 counters?

    I currently have the start of data acquistion for two channels syncrhonized with a start trigger. I am doing simple event counting using two seperate counters.
    For my start trigger, I use a third counter to generate a single pulse and put the output on the trigger line that the two counters are watching.
    Works great! But, I also want to synchronize the stopping of data acquisition for the two channels. I thought this would be simple as configuring a ND_STOP_TRIGGER like I did a ND_START_TRIGGER. But, this is giving me errors.
    Does the 6602 not support stop triggering? Am I just out of luck?

    Hi there,
    this thread is quite old but I'm facing the same problems.
    I'm using a PXI-6602 and a PXI-6521 in a PXI-1033 chassis. On the 6521 I create a continuous sample pulse as a counter output. This I route to the PXI_Trig0.
    On the 6602 I have two counters set up to continuous edge counting with the external clock configured to PXI_Trig0.
    I start counting by setting a internal trigger channel to high which is routed to PXI_Trig1, and this is configured as the start trigger signal for both counters on the 6602 so that they count simultaneously based on their common sample clock.
    This works quite good...but I have some problems to stop the counting.
    I have to stop counting as soon as I have reached 1024 increments (one revolution of a wheel, signal duty cycle 50 %) on one counter and then I have to check if the other counter have reached at least 48 (duty cycle 50%) or 96 pulses (duty cycle 20% or 80%, depending on the revolution direction).
    So far I read the counter value of ctr1 in a loop and if the value is equal to or greater 1024 I stop. Sometimes I miss the value 1024 (how can this happen as I count buffered + continuously?) I make a retry. But I get the impression that even I configured both counters with the same start trigger and sample clock, the counting isn't synchronous. When I try it with two function generators, I works quite good but not perfect. If I connect real life signals, in the lower frequency range (up to 500 1/min of the wheel), I almost always have fewer pulses then necessary, e.g. 88-94 pulses instead of 96. In the upper frequency range (up to 3000 1/min of the wheel), I have way too much pulses, e.g. 122-125 pulses instead of 96.
    I use the digital filters of the counter board for both TTL signals.
    Does anybody have an idea what I can do on this subject?
    Thanks in advance for any help
    Regards
    Achim

  • DAQmx : How to Trigger camera and AOTF

    Dear,
    I have a camera sCMOS and an AOTF that i want to trigger.
    I have attached the description of the camera acquisition sequence.
    I want to sent a digital pulse (only one pulse because I want to acquire one picture only) to the camera via the EXT/SW Trigger input of the camera and get the FIRE output of the camera which will trigger the AO lines connected to the AOTF. I have a NI PCI 6733  with 8 AO and 8 Digital line
    I am very new in DAQmx and  I do not know how to proceed. Please help me. The best should be, if it is not to much, to send the correponding vi to me.
    Thanks by advance
    mnemo15
    Attachments:
    External-SoftwareTrigger.PNG ‏11 KB

    Hi Mnemo15,
    Thank you for posting on NI's forum
    Which model is your camera and how is it linked to your computeur ?
    I think you can use daqmx example with Software Triggering (in the help menu of LabVIEW).
    You can set a digital pulse and use it as a trigger to acquire a picture (by wiring this pulse to the daqmx triggering vi).
    Then when you got your picture, you can start your AOTF by using the Fire output signal of your camera as a trigger.
    I hope I understood each step of what you want to do.
    Regards,
    Vincent.O
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Été de LabVIEW 2014
    12 présentations en ligne, du 30 juin au 18 juillet

Maybe you are looking for