Synchronisation do tâches avec NI USB 6009

Bonjour,
Je cherche à construire un VI d'acquisition avec le NI USB 6009.
Il y a une voie analogique et une voie logique à acquérir.
Cela demande une synchronisation de tâches avec le même matériel. J'ai utilisé un exemple tiré de la bibliothèque NI-Labview.
Et j'ai une erreur que je ne comprends pas. Merci de me guider vers la bonne correction. Voir le fichier joint quyi est la copie écran du diagramme.
Cordialement,
seram51
Pièces jointes :
VI-synchro - erreur.docx ‏2150 KB

ok. bonne nouvelle. Tu peux noter que le post a une solution (la tienne...)
A+
Luc Desruelle | Voir mon profil | LabVIEW Code & blog
Co-auteur livre LabVIEW : Programmation et applications
CLA : Certified LabVIEW Architect / Certifié Architecte LabVIEW
CLD : Certified LabVIEW Developer / Certifié Développeur LabVIEW

Similar Messages

  • Comment acquérir sur 2 voies avec un USB 6009 ?

    Comment acquérir sur 2 voies avec un USB 6009. ?
    ma configuration labview 7.0, windows NT
    l

    Il y a plusieurs manière de configurer tes voies, si tu n'as pas bcp d'expérience en programation LabVIEW, le plus facile est peut être de configurer tes voies en voies globales dans MAX (Measurment and Automation Explorer) et ensuite de les utiliser dans LabVIEW en utilisant les fonction DAQmx. Lorsque tu démarres une tâche DAQmx, tu peux sélectionner les voies globales que tu as définis dans MAX.
    Il y a des exemples dans Help >> Find Examples... Recherche "daqmx"
    Bon courage !
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"

  • Mesure de fréquence avec NI USB 6009

    Bonjour,
    je souhaitai faire une acquistion de tension, courant et fréquence avec une carte d'acquisition NI USB 6009 . Mais je ne sais pas si c'est possible de mesurer la fréquence avec ce modéle etcomment? Pour la tension le simple pont diviseur semble être la technique? Et pour le courant un shunt? Et si oui comment configurer la mesure?
    Merci d'avance

    Bonjour Rj293,
    En
    effet avec une carte de type NI USB 6009, la mesure de fréquence en utilisant
    un compteur n'est pas directe. Le compteur implémenté dans la NI USB 6009
    permet de faire uniquement du comptage de front car il n'a pas de Gate.
    Néanmoins
    il est possible de contourner ce problème et d'effectuer des mesures de
    fréquences. A cet effet, je vous invite à prendre connaissance des informations
    présentes sur le lien de notre site internet suivant:
    Can I Use the USB-6008/6009 for Period Measurement Using Events?
    http://digital.ni.com/public.nsf/allkb/14966D5D3A9AB75F8625700E00412DA1?OpenDocument
    Cordialement,
    Rémi D.
    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;}
    >> Les rencontres techniques de NI - Mesures et acquisition de données : de la théorie à la mise en ...

  • Problème de fonctionne​ment de Vi d'exemple avec USB-6009

    Novice sur cet outil que je viens de recevoir, je commence par utiliser les vi exemple pour générer et mesurer une donnée
    par exemple celui ci dessous :
    Cont Gen Voltage Wfm-Int Clk-On-Board Regeneration.vi
    J'ai mis type cadence d'échantillonage "On demand" sinon erreur
    Puis après lancement j'ai le message d'erreur suivant dans le sous vi
    Waveform Buffer Generation (multi).vi
    "L'erreur -200452 s'est produite à : Nœud de propriété DAQmx Timing (arg 1) dans Waveform Buffer Generation (multi).vi->Cont Gen Voltage Wfm-Int Clk-On-Board Regeneration.vi
    Raisons possibles :
    La propriété spécifiée n'est pas supportée par le périphérique ou ne s'applique pas à cette tâche.
    Propriété: HorlÉchant.Fréq
    Nom de tâche : _unnamedTask<20>
    Comme je n'ai touché à rien et que je suppose que les exemples sont bons, est ce que quelqu'un saurait quels infos il me manque pour faire tourné correctement la carte que j'ai testé et qui fonctionne bien

    Bonjour,
    Comme vous avez pu le constater le VI Waveform Buffer Generation (multi).vi qui s'occupe de créer le buffer pour la génération de vos signaux permet de configurer DAQmx et notamment le cadencement de la sortie. Or bien qu'en mettant la propriété à "On Demand" celui-ci essaye de régler la fréquence d'échantillonnage à une certaine valeur, ce qui est impossible avec le matériel USB 6009 qui ne supporte que le cadencement logiciel.
    Il vous faudra alors modifier l'exemple dans sa totalité si vous souhaitez avoir une génération de signaux "quasi" identique. Mais cet exemple n'étant pas fait pour ce matériel, je doute du résultat.
    En vous souhaitant une bonne journée.
    Cordialement,

  • Max. frequenza di generazione segnali digitali con NI USB-6009

    Ciao a tutti,
    ho bisogno di generare un impulso della durata di circa 10us usando un'uscita digitale del NI-USB 6009.
    Quello che riesco ad ottenere è però un qualcosa che non scende sotto ai 4 ms e che varia di volta in volta.
    La mia domanda quindi è: la velocità di generazione dipende in qualche modo dal clock del PC a cui il modulo è collegato o il generatore di clock è hardware interno al modulo stesso?
    Grazie mille,
    Massimiliano.

    I dispositivi USB 6009 permettono la generazione software timed, quindi controllata da sistema operativo.
    Difficilmente tramite windows si riesce ad andare sotto il ms.
    Se vuoi generare impulsi al di sotto del ms dovresti utilizzare schede che hanno clock onboard (tipo usb serie X).

  • Quelle est le courant maximum que peux fournir une sortie numérique de la Carte NI USB-6009?

    Bonjours,
    je voulais savoir qu'elle peut être le courant maximum que peux fournir une sortie numérique sans l'endommager de la carte NI USB-6009. 
    Cordialement.
    theolamache

    Salut :
    https://www.google.fr/search?q=NI+USB-6009
    Premier PDF que tu trouves, page 22/30, avec ça tu devrais pouvoir
    en déduire la puissance maximale d'une sortie numérique.
    De toute façon c'est l'appareil qui est le facteur limitant, en général
    c'est pas lui qui va flancher, c'est simplement qu'il ne fournira pas
    assez de courant pour faire fonctionner ton appareil.
    Il faut penser à un étage d'alimentation piloté par commande
    numérique (genre triristor) si tu veux plus de puissance. La
    commande numérique est juste là pour pouvoir piloter ce
    genre de composant, pas plus.
    David Koch

  • Driver fournit avec le module 6009

    Bonjour à tous,
    je souhaite faire l'acquisition du module USB DAQ 6009, mais je
    voudrais savoir avant si celui-ci est fournit avec un driver compatible
    avec le Logiciel Borland C++ Builder 6!!!
    Merci de votre réponse,

    The USB-6009 is a supported device under DAQmx which has an ANSI C
    interface, so yes you can access it using Borland C++ Builder. 
    You may need to download the import library at the following link:
    http://digital.ni.com/public.nsf/websearch/B09727F​89DA3A06C86256F430071D88E?OpenDocument

  • Comment crée une boucle qui ce répète le même nombre de fois que le nombre d'impultions que reçoit l'entrée compteur de ma carte NI USB-6009 ?

    Bonjour à tous,
    Je cherche à relever la tension aux bornes d'un capteur en fonction de la position de celui-ci donc en fonction du nombre de pas du moteur qui le déplace.
    Pour celà je cherche comment créer une boucle qui ce répète le même nombre de fois que le nombre d'impultions que reçoit l'entrée compteur de ma carte NI USB-6009.
    Le problème c'est que lorsque j'utilise pour cela une boucle while, la mesure ce fait en continue même si je n'ai aucune impulsion sur mon compteur (que le moteur ne tourne pas).
    Alors que je voudrais que la mesure ne se fasse que quand me moteur tourne et s'arrete lorsque qu'il s'arrete.
    Je suis vraiment débutant avec LabView j'ai donc beaucoup de peine malgré plusieurs heures d'essai infructueux.
    Ci-joint le .VI actuel.
    Merci d'avance à tous pour votre temps et votre aide.
    Cordialement,
    Alpine13
    Attachments:
    Presque.vi ‏166 KB

    Bonjour Alpine 13,
    Pour créer une boucle qui ce répète le même nombre de fois que le nombre d'impultions de compteur, il faut utiliser le boucle "for" qui prend les impulsion de votre compteur comme l'entrée.Je vous suggère de commencer avec un simple exemple. Regardez l'exemple suivant:
    LabVIEW >> Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Counter Measurements >> Count Digital Events >> Count Digital Events.vi
    Vous pouvez modifier cet exemple, de façon suivant. Mettez un boucle "for" dans le boucle "while" et branchez le sortie "Data" dans le nombre d'itérations de votre boucle "for", de cette façon votre boucle "for" va executer  le même nombre de fois que le nombre d'impultions de votre compteur. Aussi pour devenir plus à l'aise avec la programmation LabVIEW,  je vous recommande les articles suivants:
    Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications
    Getting Started with NI-DAQmx: Main Page
    Synchronize Encoder Counter Input and Analog Input
    Mikhail
    RF Toolkits, Product Support Engineer
    National Instruments

  • USB 6009 lock-ups?

    Hello,
    I'm having a strange problem with my newly aquired USB 6009. I've written an app to read the temperature from a temperature controller using the 6009 and that all works fine. However, the problem comes when I port this code into another application. The code is intended to run in a parallel loop to the main execution loop, to continuously read the temperature whilst other data is captured and process (all done in the main loop). Both applications run quite happily when separate. When I bring them together the applications sometimes, but not all the time, refuse to quit and just lock up. I have no idea what is happening as it is not a case of one loop remaining running (I've tried separate stop buttons) and they will run together quite happily. The problem only comes when I hit the button that terminates the main loop (this also triggers the other loop to stop - I'm sure this bit works as I've used the same method in another vi).
    The main loop should, in theory, just close. The loop with the USB reads (using DAQmx Base) will stop and then clear the task (DAQmx Base Clear I think). Sometimes the DAQmx Base Clear runs and the program stops fine, other times it runs and the program locks, other times it locks as soon as I hit the quit button.
    Any thoughts as I'm completely stumped on this one? Like I say, apart from the one button triggering both loops to terminate there is no link between the two loops.
    My only thought is it could be a USB issue as the PC also has a USB keyboard and mouse. I know from my home experience, when for instance plugging in my camera, it can cause the USB to lock if, say, my USB modem is running.

    See the thread
    http://forums.ni.com/ni/board/message?board.id=250&message.id=13722
    John Weeks
    WaveMetrics, Inc.
    Phone (503) 620-3001
    Fax (503) 620-6754
    www.wavemetrics.com

  • Usb 6009 digital input

    Dear All!!
    With the following vi. I'm trying to receive a 5V signal in a digital input, using a usb-6009 device.
    I would like to use the 5 VCC supply, available in pin 31 of the same device and send it to pin 17, representing line0 of port0. During execution, 'm physically connecting and disconnecting  these pins in order to see the difference in a led indicator. Unfortunatelly, the led is always on, even if both pins are disconnected.
    Could somebody help me? I would be very pleased.
    Thank you very much in advance,
    Miren
    Attachments:
    proof.vi ‏38 KB

    Hi Miren,
    "the led is always on, even if both pins are disconnected"
    RTFM?!
    They use open collector inputs with an internal pullup resistor of 4.7k, so you actively have to pull down the input to GND to see a difference...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • USB-6009 Sine Wave

    Hi,
    I am new to LabView and am having some trouble. I need to input two sine waves into a USB-6009. I have a voltmeter that should read the output. Two of the problems that I have had thus far: I can only use "On Demand" in DAQ Assistant and even when I throw the DAQ Assistant into a while loop I still do not get a readout on my voltmeter. Any suggestions? Thanks for the help.

    That is confusing. You say you need to input 2 sine waves into a 6009 and that to me implies that you are doing a DAQmx Read. Then you say you have a voltmeter to read the output. That implies you are doing a DAQmx Write. If you are really doing a write from the 6009, then on demand is, of course your only choice. As the specs clearly indicate, the output of the 6009 is strictly software timed so you would need to pass a sine wave point by point and then you would have very little control over the frequency. And, again as the specs clearly state, the fastest output rate you could expect is 150Samples/sec.

  • Usb 6009 acquisition fall after 15min

    Hello,
    Like it's said on the name of my post i have some problem with my new usb 6009. When i start it all work good but after a while my two AI fall to 0V. I put my code in joint pieces. I use AI0 and AI1 with a 220ohm resistance.
    Thank you
    Samuel Rioux
    Attachments:
    test.vi ‏30 KB

    Hi skling,
    DON'T use an additional Wait function when you have set your DAQmxRead to use a certain sample rate!
    It will wait on it's own and after some time you will miss to read samples in time...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Usb 6009 continuous analog output

    Hi
    I'm pretty new to Labview, so you may have to bear with me. I have a USB-6009 and I want to generate a continuos analog output voltage. I've got the example you have posted 'Gen Mult Volt Updates-SW Timed_LV7.1 (0 to 4).vi' working and it outputs a continuous sine wave.
    In a similar manner I need to generate:
    1. Ramp up voltage (and ramp down voltage): starting with a continuos constant voltage, which after a period of time linearly increases to another constant voltage, and which allows me to specify the 3 time intervals and the rate of increase.
    2. Pulsations: whereby I can specify the amplitude and time interval of each pulsation
    This is so that I can control voltage to a valve which regulates my pipe flow. In the example I have (one stated above), I do not understand specifically:
    i. Why I need both a 'Software Loop Time (ms)' as well as 'Timeout'
    ii. The 'Sinusoidal Pattern' input which seems to generate data for a sine wave- I can't get a description of that and there are no similar VIs for other waveforms; and what is the function of the two numbers it has?
    iv. How do I change amplitude and time period for the wave?
    iii. What does 'Index Array' do?
    thank you

    Hi there,
    I'm guessing the VI you are using is the one from this KB:
    http://digital.ni.com/public.nsf/allkb/6F2C2B49A89D685C8625711D007BDD64
    i. The software timed loop control is to control the rate at which you change the voltage output.  The timeout on the DAQmx Write VI is the maximum time in seconds the VI will wait to output a sample (eg. if the write buffer is full, the Write VI will wait for it to become available for 'timeout' seconds before outputting an error).
    ii. The sine pattern is just an array constant of doubles that make up the sine wave voltage values, and the for loop adds an offset (of two volts) to every single one of those values. You might want to replace that entire array constant and for loop with a Simulate Signal Express VI (just search for Simulate Sig or look in the Functions >> Input palette) and convert the dynamic data output to an array of doubles.  You can configure the type of waveform, amplitude, and time period from that express VI as well.
    iii.  Refer to previous answer.
    iv.  Index array returns an element of an array based on the index input.  You can turn on the context help and move your mouse over functions to get more help on them.
    I hope that helps!
    Way S.
    NI UK Applications Engineer

  • Usb-6009 high-speed continuous acquisition for slow control loop application

    Hi,
    After watching a few Youtube videos, I successfully built a control loop in LabVIEW using my USB-6009. Currently, this loop is limited by the speed my actuator can take and respond to commands, topping out at 200 Hz. This is completely sufficient for my application. My question is more regarding the wasted potential of the USB-6009 to acquire samples at a much higher rate than what would be obtained if I used a simple single sample-on-demand during every iteration of the loop.
    It seems to me that having the USB-6009 continuously acquire samples and having my control loop periodically check in for the latest data when it is ready to execute would have the advantage of allowing me to average groups of samples together to lower the overall noise associated with the measurement process (I am reading voltages from an amplified photodiode).
    1) Does anyone know how I would instruct the USB-6009 to continuously acquire at say 10 kHz, so that on each loop I will have 50 or so samples that can be averaged together for a more accurate measurement of my control variable? Unfortunately, I'm new to this and not too familiar with DAQmx Timing.vi.
    2) I've heard that reading into a buffer can increase latency for moving data into the computer. Given the low speed of my control loop, I don't foresee this as being a problem. Is this a correct assumption? I can probably live with an extra millisecond of latency.
    3) I goofed around briefly with DAQmx Timing and managed to see a buffer overflow error. Certain rare events will by necessity cause my control loop to take much longer to execute, so I cannot guarantee that occasionally during normal operation I will not overflow the buffer. Can I suppress this error so that the dialog box does not pop up and the program continues to run uninterrupted? If the buffer overflows and old data gets overwritten it isn't a big deal for me since the control loop is only concerned with the latest data anyway.
    Thanks for any info!

    Howdy Patrick!
    Here is a picture of the front panel:
    Here is the block diagram:
    And I've attached a copy of the VI saved for LabVIEW 7.1.
    Regards,
    Barron
    Applications Engineering
    National Instruments
    Attachments:
    most recent samples.vi ‏73 KB

  • Usb 6009 multiple analog inputs

    I am currently attempting to sample two different analog inputs at different sampling rates using a USB 6009.  I keep getting the 'resource reserved' error and am wondering if this is not possible using this DAQ.  Questions:
    1.  Does creating two analog input channels on the device cause this error?
    2.  Is it possible to sample at different rates on channels created in the same task?  (i am trying to 'slow down' the second analog input to display switch points to a customer)
    3.  Running multiple analog inputs using independent timing would be better achieved by switching to a higher end DAQ?  If so which would you recommend?
    I have attached my vi.  Thank you in advance for your help. 
    I surf therefore I am....
    Attachments:
    demo_nolvl.vi ‏27 KB

    The DAQ boards only have 1 timing clock for the analog inputs/outputs.  So you can only have 1 sample rate on a given card.  I would recommend just sampling at the highest of the desired rates in a single task.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

Maybe you are looking for