Buffered analog output puts out additional sample on aborting or stopping task

I'm using DAQmx and LV 8.2
I'm doing a buffered analog output operation where the sample clock is driven by pulses from ctr0 on the same device (PXI-6070E).  When I end the analog output task, either with the DAQmx stop task or DAQmx control task (abort option selected), the AO puts out one additional point from the buffer.  (I have checked by setting breakpoints and stepping through the code that the additional point is definitely generated when the analog ouput task is aborted)
I need the output to remain where it was before the stop task command is issued.  How do I fix this?
Thanks,
Marc

I'm watching to see if there hasn't been a sample output in a certain length of time, then terminating the task if there hasn't been.  Specifically, I have ctr0 outputting pulses to drive the task based on input from the AnalogComparisonEvent terminal.  I'm using a counter on a different PXI device to count the number of pulses and monitoring this count to determine if another sample has been output.  I'm outputting the ctr0 pulse to PFI3 as well, and I'm monitoring both the ctr0 output (which drives the ao clock) and the analog output itself on an oscilloscope.
Basically I'm sitting in a while loop waiting for the monitoring counter to fail to increment.  Then I terminate the while loop and stop the analog output task.  I can watch the analog output on the oscilloscope while I step through the program.  Immediately before the daqmx control task - abort (or daqmx stop if I don't abort first, or daqmx clear, if I don't abort or stop) vi runs, the analog output remains outputting the last sample.  Immediately after the abort, stop, or clear, the analog output advances one sample in the buffer. 
During this time, ctr0 does not output another pulse, so the scan clock should not advance.
Thanks,
Marc

