Outputs produced by the analog input job Retrig delay counter

Hi all!

First of all, I want to thank everyone on this forum who take the time to answer the questions, this forum has been invaluable to me.  I have a question about delays in adjustment to the pulse output of a counter, like what is described here.  My question is related to another, asked hereon the trigger of an analog signal and producing a pulse for each triggered event.  I have this job and can be seen in the attached vi.  Basically, now I'm able to produce a TTL pulse whenever my analog signal passes a predetermined threshold.  I have also documented the vi to my best understanding, if I have something wrong in the documentation, please let me know.

In any case, now that I have a pulse at each outbreak, I would like to be able to adjust the delay of events so that the pulse is not produced until the period n/20 (n = 0, 1, 2,... (19) what I expect to see is a similar pulse train in 'fig. 2' in the article, where the white pulse is the counter pulse, and the pulse red would be the same as my analog signal.  So, for example, if I had a 281Hz signal, I want to produce a single pulse with a width defined by the user whenever my signal crosses a threshold (it's zero delay: 0/20); This part may be made using the vi attached to this subject.  Now I want to delay this impulse as to each trigger event, a pulse is not produced until 1/20 of the period, or 0,000178 seconds after the trigger.

Looking at my vi, I think that if I change the output channel of the meter to 'CO Pulse Time' and then set the respective initial delay, time and little time, I can get delayed impulses mentioned in the article.  Correct me if I'm wrong, but I think that basically 'big time' controls the pulse width. 'initial period' is what controls how long to wait after the first trigger event is reached, before generating a pulse, but this applies only to the first impulse and not the rest; and finally 'small time' is the time to wait before the next pulse is created.

Earlier today, when I use the CO Pulse Time option, it seemed to work properly for me to a certain degree.  At low frequencies the impulses seem to trigger to each event when the pulse width is set at 2.5% of the period.  When I tested at 281 Hz with a pulse width, 'big time' of 0,000089 sec and without anything wired for the 'initial delay' or 'small time', the impulses seem to ignore systematically each triggers 2... that tells me that something is wrong in my settings, rather than problems with the sample clock.  So I decided to connect '0' to 'small time', but then I got an error message indicating that some time may be less than a value (I forgot what the error message).  So I concluded that I must not understand what these terms mean.

Sorry for the long explanation, but I really need help with this.  So let's say that the first set of data, I want to acquire is at zero delay, such as pulses are generated at each triggering event like how I have my VI now; so, for the next set of data I want pulses to generate 0,000178 seconds after the trigger threshold; so, for the data set third, I want to pulses to generate 0,000356 seconds after the trigger threshold; and so on... How should I do for this?  Thank you very much!

Hello!

Please post on the Forums OR! I think the main issue here is that you are sampling not fast enough to catch all of your high. So you set your high dry 0,000089. You will need to substantially increase the frequency of sampling in order to catch all these. Something around 25 k should do the trick.

To the extent where using the time counter Pulse, you're totally on track. I think that the use that the delay will do the job.

I hope this helps! Let me know!

Tags: NI Software

Similar Questions

  • How do I get the analog input signal and send it to output analog (real time)

    Hello world

    I do a simple task in Visual C++ and I use PCI-6221(37 pin).

    Basically, I want to send the same signal of "analog input" to the "analog output".

    at the same time (or almost), to make real-time application.

    Can someone provide me with sample program please.

    I would be grateful if you could provide me with the great tutorial that explains

    step by step everything about NOR-DAQmx for C/C++ programming.

    Best regards

    Khassan

    This is my code in C++, you can optimize it if that seems too messy. This code reads the analog input signals and exports it through the analog outputs.

    To make this code additional work of the directories include and library directories must be added to OR.

    I hope it helps someone.

    #include
    #include
    #include "NIDAQmx.h".
    #include

    #define DAQmxErrChk (functionCall) {if (DAQmxFailed (error = (functionCall))) {goto error ;}}

    int main (int argc, char * argv [])
    {
    Int32 error = 0;
    TaskHandle taskHandleRead = 0, taskHandleWrite = 0;
    Read Int32 = 0;
    float64 context [1000];
    char errBuffRead [2048] = {'\0'};
    char errBuffWrite [2048] = {'\0'};
    bool32 done = 0;
    Int32 wrote;

    DAQmxErrChk (DAQmxCreateTask("",&taskHandleRead));
    DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandleRead,"Dev1/ai0","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL));
    DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandleRead,"",100.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,0));
    DAQmxErrChk (DAQmxCreateTask("",&taskHandleWrite));
    DAQmxErrChk (DAQmxCreateAOVoltageChan(taskHandleWrite,"Dev1/ao0","",-10.0,10.0,DAQmx_Val_Volts,NULL));
    DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandleWrite,"ai/SampleClock",100.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,1000));

    DAQmxErrChk (DAQmxStartTask (taskHandleRead));
    DAQmxErrChk (DAQmxStartTask (taskHandleWrite));

    While (! fact &! _kbhit())

    {

    DAQmxErrChk (DAQmxReadAnalogF64(taskHandleRead,1,10,DAQmx_Val_GroupByScanNumber,dataRead,1000,&read,));

    DAQmxErrChk (DAQmxWriteAnalogF64(taskHandleWrite,read,0,10.0,DAQmx_Val_GroupByChannel,dataRead,&written,));

    }
    _getch();

    Error:
    If (DAQmxFailed (error))

    {
    DAQmxGetExtendedErrorInfo (errBuffRead, 2048);
    DAQmxGetExtendedErrorInfo (errBuffWrite, 2048);
    }
    If (taskHandleRead! = 0)

    {

    DAQmxStopTask (taskHandleRead);
    DAQmxClearTask (taskHandleRead);
    }
    If (taskHandleWrite! = 0)

    {

    DAQmxStopTask (taskHandleWrite);
    DAQmxClearTask (taskHandleWrite);
    }
    If {(DAQmxFailed (error))
    printf ("error DAQmx: %s\n",errBuffRead); ")
    printf ("error DAQmx: %s\n",errBuffWrite); ")
    }
    printf ("end of the program, press the Enter key to quit\n");
    GetChar ();
    return 0;
    }

  • How to write constantly to analog output and read from analog inputs

    Hi all -

    I had a question about writing continuously to analog output reading simultaneously an analog input.

    It's my first time to post a message to the community, so please let me know if I made mistakes.

    I use Labview 2011 with a NEITHER-DAQ USB 6215.

    I'm looking to generate a waveform and write it continuously in an analog output. It is then connected to an entry on the acquisition of data, where I am trying to sample the analog signal. (I realize, there is a system of trivial, but I'm hoping to build on it once I have run).

    The task of reading from the analog input works fine, as I tested it in several other cases. I have a problem writing to the analog output.

    For this task, I tried to follow the "Gen Cont Wfm Clck Int' VI to generate the wave form and start the task. I then try to write to the output of the analog timed loop. However, it does not seem to transmit a signal and doesn't give me any errors.

    I have attached the VI but also a screenshot.

    Please let me know if anyone has any ideas. I would really appreciate the help!

    Thank you

    Peter Borgstrom

    We will review your tasks one at a time.  First of all, the task of generation/Analog output Waveform.  Generate you a waveform (I'm unsure of your VI if it is a fixed waveform or not) and send it to a defined output function to produce a waveform continuously, using N-channel and samples of N (where you set not these previously).  You should not put this inside has timed loop, as the DAQ hardware has its own clock - if you simply put it in a while loop (with a stop to break out of the loop), the loop will call the function for the first points of N, wait until all N have been taken out, then call it again to another N points (up to what you press Stop).

    Now, suppose that you have the output connected to a load voltage (say a decent resistance).  You can wire the input terminals of your A/D converter through the same load and set up a similar analog input loop, running in parallel (i.e. in its own independent of the OD loop, while loop).  You pourriez start together (with, say, a merged error since the initialization code line loops HAVE and AO become lines of error in "loops of sampling" described above), but you might want to delay loop (a little) the AI so that the OD has a chance to set the voltage before the bed.

    I hope this helps.

    BS

  • I can't watch the analog inputs in hearing CC 2014

    I have a M-Audio M-Track more USB audio interface. Digital interface output is connected via coaxial RCA to my receiver. The analog inputs normally receive a signal from a phono preamp line, since I transfer a lot of vinyl to the computer to listen to in my car and my phone.

    The thing that I'm trying to understand is why the hearing does not allow me to monitor the analog inputs. I can monitor them very well when I use Studio producer One of the Presonus. But the hearing does not allow me to follow, although it does not record the signal and then I can read.

    The audio device at the hearing, I've chosen is the ASIO of M-Audio driver. Under audio mapping I can't select anything other than the analog inputs and outputs. It is not an available digital output, which could be part of the problem, perhaps hearing does not allow the signal to convert analog inputs to the digital output. However, as I said a producer Studio control perfectly well, so the analog/digital real-time monitoring is allowed by the device.

    My hardware is PC with Windows 8.1 Pro 64 bit, i7 3930 k, 32 GB RAM, card mother Asus P9X79 Pro, and some other stuff that wouldn't really make a difference in this problem.

    Any ideas?

    Thank you

    Sebastian

    Try recording in multitrack view and by clicking on the little 'I' (Input) button at the left end of the track.  It should route the signal from input to output for monitoring.

    I have the background track M, no more, so I can't try it but I think it should work but with a bit of latency (which shouldn't be a problem since you're not dubbing.

  • Registration of the analog inputs in continuous (Clipping)

    Material:

    (1) USB NI CDaq-9174 chassis

    (2) NEITHER 9234 Analog Input Modules

    (1) digital input module 9402 OR

    Goal/Requirements:

    To read the analog inputs continuous only in digital input is "high".

    Problem:

    Timestamp in log file prooves that logging is not continuous. It seems that the first seconds of 0.6 of every second is recording, I guess the other 0.4 is used to write custom? I can't use VI SignalExpress for this application because logging must be triggered by a high digital input.

    File is attached. Thank you all!

    To detect changes in the digital input, you need to compare the current value to the previous. The easiest way to do this is to plug the output of digital playback on a shift register. The Boolean function involves will tell you when a transition has taken place.  See the central part of the image below. If you exchange the true and the false case of case structures, you not the inversion function.  Look at the help file for more information on what the function actually implies.

    You must also change the wiring of the name of input for writing custom file FIle.vi so that the name is automaticlly changed.  Depending on what you want the naming system to be, that it can be simple or rather complicated.

    Lynn

  • How to read the analog inputs of one Board of R for (PXI-7851R) series

    You can guide me please with the steps for reading of the analog inputs of a series a. card I use as the target fpga PXI-7851R.

    Have you looked at the examples provided with LabVIEW? There are examples showing how to read the analog inputs.

  • Open a synchronized session of the analog inputs and position

    I want to read 8 analog inputs (only three IA in the capture of code) with a PCI-6221 card at a rate of 100 samples/s, reading 10 samples/iteration. At the same time, I want to read the position synchronized with the analog inputs. Is this possible? If I just merge the position with the analog signal I get 10 readings of position for each 100 analog input readings (see chart - Red's position). For the control of the movement, I use the pci-7342 with UMI-7764 interfaces. Could someone help me out here please?

    Not necessarily. As said, speeds of up to 200 Hz should work fine with a 7342. If this is not enough, of course a 7350 could be used, but there is also a completely different approach that should work with your current hardware:

    7342, you may also route the phases of encoder to the pins of the RTSI. You can use a counter on the 6221 to measure the position of your axis based on the singlas you have routed the RTSI pins. Now you can use "Measure of Position buffered" (see DAQ examples) to measure the position with the same source of synchronization than your analog signals.

    I hope this helps,

    Jochen

  • Reading of the analog inputs

    Good day to all,

    I use NEITHER-7350, LAbview 8.5 and try to measure the voltage from a power source.

    Is there a screw that read the analog inputs. I can't open the examples.

    Thank you

    Have you watched the DAQmx? Create a virtual channel, start the task and read the value.

    http://zone.NI.com/DevZone/CDA/tut/p/ID/5370

  • What is the analog input of the NI PCI-6229 impedance?

    I am trying to determine the effect of a 12 K resistor that is in series with an analog input of an NI PCI-6229 data acquisition card.  Resistance of 12K seems to be part of a RC filter.  I have a 0-10 VDC source this supply circuit.  What is the impedance of the analog input of the NI PCI-6229 data acquisition card?  If it makes any difference, the analog input is connected in differential mode with a 180K resistor to Gnd AI.

    Thank you

    RWB

    Hi, RWB,.

    The input impedance is classified in the specifications 10 GOhm.  So, the effect of your k 12 resistance should be relatively low.  Take care!

  • Toggle the analog inputs and tasks of output on the same card in LabView

    Hello

    I'm relatively new to LabView and am trying to find the best way to switch between reading and writing tasks on my PCI-6024E. It seems this would be a common thing to do, but I found no good documentation or any relatable example program. Basically, I would like to be able to monitor certain analog inputs and then write that some outputs if an entry is in accordance with certain specific conditions (say > 4 Volts voltage). It is my understanding that you can only signal (input and output) types associated within a single task in DAQmx. I also understand that you cannot have multiple tasks running at the same time on the same material/map, otherwise you get a: 50103 error 'The specified resource is reserved. Calendar is not really all that matters to me, but quite synchronous and effective would be nice.

    I have attached a sample program that shows more or less what I'm trying to do. I want to follow several analog input lines (AI0 AI1, AI2 and AI3 and) effectively at the same time. If certain conditions are met, AI3 > 4 Volts, then write 5 Volts for analog AO0 and AO1 outings. I also want to maintain output at 5 Volts up to AI3 falls below 4 Volts. Is there a better way to pass the task to read and write than what I've done here? In a sense, all I really do is toggle of a state machine if the required conditions are met and if start/stop tasks of reading/writing necessary.

    One last question, is there a way to display the four channels in the waveform graph using the 1 d NChan 1Samp mode so I can have a time chart and indicators?

    P.S. I'm under LabView 2011 on Windows 7. Your ideas and suggestions are appreciated.

    Thank you

    KJ

    I also understand that you cannot have multiple tasks running at the same time on the same material/map, otherwise you get a: 50103 error 'The specified resource is reserved.

    This is incorrect.  You can't have two tasks of the same type running on a single card.  You can have an analog input and analog output task running simultaneously on the same hardware.

    You are right that each task can have only one type of task (entry or exit).  Discover DAQmx examples in the example Finder to get examples of synchronized input and output.

    PRO TIP: In the Finder of the example, go to the drop-down list in the lower left corner.  Pull down and select Add Hardware.  In the pop-up window, add your PCI-6024E to the right pane.  Click OK in this window.  Then in the main window of Finder example select your hardware from the drop-down list and check the filter results by the hardware.  The example Finder then only you will show examples that are out-of-the-box compatible with your hardware.  I am sure you can find something to fit your needs here.

  • How to synchronize the analog input and the output of two different USB data acquisition boards

    Hi all

    I have two tips very different USB NI USB 6008 case, which I use to acquire the data (analog input) and a USB of NI 9263 is a output analog only site I use to route a signal (in this case a square pulse). The reason why I use the outputs analog 6008 is because I need to deliver negative tension and need the full +/-10 v range.

    Looking at similar positions, I'm pretty sure that I can't use an external trigger or a common clock, I also tried to use the timed synchronization of the structures but no cigar.

    I'm including a quick vi I whipped showing how the jitters because of the lack of synchronization signal. The OD of the 9263 connects to AI in the 6008 in this example.

    I talked to a specialist in the phone and tols me that's not possible.

  • can you have set for the analog inputs points

    If you install an analog input can you get set points that trigger an alarm or an engine that allows you to enable or disable

    In SignalExpress you can use alarms to trigger recording on and outside:

    Alarms Page - help of LabVIEW SignalExpress

    Regarding disabling engines, SignalExpress is not intended to control applications.  For controls, you should use LabVIEW or entirely a VI in LabVIEW, SignalExpress.  To do the latter, you use a LabVIEW VI step in SignalExpress that will run a LabVIEW VI that performs control of treatment and the output you want.  This way you could work in the SignalExpress environment for all the acquisition of data, and you should only use LabVIEW to program control VI (or screws).

  • Test the analog inputs in a PCI-6013

    Hello. I m using a PCI-6013 OR DAQmx 9.1.1 with Labview 8.2 (sued) WinXP. The jury has undergone an immersion in water during a flood but was cleaned, recognized by WinXP and NIDAQmx.

    I have run the Measurement & Automation explore and use the test under option OR-6013 'Dev1' panels 'devices and Interfaces. Here, I can see that the digital and clock output work perfectly (I can change the State of the digital channels and duty cycle and frequency of the clock). The problem arises when you try to measure an analog voltage. I tried on several cases not all analog channels using NRSE and differential modes (switch accordingly connections).

    The signal comes from a (4 Hz, squares and sines, 5Vpp) signal generator via a CB-68LPR connector.

    I only see something comparable to the entrance of singal when you use differential inputs (signal connected by J57 and J23) AI7, but the signal I see comes with 100 mVpp instead of 5 Vpp (I can see changes in the shape, every time that I have spend of a sine, square, ramp...). I also tried connecting J23 AISENSE (J62) and AIGND (J67), to avoid the problems of floating source. The same thing happens when enter and set up the acquisition by the vicinity of data in the Explorer of Measurement & Automation. I m using the reach of the signal in the different ranges, tried with 04:55, -1 to + 1, 09:50... When you configure tasks NIDAQmx I choose to read different samples (100, 1000, 10000) rate (100 Hz, 1 kHz,...) and combinations. Anyway, the input signal is always 4 Hz. I checked the signal with an osciloscope and I see it perfectly.

    Is it possible to have the broken while the digital and general-purpose analog input clock outputs are OK? Y at - it a tip for the connections I should know about? Thanks in advance for any guidance!

    Thank you both, KateB and MarisolM for your answers.

    I made several the tests con señales DC y con señales senoidales, instalando placa en back different computers, y no obtengo resultados positivos, is spite of what el self-test selling well. Seems that the Plaça realmente esta fallando.

    I did several tests with DC signals and senoidal, installing the card in two different computers, without positive results, even if the self-test is OK. It seems that the Council really works hard.

    Are concentration cotización por su reparación. Gracias!

  • reading of the analog inputs with RPC

    Hello

    Because LabVIEW can not handle this (in VI; the value that you have saved the excel file has not been the same, that I saw during the measurement...) This confused me for a long time ), I want to write a C++ program (IDE: Dev - C++) which can read & record 2 analog inputs of the NI USB-6009 box. For this, I looked for an example of National Instruments and I found a little. But my problem is that I can't even use any example, because it has always held a mistake, after that I have compiled and started.

    The error once the task has been created and has the :-200220 error number with the description "device identifier is invalid. But I do think that its invalid, because it's the xP example

    I must say that I am new in programming C++, which means I could have a rookie mistake. And I couldn't find documentation or something for the NOR-DAQmx library.

    Someone has similar problems with DAQmx and C++ and know how to fix? I don't really know what I can do now without a working example or documentations...

    Hi Mario

    It's the same thing. You didn't just save all of the data:

    Please take a look at my comments in the attached VI.

    Christian

  • PXI-6071e offset drift on the analog inputs

    Hi, I have three cards PXI-6071E, sitting in a PXI-1042 chassis that is controlled by a computer with windows XP.  The 6071Es are connected to the SCB-100 break out boxes that are wired to a pannel of BNC female Panel Mount on twisted pair.

    I noticed that all of my analog inputs will drift around-10 V to + 10 V if they are not connected to what whether forcing them to a certain tension.  This has always happened.  We also see a bit of crosstalk between channels.  For example if I open a panel of test in the measurement and automation Explorer I can watch the voltage read on the drift tickets through their full range, and alteration of the signals on nearby channels will appear on the channel, I am able.

    Is this just standard behavior and to predict?  Is there something more I could do to minimize this drift and crosstalk?  I am trying to reduce noise in my system so I figure optimize my DAQ could not hurt.

    Thank you

    With nothing plugged into the catch to high impedance, drifting you see is quite normal. The front end of the circuitry builds up a charge, crosstalk is proabably due to the multiplexer input (did not check but I think that the 6071 has a) transferring the load to the other channels when they are analyzed.

    Search the Forum of ghosting, you will find related discussions.

    -AK2DM

Maybe you are looking for

  • AUTOMATICALLY SHOW DOWNLOADS WHEN YOU ARE FINISHED

    I would like to first of all the computer automatically opens the downloads page, when they have finished downloading

  • disappearance of storage with Safari el capitan

    I have a macbook air 13 "mid-2011 running version 10.11.4 El Capitan.  It has approximately 17 GB of free space for HARD drive storage. When I run Safari (9.1) and let the system and Safari open my HARD disk gradually drops and finally will be reduce

  • Satellite P300-23V - marker is suddenly jump

    I have a SATELLITE P300-23V with Windows 7 Home Pemium.I have an irritating problem. When I write a document in Word or write an email in Hotmail manufacturer is suddenly hopping somewhere else during the writing. When you are looking at the keyboard

  • installation of scan on officejet 6500

    I installed this printer printer/scanner/fax combination but when I go to use the scanner it tells me that my computer is not connected.  Can you help me to get it connected? Thank you! Rnutts

  • Refusal of the WORKSTATION to access external hard drive window

    Hello I can't access an external hard drive (WD My Book Home Edition). The problem happened when I disconnected my external drive from my Win XP Pro computer and plugged into another Win XP Home computer that had another WD external drive attached to