Output of Pick and Sample & Hold DAQ

Hello

The VI I must do the following:

  1. Generate low frequency (~ 1 Hz) saw tooth (DAQ AO0) value
  2. Entry of reading (DAQ AI0), which depends on generated value (for simplicity I just connected AO0 with AI0)
  3. When some condition occur, immediately stop generating sawtooth and maintain the last value on AO0

For simplicity, "certain conditions" is realized as transition 20th the sawtooth on the threshold value.

The interaction between 'Génération' and 'Acquisition' loops is carried out with the help of the local variable ""Stop generation loop "."

This Setup works perfectly except the following:

  1. When stops in 'generation loop' , value of production data acquisition is not equal to the threshold value (as it is supposed to be)
  2. The DAQ output value does not depend on threshold... threshold value is set, the output is about 2.2V (ordered on oscilloscope)

Any suggestions welcome

Concerning

Pavel

Pavel_47 wrote:

What could be the reason for this inaccuracy?

You have a race condition with the local variable when the variable is read before the release gets its new value.  That's why the loop iterates again.  Thus, you should use a flat Structure of the sequence to force the local variable playback after you the value of production.

Tags: NI Software

Similar Questions

  • Synchronization of analog and digital output with the external sample clock

    Hello

    First of all sorry for my English, I will try to explain what I want to do.

    I want my PCIe-6321 to send two custom signals (modification sawtooths) on a mirror controller. I would also like to generate output with my card at the beginning of each tooth of saw. Everything must be synchronized with an external k-clock signal of 100 kHz. The idea is that whenever the PCI receives a trigger to external clock, it sends two analog output voltages and when he received 1024 clock ticks it will also send a pic of triggering TTL. What I do is first prepare the map and after that in a loop sending and modifing the output values of the two signals and at the same time send a digital signal Boolean in each arch, so when's done it 1024 iterations of the loop I send an event to the digital port. Attached you can see.

    The problem is that I don't know how to synchronize both. Can I use the sample clock just to the analog output? I can use sample for the two outputs clock, or do I need to use the output of the meter? If don't know how to use it here.

    If I do nothing else bad/wrong, I would be grateful for feedback.

    Thanks in advance,
    Pablo

    I don't know how but I find the solution. I'm generating more than a positive value (as I was triggered maybe very fast the oscilloscope has been absent there). If I put the sample clock of digital output to use the sampling/ao/Dev1 clock that it doesn't, but if I put to use the same source as the OD (terminal where my external clock is connected), but the trigger to start the DO to be Dev1/ao/StartTrigger this works. I don't really know why, but it does.

    Thank you for your patience and your help. I put here the final code.

  • Reading and samples the sampling frequency using a fast external clock

    Hello

    I use an NI USB-6212 box to launch a search engine for combustion. I have a pressure sensor in the head and a wheel on the crankshaft. I use the beats A Quad channel of the rotary encoder as a sample external to the pressure with the sample clock. The idea is that I want almost the same number of points in each trace of pressure so that it is easy to average together. I seem to be able to do this at low speed, but I'm having issues at high speed.

    Can someone tell me what I should have my sampling rate and samples to read together and how it effects my sampling when using an external clock? Samples per channel will affect the size of buffer and that matters? When I was high (10-100 kHz and about 1/10 * rate for samples to read) it barely read but as I put the lowest and lowest he read faster. Play with the settings a bit seem to affect how well it samples at different speeds. The engine is running at 3600 rpm and my encoder puts out 2500 pulses per turn on one channel, I'm looking at a frequency of 150 kHz effective sampling. However I didn't sample program with the engine operating at full throttle. I hung on the output of the encoder up to a scope and reads very well.

    Are there opportunities the filter counter that I see in the manual of 621 x is enabled inadvertently?

    Thank you

    Xander

    Xander18,

    I suggest you move your screws initialization outside the while loop, as well as your narrow DAQmx VI.  On my side, it looks like a new task is performed for each loop, which takes time.  That a try and let me know how it goes.

  • Relationship between the samples through the second rate and sampling

    I was wondering if someone could clarify the relationship between the samples through second rate and sampling.

    I have USB6008 and USB6363 of the tips that I work with in Measurement Studio.

    For the nec USB6008 entry differential (up to four channels of HAVE), if I put a sampling frequency to 8192 samples per second, and I updated 2048 samples per channel with:

    Task.Timing.ConfigureSampleClock ("", 8192, SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples, 2048)

    Am I right in assuming that:

    • through the 4 analog inputs 8192 samples will be collected every second
    • 2048 samples will be taken by way of analog input for each scan
    • The time between two successive data points is 1/2048 seconds (about 0.5 ms)

    Hi DKIMZEY,

    The help page for the "Timing.ConfigureSampleClock method" should have a hypertext link to the page "Sample clock" in NOR-DAQmx help, that contains this text: "this sample clock sets the interval of time between samples. Each tick of the clock starts the acquisition or the generation of one sample per channel. "When the sample clock frequency is 8192, then the time between two successive data for a single channel is 1/8192 seconds. The time between the data points on two adjacent channels is controlled by the clock to convert, which can be controlled independently on most devices (up to a point).

    Brad

  • Strange problem with analog output PCI 6251 and BNC-2110

    I'm controlling current source of third parties using the connectors of analog output on my card PCI 6251 and BNC-2110.

    The current source needs an input signal of 0.1V. I tested it using a battery, the potentiometer and the voltmeter, and by manually adjusting the voltage of power current works - current output with control voltage scales according to the specifications and is relatively stable.

    The data acquisition card works too - when I connect a voltmeter to the AO0 AO1, the measured voltage corresponds to the target with great precision value.

    But when I connect the current source of third AO0 AO1 data acquisition card, the measured output voltage drops and fluctuates. This applies to both channels of the AO.

    I wonder what is the problem here. I suspect it could be a matter of the grounding - the current analog control of the source is an entry with two floating terminals differential. I tried to return the switches FS/GS on the BNC-2110, but that makes no difference.

    Anyone knows similar behavior? Does anyone have any suggestions?


  • Flag that Pick and a flag as rejected, sometimes simply does not work

    Another day another Lightroom not work and confuse me for a resolution.

    Since my last post, I've improved cache of Lightroom to 50 GB size - there is so much space for the cache to play with.

    But now, sometimes, every once in a while, just Lightroom leaves to do anything. I mean, it could work, then not work, then again. This is really disturbing to the workflow and means having to kill and restart the program every 3-5 minutes to apply for 'work' checked.

    Only with Lightroom. all other programs work very well.

    Video: here I'll put in the image/s to the flag as Pick and mark as rejected and the indicator never appears and the images rejected gray never out:

    VID_20160321_112057.MP4 - Google Drive

    You can see "Set have rejected" overlay appear, but then... nothing.

    Is there another setting , I can change to ensure keyboard controls actually do their job and the program is not having the hiccups and quit work as expected?

    Thank you for your advice.

    Try to delete your preferences file.

    https://helpx.Adobe.com/Lightroom/KB/preference-file-locations-Lightroom-41.html

  • Productivity of FMS and sample downloads broken tools?

    I could be a huge jerk, but I really need the Adobe F4V post processor for the work I do in the FMS 4.5. It seems that downloads of tools are not available on: http://www.adobe.com/products/adobe-media-server-family/tool-downloads.html

    The only thing that can be downloaded is the Adobe Access for Apple iOS library.

    Anyone know if it's on purpose?  Am I just dumb?  In the FMS 4.5 tools directory there is no F4V post-processor. Anyone know where I can get productivity tools real FMS and sample downloads?

    We look at the issue.

  • Need a sample RH11 Webhelp output with categories and browse sequences...

    I am looking to test a plugin (of sorts) with any HR 11 Webhelp output that uses categories and browse the sequences. A Webhelp output from the sample project Salesbuilder 2 would suffice. I won't buy another version of HR for a trial.

    If someone could post a file zipped from the release of somewhere, or send it to the email address on my profile, it would be extremely useful.

    Thank you

    Roger N.

    I have them wrapped in beautiful jackets of WinZip and sent them via wetransfer.com

    See www.grainge.org for creating tips and RoboHelp

    @petergrainge

  • 6259 analog integrated Output error with the sample clock

    I run into some problems outputing a sinusoid of analog output with my acquisition of data using the sampleclock aboard. At one point, I was able to get the vi works pretty good and repeatable. When revisited however, I started to see error that the driver could not provide the unit with the points quickly. I was running at 250 k 1 k sampling rate a tone to one, but it seems only to be able to get about 20 k, sampling frequency. This creates a pretty rough signal, expecially when the rate fell to 8 k. I produce only 1 second of data.

    See attached bmp. The I/O moved references aren't channels of tasks. Could be the problem? I'm a little frustrated because he has to be a very simple to create vi and I'm having all sorts of problems with it.

    Hi klessm1,

    I want to stress that the behavior you're seeing is atypical - under normal circumstances, DMA transfers must take place fast enough to keep the data in the FIFO embedded permanently until at least the max (2.86 MHz single channel) sampling rate.  After saying that the error you receive indicates that we get no data for the 6259 fast enough for some reason - there are a few options at this point, it should get you operational:

    Remove the need to transfer data to the device.  As Sarah suggested, you can do so by regenerating the on-board FIFO.  The FIFO output on the 6259 is 8 191 samples (shared between the channels), so if you build a periodic signal and this is a sufficient number of samples to characterize a period then this should be a viable option.

    Try using interrupts instead of DMA.  This may seem paradoxical since DMA is generally the fastest method of data transfer on our DAQ hardware, but something rings the Bell with the DMA transfer from your computer to the 6259.  I imagine that you will actually have a faster rate using interrupts if that is the case.

    You can configure the appliance to use only the quantity of memory onboard or interruptions using a channel property node DAQmx (Analog Output > General Properties > advanced > memory and data transfer)

    Implement a delay between the start of the task and the first sample.  If the problem is with the first DMA transfer latency (and not the total throughput on the PCI bus), then adding a delay before attempting to write the first sample should solve the problem.  Some motherboards have been found to have a latency higher than the others (so the question of Sarah #3).

    You can configure the delay with the property node Trigger DAQmx (start > more > Delay / delay units).  This applies even if you do not explicitly have a configured start trigger.

    I think the three above are good ideas to try depending on what you need exactly.  I would also check for updates to the BIOS available for your motherboard that could address the issue (but it would be something that the manufacturer would be more known).  I hope this help - made - know us how it goes!

    -John

  • FFT window and sample

    I use Signal Express but this issue applies to any software. I hope someone can help us with that. I use a card OR-9233 to measure acceleration. I put my 25K sampling rate and put a filter of 10K. I use the software to trigger.

    My setup is the accelerometer mounted at the back and the back of the handle of a hammer (down where you would hold it). I was asked to measure the outcome when a small steel ball fell (slightly) to the shock of the hammer head. The accelerometer is a PCB brand 1000g pezioresistive accelerometer, (mechanical BW around 10 kHz).

    My question is this: is it possible to perform an FFT when you are just going to "hit" the hammer and measure the result? I'm not measuring the real impact, only the vibrations after it is hit. When I taste, let's dire.5 seconds, I get a nice time signal, and then I apply a FFT. When I shorten the time of acquisition to 40 milliseconds, I'm obviously only enter the beginning and my looks different FFT (highest magnitude), so I started to wonder what is "real"? Operational entities designated and required a repetitive signal of the FFT? Is there a limit to how many "small" or "large" of a time signal that I have?
    Looking for some general guidance as my name of field time - frequency domain skills are so right now.
    I have the ability to use a sensor to measure impact energy impact, but it is a large sensor. My accelerometer is small. I'm up to the side of the accelerometer AFAIK. I'm wasting my time with a FFT?

    Kind regards

    Jeff Scharpf

    Jeff,

    Ok.  You have a definition of the problem: say the guy marketing you can measure a difference between the two handles.

    I guess that both use the same head and the head is solid metal and the handles are of different materials.

    You have a way to generate a coherent stimulus.  If you always to clear the ball from the same point, you should get a fairly coherent excitation of the hammers.  It is possible that the way in which the hammers are hung in the framework could affect the results, but my guess is that this will be a minor effect.

    I guess that the answer of the head is a complex resonance excited by the impulse produced by the ball.  It will be complicated because the form of the hammer head is asymmetric (unless it's a hammer) and due to the load produced by the handles.

    I'll try to measure the reaction of the accelerometer in a few places on the head of the hammer (places where he could not get hit by the ball!).  If you can get something that's fairly consistent between the two hammers here, so you have a reference for comparison purposes joint entry.  If the answers of the heads are very different, so it will be harder.

    Then, I would look at the response of the handles in comparison to the heads.  Two accelerometers, an on the head and the other on the handle, measured at the same time are ideal.  I would look for differences in depreciation.  In other words, the ring die down more quickly on a handful than the other?  It is a measure of time, but it may require that the filter to select a unique resonance at a time.  I think you want to get as much data as possible, the second half or more as you mentioned earlier.  Short segments may be more difficult to interpret and not have al the information you want.

    If you can post data, a person may be able to give some other ideas.

    Lynn

  • Synchronization of AO and output counter, arming and triggering the sequence of events

    Hi all

    I'm trying to synchronize a counter (used as a digital pulse) and analogue of a custom waveform output read from the file on a USB-6211. The goal is to always have these running until I hit 'STOP' and to be able to change the position of the pulse relative to each other. I created a VI by combining and modifying the Cont.Gen.Wfm.Int - Clk.Non - Regen.VI and the Continous.VI Gen dig Pulse Train and I'm now able to produce the two signals to the desired frequency, but I can't seem to get the "Initial period" to work correctly. The values that I come home do not seem to match what is happening LeRiz, and the spacing seems to vary from run to run (within each series is constant). In a previous post, Alfred has suggested:

    "Trigger counter outputs out of the trigger to start AO and adjusting the setting 'Initial period' should give you what you are looking for."  Don't forget to start the tasks of meter in the software before the tasks of the AO (if they are armed and ready to go before the start AO is sent). »

    (link here)

    I tried to use the controls and the propertynodes (perhaps incorrectly), but it doesn't seem to make a difference.

    I think what happens is that my arms and firing sequence is not done correctly. I read on as much information as I could about the outbreak and armament, but I don't know that I understand correctly. Most of the examples I found using an external trigger or perform analog input tasks finished. Does anyone have a suggestion on how to start my two tasks in the proper order? Is something else is wrong here?

    Thank you

    Gabe

    P.S. I have attached the VI and a sample waveform read.

    Hi Gabe,

    This is a cleaned of the VI version that should work (you need not adjust the initial deadline on the right fly?).  Instead of reading a file, I made just a simple square wave of 50% to be used for the test.

    Best regards

  • Picking and Portege M400 displacement causes the crash and locking of the

    I have a new problem with Portege M400, which began a few days ago.

    If I pick it up or move it, then it will crash or lock up. I wonder if anyone has any idea as to what may be the cause of this and what can be done?
    My only guess is to replace the hard drive?

    Thank you
    Greg

    > Turn off accelerometer does not help. Internet research indicates that it is possible a motherboard problem. Replacement motherboard solves problems for about 6 months to a year, then it returns.

    I doubt that it could be a motherboard problem, what the gbaniseter say this happens when it pick up or move the m400, then it will crash or lock up.
    This seems to be a problem of HARD drive and it s nothing uncommon who, after a long period of use of the disk HARD start HARD drive malfunction is a sensitive device and can die because of the physical restraint
    Replace the HARD drive and check if the problem would happen!

  • Intermittent output HDMI (sound and vision) Z70-80

    Hey everybody,

    Hope someone has some useful advice. Got my lenovo about a week ago. Try to connect to my smart TV via HDMI and are based on the questions:

    1 connection is not immediate, i.e. I need to plug and unplug the cable hdmi repeatedly until I receive audio and visual signal.

    2. when it happens that the connection is intermittent and I need to redo the procedure of sam, but still the connection remains inconsistent.

    I've never faced it with my very very very old Toshiba laptop. Once I have connected the Toshiba smart TV connection was there immediately without effort.

    Is there something that I am on?

    I would be very grateful for any help

    Thanks in advance

    If it works sometimes and sometimes not, seems to be a hardware problem.

    If your phone has a removable battery, unplug the power, remove the battery and hold the power button / stop for 40 seconds.

    Connect everything, then restart. See if that helps.

    If you don't have a removable battery, then contact you lenovo and tell them you received a defective HDMI port and the connection is intermittent.

    It is the page to check the phone numbers and guaranteed to call-

    http://support.Lenovo.com/us/en/contactus

  • Output USB amps and the voltage on the Satellite A100

    Help, please. I have a device that recharges its battery via the usb port. It only came with a car charger which has an output of 5 v 1. 0a - what is the output voltage and amps for my Satellite A100 usb port?

    Hello

    Generally, the USB ports provide 500mA.
    USB voltage values are know not to me but to my knowledge all the USB ports must supports USB standards.
    So if you are using a device that supports the simple USB 2.0 standards you should be able to recharge your battery

  • To input analog shutdown when the analog output is completed and synchronization

    Hello

    I'm trying to get my LabVIEW program to send analog output to a computer and read acceleration using the cDAQ-9184. Chassis output that I use is the NI 9263 and the chassis of entry is the NI 9234. I generate a signal of white noise using LabVIEW Express signal generator.

    The first problem I have is the synchronization. I had an old VI that has begun to measure the acceleration just about a second after the entry has been given to the machine. I used the LabVIEW tutorial on how to sync the analog input and output, only to discover that it does not work with two different hunts. Then I found another tutorial that shows how to synchronize different frames between them.

    The second problem is the cessation of the LabVIEW program. What I want to do is to generate the signal and then simultaneously send and read the input and output analog, respectively. It is because I don't want a phase difference or any shorter signal for a direct comparison. But as soon as the signal is sent to the machine, I want the entry to stop analog playback and then then the LabVIEW program must stop. I want to be able to choose any length of signal to be generated and stop as soon as the entire duration of the signal has been sent to the machine.

    I tried 'DAQmx stop', "DAQmx Timer" and 'DAQmx's task made?' and none of them have worked for me. It is also my first time on a forum posting, so I hope I gave enough information. I enclose my VI as well. The VI shows I read an entry for the analog input voltage, but I am only using this to try to get to the work programme.

    I'd appreciate any help I could get.

    Thanks in advance

    Peter

    Hi Peter,.

    I have some recommendations for you that I think you will get closer to your solution. First of all, I assumed you meant that you had 1 chassis (cDAQ-9184) who had two modules in it (NOR-9263 and NOR-9234). My next steps are based on this assumption, so if it's wrong, please let me know.

    For your first question about the synchronization, the code you provided is very close to what you need. You need to do, however, implement architecture master/slave for startup tasks DAQmx functions. To do this, you can add another frame to the flat sequence structure and put the master start task (input voltage) after the start slave (output voltage) task.

    To manage your second question and that the program ends at the point where you, the first step is to get rid of all the logic that you use with the local variable of length of time. Rather than use this logic, just wire the node "task performed?" of "is task performed?" operate to stop the loop. This will cause your loop to stop as soon as the signal is sent to the machine.

    I have some other recommendations for you that will increase the performance of your program:

    (1) rather than writing on file inside the last loop, you can use the DAQmx Configure Logging (PDM) .vi. You will place this VI between DAQmx Timing.vi and DAQmx Start Task.vi to the task of the analog input voltage.

    (2) after the last while loop, you want to stop the task and analog outputs as well with another DAQmx stop Task.vi.

    (3) rather than using a local variable for the entrance of displacement and wiring it in the DAQmx Write.vi, you can wire directly from the output waveform of the wave to build function node.

    That should help you get started in the synchronization of these tasks.

    -Alex C.

    Technical sales engineer

    National Instruments

Maybe you are looking for