Similar Messages

  • Hardware buffered analog output single shot

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

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

  • Why does analog output max out at only 2 V when I connect my device?

    I have a device that works on LabVIEW 6 (Win-NT machine), switching over to Vista, LabVIEW2009, with PCIe-6323.  the voltage output signal control works fine on the NT machine over the full range of 0-10V.  On the LabVIEW 2009/Vista machine, open AO channels work properly from -10 to 10 V in MAX.  But when I connect the device - the same device that works just fine on LabVIEW6 - It only works up to ~2V.  For example - I enter 1.5 V - i read 1.5 V.  I anything from 2.2-10V, and I get 2.2 V.  If I disconnect the device, I get output voltage that I enter in the Task test panel.
    How can I get it to run the full -10 to 10 V?

    The way that the scaling works for DAQmx tasks changed somewhere between DAQmx 7.? and DAQmx 8.8.
    At least it did for analog inputs anyway.
    Check if any scale is applied to your analog output task. Try changing it. 
    Troy
    CLDEach snowflake in an avalanche pleads not guilty. - Stanislaw J. Lec
    I haven't failed, I've found 10,000 ways that don't work - Thomas Edison
    Beware of the man who won't be bothered with details. - William Feather
    The greatest of faults is to be conscious of none. - Thomas Carlyle

  • I often get transfer errors -10608 and -10803 when doing double buffered analog output. How can I fix this?

    I'm using the PCI 6711 board programmed in Visual Basic. I'm working from the WFMDoubleBuf example file for VB and I've modified it for continuous output on 2 analog channels. I fill the buffers with customized waveforms from files I have previously created. I often get -10608 (noTransferInProgError, No transfer is in progress for the specified resource) and -10803 (transferStoppedError   , The on-going transfer has been stopped. This is to prevent regeneration for output operations, or to reallocate resources for input operations) errors when I try to output at higher rates (about 140000samples per second and up). The -10608 error generally happens after seve
    ral (sometimes hundreds) of half buffers have been transfered, whereas the -10803 error usually occurs immediately after starting output. This device is supposed to be able to output at up to 1Msample per sec per channel but I don't seem to be able to do that. I have tried increasing the buffersize (up to 16777216) with no apparent effect. Is there any other information as to what causes these errors or how they can be avoided. Any ideas?

    Roz,
    I found two KnowledgeBase entries about the most common causes of these errors.
    1. Why Do I Receive the Error -10608 When Using the PCI-6711?: http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/37752a79eb6a950886256c8b006e8870?OpenDocument
    2. Why am I Getting the 10800 and/or 10803 Errors?:
    http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/c9097c72463d215886256a700075a6ef?OpenDocument
    Have a great day.

  • How to avoid delay during analog output generation by changing its frequency?

    Windows XP
    LabVIEW 7.1
    PCI-6036E + BNC-2120
    Hi,
    I am going to create a vi to generate an engine speed sensor signal (a simple square wave with specific missed pulses, in my case 58 pulses “teeth” and 2 missed pulses “missed teeth”) as an analog output but in addition give me the opportunity to control parameters for example frequency online to simulate the engine speed changes during running that vi. For this purpose I have started with “Continuous Generation.vi” which is available in NI Example Finder under the following path:
    Hardware Input and Output > Traditional DAQ > Analog Output > Continuous Generation.vi
    Then I modified it towards above mentioned goal, all related vi s are attached. The main vi is: "Motor Signal Generator_1.12.vi"
    At the first try it looks that it works properly but when have a look on that more accurately with Oscilloscope (fortunately I have a good one: Agilent 54621A – 60 MHz, 200 Ms/s) obviously there is a gap (delay or Jitter) whenever I change the engine speed. It is also attached in Signal generation_problem report.doc file.
    Note: Small gaps are OK and related to predefined missed teeth but the big one is happened during changing engine speed.
    As far as I understand it is related to the time which case structure in AO C-GEN sub-vi needs for AO reconfiguration each time after changing the engine speed (update rate). How can I get rid of this delay or gap during signal generation and generating completely continuous signal?
    I have to mention that obviously I changed the frequency by changing the update rate. The other possibility is to change the number of updates in one period (refer to "generate arb frequency.vi" in NI site: http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3E48F56A4E034080020E74861) which resulted in no delay however then I can not change the frequency continuously but step by step (for example jump from 5Khz to 2.5KHz immediately) and this can not pass to my application.
    Any hint is appreciated.
    regards
    Attachments:
    Signal_generation_NIsupport.zip ‏81 KB

    Hi Roozbeh,
    The following example will allow you to vary the pulse train frequency during run time.
    Thanks,
    Lesley Y.
    Attachments:
    GenDigPulseTrain-ChangingSpecs.vi ‏75 KB

  • Which audio interface(s) for 16 to 20 analog outputs?

    Hi. I wonder if anyone can help me...
    I'm running Logic 7.2 on a black MacBook. For my inputs I am using the MOTU 8pre, as this is convenient especially when recording drums with my band... no scrambling together of pre-amps... no faff...
    The thing is... I've been given a shed load of gear (literally), including a 24 channel analog mixing desk and tons of outboard rackmounted effects units/compressors/gates...
    I would REALLY love to integrate the two systems, especially at the mixing stage, by routing my Logic tracks to the desk. Unfortunately, the MOTU 8pre only has a couple of analog outputs (+ headphone out).
    To make this a venture worth undergoing, I'm going to need a minimum of 16 analog outputs. 20 would be great if possible.
    I suppose my initial questions are:
    1. Can I daisy-chain 2 firewire audio interfaces (each with 8 analog outputs) to give me a total of 16 analog outputs?
    2. Bearing in mind I have a low budget, could anyone advise me on which units to get. I don't think I could afford any more MOTU gear, unless I find an amazingly low priced second hand item. What about Edirol or M-Audio?
    Thanks in advance.
    MS

    This is worth checking: http://www.ioneconnects.com/product.shtml
    Based on new DICE II firewire chip with JetPLL technology (should have much lower jitter than regular firewire Audio devices that are not built on DICE II).
    I believe that you can choose the configuration you need.
    The only question for me is whether they are affected by apple's firewire streaming bug. But as I've heard that in the info of 10.4.9 SDK is a statement, that core audio bugs were repaired, I hope the offset streaming problem will be finally the past...
    Man I am really considering this firewire snake, as it definitelly has many ins and outs - including 4 AES/SPDIF in and out!!!
    I am going to upgrade my studio and two of those will probably give me enough ins and outs for all my needs (musicians + outboard hardware and a summing mixer). I was also thinking about Symphony (PCI solution seems to be still more stable than firewire) and some I/O "modules" from apogee, but that is much more expensive. And I 've read only positive info about the DICE II, so maybe I will give a firewire another chance...

  • How much noise expected in analog output?

    I'm using a PCI-MIO-16E-4 with LabView to generate buffered analog output, and at the BNC-2090 output (DAC0/1OUT) I'm finding ~180 Hz hum of about 20 mV peak-to-peak. It doesn't seem to matter whether I'm writing a waveform or not; the noise magnitude is always about the same.
    Is there something I can do to eliminate or reduce this, or is it typical so I'm stuck with it? I futzed with the BMC-2090 shield ground jumper (W1) but none of the three documented settings made any difference.
    Any suggestions would be greatly appreciated.
    thanks,
    Kevin

    No particular noise is "typical." No noise at all is atypical. 20mV is low enough that it could be radiated noise for nearby equipment. I doubt you card would have that noise in the lab situation where they test for noise. Which essentially means something about you estup is responsible for the noise.
    Since the frequency is a multiple of 60Hz it is probably environmental noise, radiated ot picked up off of the ground. Really and truly, 20mV is not a lot. I have acquisitions where I must be very careful in grounding ALL the associated equipment or I see huge blurts of noise from a motor drive - on the order of 3 Volts until I drove an eight foot gound rod through the floor to get an isolated safety ground for my DAQ PC and scope. I still see the noise, but it is now lower than 0.8V so I don't get false triggering of TTL circuitry from it. This is AI not AO like you are discussing.
    If you check the specification of your card there is a table on "System noise." I am not saavy enough to understand it, but I see that the noise is dependant on the output range. I suspect that the range is not a user selectable item, but in theory if you see more noise than the spec sheet says, then it is part of your setup not the card.
    Here is part you really don't want to hear: Solving a noise problem by text messaging is like solving a mental illness over the phone, maybe worse. I can tell you all sorts of practical, common sense things that are not specifically helpful. I can tell you from personal experience that you really need to follow all the good practices you can, if you really want to have as high a SN ratio as possible.
    Can you set up a single point ground? Can you eliminate all ground loops (shielding only grounded on one end.) I had a stray strand of shielding that brushed against a case that made terrible noise once.
    There is a good book called ,"Grounding and Shielding Techniques," by Ralph Morrison from Wiley Inter-Science. There are papers on this in in the tech resources of ni.com. In particular the paper on "Field wiring" is good. Keithley has a good book they will send you for free on low level measurements that is very informative. You have to call them on the phone to get it.

  • Setting sample rate for sinus analog output

    Hello,
    I've been trying to do something very simple : using an analog output of the card PCI 6221 to produce a sinus curve of frequency 50 Hz. For this I used a Vi to create a sinus curve and the different DAQmx VIs. But I have difficulties understanding the principle of virtual channel and I think I'm doing a mistake setting the sample rate and samples number : one time for the sinus vi, second time for "DAQmx - Timing". Should I use the same values for both of these VIs ?
    On my oscilloscope, with frequency=50Hz and sample rate=1kHz, I get a null signal. Then depending on both values, I get differently rated signals. For example with f=1Hz and sr=10kHz, a sinus of frequency 0,7 Hz.
    Solved!
    Go to Solution.
    Attachments:
    Sinus analog output.vi ‏32 KB

    Yes, thanks for your advice. I used the structure given in the example and now it's working fine. I'm still not sure what I did wrong though.
    I would have a second question now (should I create a new topic?):
    I put a continuous sine wave on the analog output. As soon as this is running, (or maybe after a short delay) I want to measure a limited amount of samples on my analog input. How can I be sure, it's not going to start measuring before the output is properly set ?
    I don't think a trigger would solve the problem since I'm going to vary the output Amplitude.

  • If I configure a buffered pattern input and a buffered pattern output on the 6534 to both operate from the internal clock, will data be transferred out on the same rising edge as data is transfered in or are there two separate oscillators?

    Basically, I want to perform a buffered pattern output synchronously with a buffered pattern input. If I configure the two groups to be internally timed from the same frequency, will the data in be transferred on the same edge as the data out or will the two groups use different oscillators?

    Hi Joseph,
    There are two clocking structures on the 653x boards, one for each group. This means, even if you specify the exact same frequency for both there is no guarantees that they will be synchronized exactly.
    The workaround for synchronizing both groups is to have 1 group clocked internally and 1 group to be clocked externally. Then route the Req line from the internally clocked group to the Req line of the externally clocked group.
    Hope that helps.
    Ron

  • Hi, iam facing proble in synchronizing 4 ni 4472 cards input with pxi -6052e analog output. please help me out to sort out this problem

    hi, iam facing problem in synchronizing 4 ni 4472 cards input with pxi -6052e analog output. please help me out to sort out this problem

    Hi achyuth,
    Thank you for posting on the National Instruments forum.
    I am not sure what you are trying to do.  Are you trying to input and output at the
    same time?  Are you just trying to
    synchronize all of your inputs?  Do you
    want them to run off the same clock?  If
    you could, give me some more information so I can understand your problem
    better.
    In the meantime, this might help you:
    PXI Timing,
    Triggering, and Synchronization Capabilities of E-Series Multifunction Data
    Acquisition ...
    PXI Timing and Synchronization
    Thank You,
    Nick F.
    Applications Engineer

  • With the current up coming addition of Maverick will Apple still support and put out Updates for Mountain Lion?

    With the current up coming addition of Maverick OS will Apple still support and put out Updates out for Mountain Lion? I want to make sure my computer will still be secured.

    I'm sure that Apple will continue to provide support for Mountain Lion and other previous versions of their operating system. They have always provided updates for most versions of their software, even though newer versions were released.
    Roger

  • NI-DAQmx VisualStud​io C++ 6 Single point analog output

    Specs: NI-DAQmx 7, VisualStudio C++ 6.0,  PCI-6722,8channel AO
    We have a very simple application: set a voltage (actually 6 channels) and keep it until we want it changed again, perform the change very quickly in response to an image capturing algorithm. So I don't need any waveforms or buffering.
    In this forum post http://forums.ni.com/ni/board/message?board.id=231​&message.id=3283&query.id=18094 you talk about an AOOnePoint example, but I get an error that the NI-DAQ driver does not support my device.
    I may need to use NI-DAQmx, but how? I would like to use something like AO_VWrite(,,), maybe for 6 channels in one call. But I can't find it in NI-DAQmx. It seems I need to setup buffers and frequencies. I have a working sample, but it seems a slow and certainly overkill of this simple application:
    // Link with \DAQmx ANSI C Dev\lib\msvc\NIDAQmx.lib
    #include "NIDAQmx.h"
    double[2] data;
    int taskHandleAnalog;
    int written;
    void Init()
        DAQmxErrChk (DAQmxCreateTask("",&taskHandleAnalog));
        DAQmxErrChk (DAQmxCreateAOVoltageChan(taskHandleAnalog,"Device and Channel Info","",0,10,DAQmx_Val_Volts,NULL));
        DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandleAnalog,"",1000,DA​Qmx_Val_Rising,DAQmx_Val_ContSamps,NUMBER_OF_AO_SA​AMPLES));
        DAQmxErrChk (DAQmxWriteAnalogF64(taskHandleAnalog,NUMBER_OF_AO​_SAAMPLES,0,1.0,DAQmx_Val_GroupByChannel,data,&wri​tten,NULL));
        DAQmxErrChk (DAQmxStartTask(taskHandleAnalog));
    void SetVoltage( double voltage )
        data[0] = voltage;
        data[1] = voltage;
        DAQmxStopTask(taskHandleAnalog);
        DAQmxErrChk (DAQmxWriteAnalogF64(taskHandleAnalog,NUMBER_OF_AO​_SAAMPLES,true,10.0,DAQmx_Val_GroupByChannel,data,​&written,NULL));

    Hi,
    It looks like you simply wants to output voltages on the analog output channels, but only wants one update at a time with no waveforms or buffering in DAQmx.
    As I'm sure you know there are really just 3 types of measurements.  Single Point, Finite, and Continuous.  Since you want a single value at a time it's just a Single Point operation.
    You can find DAQmx examples for single point operations in this path:
    C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Analog Out\Generate Voltage\Volt Update
    Simply place the DAQmx Write Code within a loop and you will be updating one value at a time, but multiple times when "we want it changed again".
    Dennis Morini
    Field Sales Engineer
    National Instruments Denmark
    http://www.ni.com/ask

  • High Noise on Analog Output PCI 6289

    Hi guys
    I am using  a PCI 6289 M series device for A/D characterization , I am using the device both for the analog output generation and also for data acquistion of the digital lines , The dynamic tests for the A/D were showing a very poor SNR ratio of the ADC, it is a  12 bit adc so technically in the ideal case i should atleast see  90 db but the resulting figure was way lower around 40 db .
    I connected the A0 from the PCI 6289 brought out to a scb-68 block to a RHODE and SCHWARZ spectrum analyzer , the above spectrum analyzer is a decent one with good analysis capability and I was surprised to see a SNR of 50 db , the data sheet says that PCI 628X devices have  a internal 16 bit DAC so technically the SNR should be atleast 90 db even if 6 db were removed for the harsh environment of the computer .
    please advise , have anybody else faced this problem , the data sheet does not give a figure for the SNR ratio of the card , since i need to test a 12 bit adc , thought that 6289 would be up to the task since it has a 16 bit DAC.I am using the Noise shielding cables and also SCB-68 block , the block is far removed from other power supplies .
    any ideas why the noise is occuring , one of my colleagues says maybe the harsh environment inside the pc enclosure causes it , is it necessary to use a separate PCI box for the card and then connect the card to the computer , is this standard procedure ?????.
    and also does the PCI -6289 have a filtering option for the analog output , all i could find was the filtering for input.

    Hi Tom
    Thanks a lot for responding to the thread , did not expect a response in the holiday season . The SNR for the 12 bit one was a typo , was referring to the 16 bit onboard dac in the M series card , which technically should ensure a clean input signal having atleast 90 db .
    The info you have given helps a lot , i suspect the conditions inside the pc might be causing it , also i am driving the analog output from the card at almost its limits of 2.5 MS/s , the sample rate specification for the card on the data sheet says 2.8 MS/s , also i notice the settling time requirement for the outputs is 3 us which i suspect will put the onboard DAC under quite a load.
    If the conditions inside the PC cannot be rectified , where can i find a external PCI box which can be connected to the computer or does such a box exist only for the PXI cards ? will that necessarily rectify the problem and also since filtering is not possible on the card itself , I remember reading the scb -68 connector block has  single RC output filter option , i would have to use discrete R,C components to make it but notice on the right hand corner some pcb holes are provided , would this help.
    Would appreciate your Response
    Thank you
    Chip learner

  • Using analog output in the background

    Hi,
    I need to use the analog output channel on a NI PCIe-6351 to play an audio signal, and while the signal plays i need make some changes the UI dialog box, is it possible for me to move the playing of the audio to the background and proceed with program execution?
    Here is a simple piece of code that explains what I'm trying to do: 
    #include<stdio.h>
    #include<stdlib.h>
    #include<conio.h>
    #include<math.h>
    #include<string.h>
    #include<memory.h>
    #include<wchar.h>
    #include "sndfile.h" //include file for the sound library
    #include "NIDAQmx.h"
    #define DAQmxErrChk(functionCall) { if( DAQmxFailed(error=(functionCall)) ) { goto Error; } }
    float *fWavSample;
    SNDFILE *SoundFile;
    SF_INFO SoundFileInfo;
    int iNoOfSamples=0;
    int32 error=0;
    TaskHandle AOtaskHandle = 0;
    float64* AIOSample;
    char errBuff[2048]={'\0'};
    int32 fnCreateTask(TaskHandle *AOTaskHandle)
    int32 error=0;
    DAQmxErrChk(DAQmxCreateTask("", AOTaskHandle));
    Error:
    return error;
    int ReadWavFile()
    //Open the wav file for reading
    SoundFile=sf_open("sin_10s.wav",SFM_READ,&SoundFileInfo);
    //Check if file is opened sucessfully
    if (SoundFile == NULL)
    puts("File not opened");
    return FALSE;
    //allocate memory for the buffer that is to hold the wav data&colon;
    fWavSample = new float[SoundFileInfo.channels * SoundFileInfo.frames];
    iNoOfSamples = SoundFileInfo.channels * SoundFileInfo.frames;
    //Read data into the float structure that has been copied in
    sf_readf_float(SoundFile, fWavSample, SoundFileInfo.frames);
    //Allocate memory for the structure that is to hold the sound samples
    AIOSample = new float64[iNoOfSamples+660];
    //Copy wavefile data into the new float64 array (needs to be typecasted to float64)
    int i=0;
    for(i=0;i<(SoundFileInfo.channels * SoundFileInfo.frames);i++)
    AIOSample[i] = (float64)fWavSample[i];
    //After the float64 array has been filled, release the memory used by fWavSample
    free(fWavSample);
    return 0;
    int main(int argc, char** argv)
    DAQmxErrChk(fnCreateTask(&AOtaskHandle));
    //Create an analog out channel
    DAQmxErrChk (DAQmxCreateAOVoltageChan(*(&AOtaskHandle),"Dev1/ao1","",-10.0000000,+10.00000,DAQmx_Val_Volts,NULL));
    //16 bit output resolution needed, sampling rate matched to the WAV file's
    DAQmxErrChk (DAQmxCfgSampClkTiming(AOtaskHandle,"",44100.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,1000));
    //Set the output to trigger on a rising edge on PFI6
    //DAQmxErrChk (DAQmxCfgDigEdgeStartTrig (AOtaskHandle,"PFI6",DAQmx_Val_Rising));
    //Start the task in the background
    DAQmxStartTask(AOtaskHandle);
    ReadWavFile();
    DAQmxErrChk(DAQmxWriteAnalogF64(AOtaskHandle,(SoundFileInfo.channels * SoundFileInfo.frames),true,10.0, DAQmx_Val_GroupByChannel,AIOSample,NULL,NULL));
    printf("Playing audio\n");
    Error:
    if( DAQmxFailed(error) )
    DAQmxGetExtendedErrorInfo(errBuff,2048);
    //puts(errBuff);
    puts(errBuff);
    return TRUE;//DefWindowProc(hwndmon,message,wParam,lParam);
    getch();
    The program reads a 10 seconds long 1kHz sine wave signal from a WAV file and plays it over AO0.
    I want the program to  print "Playing Audio" on the console window while the audio is still playing, i.e when DAQmxWriteAnalogF64 is executing.
    I'm using Visual Studio 2005 on Windows XP and an NI PCIe6351.
    I'd really appreciate any help I can get.
    Thanks a lot!
    RaziM

    Hi RaziM, 
    It sounds like you will need to implement some sort of multithreading to accomplish playing audio in the background and also making changes in the UI dialog box in the foreground. Since DAQmx is thread safe this should definitely be possible, but it will probably take a little more work on your part.
    You may want to take a look at this page which gives a walkthrough to Multithreading with a Background component, http://msdn.microsoft.com/en-us/library/ywkkz4s1.aspx
    Here is another forum post about how DAQmx runs multiple threads, http://forums.ni.com/t5/Measurement-Studio-for-VC/DAQmx-how-does-it-multithread/td-p/221953
    I hope some of this helps!
    Rachel M.
    Applications Engineer
    National Instruments

  • Single shot analog output: How to pulse this. Probably easy, I'm at a loss.

    Hello.
    I have a piece of machinery that my system is connected to.  Every time it reaches a proximity sensor (It's a reciprocating unit), I need to do a single pulse of 5v out of my analog output.  It has to be fast, it has to stop until the sensor is reached again, and it can't stay 'on' for long.
    I've attached my VI.  I'm using a voltage input via DAQ assistant, routed through some logic to produce a 'true' boolean every time that sensor is reached, and that boolean is connected to a case structure with voltage out tasks created in DAQmx.
    My problem is that the machine won't reverse while the case is still true and there's still the 5v being called by the true case on the case structure.  It has to pulse, then stop, then be allowed to come back when the proximity sensor is reached again.  As it is now, the machine reaches the prox and then the whole system stops, as the 'true' condition on the case structure, and subsequent voltage output, remain high.
    I've attached the VI and heirarchy as well.
    I've tried a few different things here, as well as just using a DAQ assistant with N samples, but that would just retrigger when the loop repeats anyway.
    I'd love to sit and bang my head against this til I get it, but I'm under a time constraint.  Help!
    Still confused after 8 years.
    Solved!
    Go to Solution.
    Attachments:
    using create channel.vi ‏94 KB
    logicsub.vi ‏32 KB

    Ralph, without knowing the exact DAQ card that you are using, it is difficult to give you the best solution. If you want to continue with the solution that you currently have, try adding a shift register to the outer while loop to track the previous value of the boolean. In this way, we can keep multiple values that are above the threshold from causing multiple pulses. Next add a time delay after the DAQmx Write, then add another DAQmx Write to set the output back to your low value. Remove all code from your "false" case. See attached VIs. Please let us know what model of DAQ card you have as we may be able to do something clever like a retriggerable pulse train if your card can support it.
    Charles Chickering
    Charles Chickering
    Architecture is art with rules.
    ...and the rules are more like guidelines
    Attachments:
    using create channel.vi ‏98 KB
    logicsub.vi ‏29 KB

Maybe you are looking for

  • Can we create a new row in a table using a down arrow

    Hi, I am using jdeveloper 11.1.1.6. For one of my project, I have a requirement where i need to create a new row in table using a down arrow. My client does not want to use mouse clicks. They want to use keyboard as much as possible.(Fast data entry)

  • Touchsmart and Windows 8

    Im looking at a new Touchsmart (420-1100) and plan to upgrade to windows 8 but i keep reading stuff about how the screens wont work well for windows8 because of something to do with the "bezel" around it.....is this true? and should i wait for a true

  • Duplicate check for non inventory vendor invoices in Finance

    Hi, SAP provides duplicate check for non inventory vendor invoices posted through transactions F-43 and FB01 etc. The field values checked for duplicate invoice include Document date and Reference field. I want to know, is there any flexibility of re

  • White Screen with a circle crossed out symbol

    What does this mean? A friend recently spilt wine on the keyboard I mopped it up, and turned the computer on the side moped it up. I left it to dry out. It did not short out when it happened, however now when I turn it on that screen comes up but I d

  • Much difference in speed? G5 vs Intel

    I wonder if I've been greedy.. I have an iMac 20" 2Ghz G5 ( 1.5gb RAM ) - I've just ordered a 24" 2.33Ghz Intel Core 2 Duo ( 2gb RAM ). And I'm starting to worry that I've been a tad silly! Is there much of a speed difference between these two set-up