Generating trigger using a counter

Hi,
I am wondering if it's possible to use a counter input to generate a trigger signal with one of the NI PCI boards.
Thanks
Raphael

Hi,
I am using a NI USB-6211 and plan to use a PCI equivalent.
My application needs to average pulses of data. I am using an acqiris averager for this.
I would also like to use the trigger of the pulses to generate every n times another trigger.
This trigger would be used to generate a clock for buffer position measurements of an angular encoder (using a NI DAQ).
That will allow me to synch the average of the pulses with the angular reading.
I am wondering if any NI device would allow me to do it (and the angular encoder reading as well).
Hope this clarify a bit the context.
Thanks
Raphael

Similar Messages

  • Generate trigger on n counts of quadrature counter?

    Hi,
    I have 6212 card. I use one counter to produce pulse train that drives a motor. The second counter reads position with quadrature encoder. Is there a way to configure the encoder counter to automatically send a pause/reference trigger to the first counter after a specified number of quadrature counts?
    Thank you

    Igor,
    I have attached the two VIs that I was using to test the simple count edges case.  You should run the Gen Dig Pulse Train-Finite-Retriggerable.vi first and then run the Count Digital Events.vi because it will send the pause trigger when the terminal count is reached.  I also looked at the Device Routes for the 6212 and you should be able to route ctr1internaloutput or ctr0 internaloutput to its respective trigger source terminal.  Please let me know if you are succesful.
    Thanks,
    Gio L.
    Digital Support - Product Manager
    National Instruments
    Attachments:
    Count Digital Events1.vi ‏32 KB
    Gen Dig Pulse Train-Finite-Retriggerable1.vi ‏38 KB

  • Analog input generating trigger on the counter gate to measure frequency

    Hello,
    I want to measure a frequency on the analog input but it doesn't seem to work.
    I'm trying to get it working using DAQmx with the use of ansi c.
    The
    first step I made was acquiring the information on the analog input.
    With the use of a simulated device this shows a sine wave on the input.
    My next step was to generate a trigger signal for the counter, but this doesn't seem to work.
    I don't see how it is possible to connect the trigger on the analog input to the counter.
    For the creation of the analog input and trigger I use the following code:   
        DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
        DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai0","",DAQmx_Val_Cfg_Default,-3.0,3.0,DAQmx_Val_Volts,NULL));
        DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,"",10000.0,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,1000));   
        DAQmxErrChk (DAQmxCfgAnlgEdgeStartTrig(taskHandle,"Dev1/ai0",DAQmx_Val_RisingSlope, 0));
    For the creation of the counter I am using the following code:   
    DAQmxErrChk(DAQmxCreateCIFreqChan(taskHandle1,"Dev1/ctr1",
    "",1,2000,DAQmx_Val_Hz ,DAQmx_Val_Rising ,DAQmx_Val_LowFreq1Ctr ,1,4,"");
    I hope some one could give me a hint.
    I have also tried the examples that come with DAQmx but far as I know this are only counter examples using digital inputs.
    Thanks in advance.
    Solved!
    Go to Solution.

    Hi,
    You have to use the comparison event output to the counter input. Change this property after the configure channel function.
    DAQmxSetChanAttribute (taskHandle1, "", DAQmx_CI_Freq_Term, Dev1/AnalogComparisonEvent);
    Regards,
    Bas

  • PCI 6602:How can I use the digital lines of the board and in the same time to generate pulse train using a counter?

    Hello!
    My problem appeared when I tried to update my code from Traditional NI-DAQ Legacy to DAQmx.
    I am using 2 counters (counter 5 and counter 7)  from PCI-6602, to generate pulse train, and also the Digital I/O lines of the port 0 (the lines form 0 to 7). What I do in my application is that I am starting to generate the pulse train on the output of the 2 counters, and after that I am playing with the state of the digital lines.
    In traditional there was no problem using the counters and the digital lines in the same time, everything was going perfectly, but in DAQmx this is not possible.
    What happens: I start to generate pulse train on the output of the counters,  no errors encountered, but when I try to modify the state of one line of the digital port the generation of the pulse train is stopped. This is happening when I start the task associated to the digital port.
    My question is: it is possible to create a channel on the digital lines without altered the channels created for the counters?
    Another thing what I manage to see using the  "Measurement & Automation Explorer" and Test panels for PCI-6602, basically is the same thing, I generate pulse train on the output of the counter 7 and try to start a task on the digital line, but I get one error :
    "Error -200022 occurred at Test Panel
    Possible Reason(s):
    Measurements: Resource requested by this task has already been reserved by a different task.
    Device: Dev4
    Terminal: PFI8"
    Instead if I use the counter 0 or counter 1 to generate pulse train I don't encounter the same problem.
    Which resources are used by the counters 2 to 7 from the PCI-6602 board and the counters 0 and 1 do not use?
    Thank in advance for any replies!
    Ciprian
    Solved!
    Go to Solution.

    Hello Jordan, thank you for your reply.
    I am sorry but I can not see or run your example, I don't use LabView, I use Visual C++ for developing.
    Here is the code for generating the pulse train:
    GeneratePulseTrain(unsigned long ulCount1, unsigned long ulCount2)
        short nStatus = 0;
        nStatus = DAQmxCreateTask("",&m_taskHandle);
        nStatus = DAQmxCreateCOPulseChanTicks (m_taskHandle, "Dev4/count5", "", NULL, DAQmx_Val_Low, 0.0, ulCount1,ulCount2);
        if( bTriggerMode == true) // if hardware trigger is enabled
            nStatus = DAQmxSetTrigAttribute (m_taskHandle, DAQmx_ArmStartTrig_Type, DAQmx_Val_DigEdge);
            nStatus = DAQmxSetTrigAttribute (m_taskHandle, DAQmx_DigEdge_ArmStartTrig_Edge, DAQmx_Val_Rising);
            nStatus = DAQmxSetTrigAttribute (m_taskHandle, DAQmx_DigEdge_ArmStartTrig_Src,"Dev4/PFI17" );
        //set the internal timebase
        nStatus = DAQmxSetCOCtrTimebaseSrc(m_taskHandle,"Dev4/count5","20MHzTimeBase" );
        nStatus = DAQmxStartTask(m_taskHandle);
        return nStatus;
    And the code where I try to set the digital line:
    SetChannelState(short nState)
        short nStatus = 0;
        uInt8 wrtBuf0[1]={0};
        nStatus = DAQmxCreateTask("",&m_taskHandle);
        // Configure line as output 
        nStatus = DAQmxCreateDOChan (m_taskHandle, "Dev4/port0/line0", "", DAQmx_Val_ChanPerLine);
        nStatus = DAQmxStartTask(m_taskHandle);
        wrtBuf0[0] = nState;
        nStatus =DAQmxWriteDigitalLines (m_taskHandle, 1, 0, 0, DAQmx_Val_GroupByScanNumber , wrtBuf0, NULL, NULL);
        nStatus = DAQmxWaitUntilTaskDone(m_taskHandle,10);
        nStatus = DAQmxStopTask(m_taskHandle);
        nStatus = DAQmxClearTask(m_taskHandle);
        m_taskHandle = 0;
        return nStatus;      

  • Using a Counter as a start trigger to one or more tasks

    I am using the NI USB-6251. I want to configure a counter (e.g. Dev1/ctr0) at a user-specified frequency and the rising edge on this counter should act as a start trigger for an analog input task and a digital output task. 
    I've tried to do this by creating a task for the counter:
    integStartTriggerTask.COChannels.CreatePulseChanne​lFrequency(
    "Dev1/ctr0",
    "Integration Start Trigger",
    COPulseFrequencyUnits.Hertz,
    COPulseIdleState.Low,
    0,
    integFreqHz,
    0.5);
    and then connecting this to the StartTrigger for the analog input task:
    analogReadTask.Triggers.StartTrigger.ConfigureDigi​talEdgeTrigger("Dev1/ctr0", DigitalEdgeStartTriggerEdge.Rising);
    However running this gives the error: 
    Source terminal to be routed could not be found on the device.
    Make sure the terminal name is valid for the specified device. Refer to Measurement & Automation Explorer for valid terminal names.
    Property: NationalInstruments.DAQmx.DigitalEdgeStartTrigger.​Source
    Property: NationalInstruments.DAQmx.DigitalEdgeStartTrigger.​Edge
    Source Device: Dev1
    Source Terminal: Dev1/ctr0
    Task Name: analogReadTask
    I have also tried "Dev1/ctr0/StartTrigger" instead of "Dev1/ctr0". What am I doing incorrectly? Thanks.

    Hi zkhan.cimtec,
    To use a digital trigger for your start task you need to use a PFI line to read a signal that is coming in. You are setting up a task that outputs a start trigger on your counter line, but you can't read off that same line to start the task since that line is already configured for output. An example of how to setup a start trigger coming into a PFI line can be found in the examples here:
    <National Instruments Public>\NI-DAQ\Examples\DAQmx ANSI C\Analog In\Measure Voltage\Cont Acq-Ext Clk-Dig Start
    Hope this helps,
    Kevin

  • How do I configure a counter to generate pulses using DAQmx?

    How do I configure a counter to generate pulses using DAQmx?
    Is says in the DAQmx C reference help
    "CtrnInternalOutput—The signal at this internal terminal is where the pulsed or toggled output of the counter appears. The output of a counter pulses or toggles when the counter reaches terminal count. When counting down, the counter reaches terminal count when the count reaches zero. When counting up, the counter reaches terminal count when the counter rolls over. To configure the counter to toggle or generate pulses, use the Export Signal function/VI with Counter Output Event as the signal name."
    I've tried this but can't get it to work, I may have the parameters wrong or something. The DAQmxExportSignal() function is very unintuitive to me. Here is my counter config code...
    int ret = 0;
    ret = DAQmxCreateTask("",&task_);
    errorMsg(ret);
    if (ret != 0)
    throw ret;
    // Configure the counter
    ret = DAQmxCreateCOPulseChanTicks( task_, "Dev1/ctr0", "", "/Dev1/PFI8", DAQmx_Val_Low, 0, divider, divider );
    errorMsg(ret);
    ret = DAQmxCfgImplicitTiming( task_, DAQmx_Val_ContSamps, 1000 );
    errorMsg(ret);
    // Change to pulse mode
    ret = DAQmxExportSignal( task_, DAQmx_Val_CounterOutputEvent, "/Dev1/Ctr0InternalOutput" );
    errorMsg(ret);
    // Start the counter
    ret = DAQmxStartTask(task_);
    errorMsg(ret);
    The above code works fine, in toggle mode, if I just comment out the DAQmxExportSignal() part.
    HELP!!!
    Stefan

    The problem is due to the DAQmxExportSignal call.  By default, when you create a counter output pulse train task, the driver will automatically set the output of the counter to toggle when the count for each high ticks and low ticks expire.  The driver also automatically routes the signal present at Ctr0InternalOutput terminal (the output of the counter internal to the device) to the Ctr0Out terminal (the I/O pin available externally).  Using the line
     ret = DAQmxExportSignal( task_, DAQmx_Val_CounterOutputEvent, "/Dev1/Ctr0InternalOutput" );
    will tell the driver to tristate the Ctr0Out terminal and not output the signal to the external I/O pin.  Using the DAQmxExportSignal function is generally only useful if you want to route the signal to some other terminal internal to the board without having the output show up on the external connector, route the signal to some other external pin other than the default pin, or if you want to have the output show up at multiple locations. 
    If you want to change the output behavior from toggle to pulse, you need to use the DAQmxSetExportedCtrOutEventOutputBehavior function.  However, this is generally only useful if all you care about are edges (not the duty cycle of the pulse train), and you want to generate higher frequency signals.  For example, with a 20 MHz timebase as the source of your counter, you can only generate a 5 MHz pulse train by default.  This is because the minimum value for the low and high ticks parameter is 2 (20 MHz / 4 = 5 MHz).  By changing the output behavior form toggle to pulse, you can generate a pulse train at 10 MHz since the output is now pulsing instead of toggling.  However, the width of each pulse is not programmable so you will no longer have a 50% duty cycle signal.  I don't remember exactly what the width of each pulse is, but I believe it's in the neighborhood of 50 - 100 nanoseconds in width.  I hope this information helps.

  • Generating Trigger DDL using OO4O (OField::GetChunk)

    WINNT 4.0SP6
    MS Visual C++ 6.0 (using MFC)
    Oracle 8.1.7
    I'm attempting to write some C++ code that will generate the DDL of a trigger using OO4O.
    Here's the code (so far):-
    strSQL.Format("SELECT DESCRIPTION, TRIGGER_BODY FROM ALL_TRIGGERS WHERE OWNER = '%s' AND TRIGGER_NAME = '%s'", strOwner, strName);
    dyn.Open(m_pDatabase->m_database, strSQL);
    int nBuffSize = 65535;
    nSize = dyn.GetFieldSize(0);
    const char *pValue = strValue.GetBuffer(nSize+1);
    dyn.GetFieldValue(0, (char*)pValue, nSize + 1);
    strValue.ReleaseBuffer();
    strText.Format("CREATE OR REPLACE %s %s", pszType, strValue);
    OField fld =      dyn.GetField(1);
    const char *pBuffer = NULL;
    unsigned short nBytesRead = 0;
    long nOffset = 0;
    CString strBuff;
    do
         if (fld.GetChunk(&pBuffer, nOffset, nBuffSize, &nBytesRead) != OSUCCESS)
              break;
         if (nBytesRead)
              char *p = strBuff.GetBuffer(nBytesRead);
              memcpy(p, pBuffer, nBytesRead);
              strBuff.ReleaseBuffer();
              strText += strBuff;
              nOffset += nBytesRead;
    while (nBytesRead);
    My problem is that the GetChunk method is failing, although it still returns OSUCCESS.
    If I call OField::GetErrorText() after the GetChunk call I get the error "ROWID must be selected ..". Looking at the documentation this does make sense. That is, to access LONG type field values the ROWID must be accessible.
    In this case there is no ROWID available because we are selecting from a dictionary view (ALL_TRIGGERS). Attempting to "SELECT ROWID FROM ALL_TRIGGERS" results in the error "ORA-01446: cannot select ROWID from view with DISTINCT, GROUP BY, etc.".
    Can anyone out there point me in the right direction to solve this one ?
    Thanks in advance.
    Adrian Capp
    LBS Limited, UK

    Thanks for that.
    Can you tell me which Dictionary Table I need to query. I've tried looking at the definition of the ALL_TRIGGERS view but was still none-the-wiser.
    I agree that it's not an ideal solution, but the application in question is only going to be used internally by development personel. I could also add a check as the app starts so it will only run if connected to a specific version of Oracle (just an idea).
    Adrian

  • Using one counter with FiniteSamps and another with ContSamps

    I am trying to use 2 counters on the USB-6229 (or USB-6259), where one counter is set up for FiniteSamps and another for ContSamps. I have the following MeasurementStudio code:
    ErrChk DAQmxCreateCOPulseChanTicks(hCnt0, "Dev1/ctr0", "", "20MHzTimebase", DAQmx_Val_Low, 0, 400, 400);
    ErrChk DAQmxCfgImplicitTiming(hCnt0, DAQmx_Val_FiniteSamps, 100);
    ErrChk DAQmxStartTask(hCnt0);
    ErrChk DAQmxCreateCOPulseChanTicks(hCnt1, "Dev1/ctr1", "", "20MHzTimebase", DAQmx_Val_Low, 0, 400, 400);
    ErrChk DAQmxCfgImplicitTiming(hCnt1, DAQmx_Val_ContSamps, 2);
    ErrChk DAQmxStartTask(hCnt1);
    When I run it, I get a run-error 50103 "The specified resource is reserved". If I change the FiniteSamps to ContSamps on the first counter, everything works fine.
    If I use only one counter with FiniteSamps, everything also works fine.
    Is this a bug in DAQmx or the dual counter use on M-series devices is limited to ContSamps?
    Vic
    Solved!
    Go to Solution.

    Hi Vic,
    This is actually expected on an M Series device.  Here's a timing diagram from the M Series User Manual that might make this a bit more clear:
    The device actually uses one counter to gate the other so the result is a finite pulse generation.  If you can provide the gate from another source, you may configure a continuous pulse generation on both counters and gate them (DAQmx calls this a "Pause Trigger") from this external signal. 
    You might also want to look into using Correlated Digital I/O to generate multiple finite pulses (up to 32 lines on your 6229 and 6259).  You could use one of the counters to generate a timebase for the digital lines, and build the waveform accordingly.
    One thing to note is that our new X Series boards can generate a finite pulse generation on a "single" counter (there is actually a paired internal counter that allows for this).  There are four user-accessible counters on X Series devices, meaning you could generate four finite pulse trains.
    Best Regards,
    John
    John Passiak

  • How do I use a counter for time measurement with NI-DAQmx and C++?

    Hi,
    I need my C++ program to read time (number of elapsed ticks) using the counter on PCI-6229. I had this written and working for the non-MX driver, and now I need to re-write it for NI-DAQmx.
    Here are the steps that I want to accomplish:
    1. Route the 80MHz timebase to the input of "Dev1/ctr0"
    2. Start the counter and let it count the ticks.
    3. After a while, read the number of ticks from the counter.
    Here is how I am trying to do it now (without success):
               DAQmxCreateTask ( "" , &taskHandle ) ;
               DAQmxCreateCICountEdgesChan ( taskHandle , "Dev1/ctr0" , "" , DAQmx_Val_Rising, 0 , DAQmx_Val_CountUp ) ;
               DAQmxConnectTerms ( "/Dev1/80MHzTimebase" ,  "/Dev1/Ctr0Source" , DAQmx_Val_DoNotInvertPolarity ) ;
               DAQmxStartTask ( taskHandle ) ;
               then DAQmxReadCounterScalarU32 ( taskHandle , 0.25 , &curCount , NULL ) ;
               and DAQmxClearTask ( taskHandle ) ;
    No errors are generated, but I do not see the tick count being incremented when I repeatedly read the counter.
    Advice will be greatly appreciated!!

    Hi Peter,
    Welcome to the forums!   I just want to make sure I understand what you are trying to do.  You would like to count the rising edges of the 80 MHz clock using DAQmx in C++.  In order to route the timebase to the counter, you need to use the signal name (PFI8) instead of the counter (Ctr0Source) for the counter source input.  This name is found in Measurement Automation Explorer (MAX) by right-clicking on the device and choosing “Device Pinouts.”  This will physically put the 80 MHz clock on the PFI8 line, so make sure you reset the device or disconnect the terminals after you are done. 
    That being said, may I ask what you are trying to do by reading the number of elapsed ticks?  If you are trying to monitor a hardware timed pulse, it would be better to count the frequency or period of that pulse.  This would provide better accuracy, because you are not relying on how fast DAQmx Read can poll the hardware.  If you are simply looking for a software based timer, I would recommend taking a look at this MSDN forum post. 
    Using the GetTickCount function instead will free up your counter and provide comparable accuracy to counting the edges of the timebase.
    I hope that helps you out, let me know if you have any further questions about this. Good luck with your project.
    Rod T.

  • Using a counter to create a timing delay

    Hi all,
    I am working on an application where I need to send some digital outputs seperated by precise timing delays.
    So for example, I may want to output a 'high' to channel 1, then have a 20ms delays, then output a 'high' to channel 2, then have a 50ms delay, and so on.
    I want the timing delays to be easily adjustable and I would like them to be precise.
    The program is being set up for hundreds of tests and it will be run once per test. In between tests I will have the opportunity to modify timing delays.
    I already have a cDAQ-9174 chassis and am planning to buy a NI 9401 high speed digital I/O card. It has been suggested to me that I use a counter (which is built into the chassis) to generate the timing delays, which sounds like a good idea to me. However, I don't really understand how to access the counters and configure the 'DAQmx create channel' function because there are so many options for the reference clock which I don't understand.
    I am thinking that I need to implement something like this:
    http://zone.ni.com/reference/en-XX/help/370466V-01/mxcncpts/hwtimedcounter/
    However I'm if this is what I need and I'm not sure how I would go about testing this code. I guess I would need to connect some sort of output to the counter to see if it's working correctly.
    Any help would be much appreciated.

    After a bit of experimenting, now I'm not sure if the hardware time delay has any advantage over the software delay. I can get a constant 5ms delay using the 'wait' function, yet when I use the counter I can normally get a 5ms delay, but sometimes (perhaps one trial out of five) I get a 4 or 6ms delay. I have even seen a 1ms delay using the counter method. Perhaps my method for measuring is flawed though? I have attached some screenshots of my program. If anybody has any comments it would be appreciated.

  • Trouble using the counter on PCI 6025E

    Hello,
    I am facing a problem with the counter on PCI 6025E. I am trying to count the number of pulses generated by the shaft encoder mounted on the shaft of a motor. I am using a channel from the shaft encoder to count the pulses and generate the line state. So, I have wired the channel to pins 25[line state]and 47[counter]on SCB-100. In my application I am using the count events/time vi from DAQ palette. Every time I run my application I have been getting the error NI 10001 saying that the ordering of the strings is not as expected.

    Hi,
    The Count Events & Time.vi is typically used with older counter hardware such as the 9513 chip. Your E Series card (6025E) uses a DAQ-STC chip. The best way to count your edges is to open up the example "Count Edges(DAQ-STC).vi which can be found by selecting Help>>Find Examples... and you will find it under the DAQ Counter examples as an DAQ-STC example. Hope that helps.
    Ron

  • How to use a counter to build a Logic Analyzer?

    Hi guys, i have heard that we can use a counter as a Logic Analyzer based on an incoming signal and its clock frequency. Anyone know how this works?
    I am trying to read a set of signals, which I have no knowledge of  except that there would a Clock, reset and a data line; and I want to develop a Logic Analyzer to 'know' these signals.
    Thanks, Anoop
    Solved!
    Go to Solution.

    Lynn,
    I have a PXI-7813R, which along with its FPGA is sufficient I believe for this purpose.
    How many digital signals do you need to examine simultaneously?
    Well, I am not sure, but based on the signals generated by similar devices, I would guess between 4 and 6. I expect there to be a Clk, Rst, Data and some other signals.
    What is the maximum frequency?
    I have no idea or how to even come up with a guess on this one.
    What is the maximum and minimum number of samples per signal that you need to capture?
    Again, not a clue. Would it not depend on the Clk frequency?
    Are any of the signals ever in a high impedance (tri-state) mode?  
    Again, don't know, sorry.
    Is the minimum pulse width for non-clock signals the clock period, half the clock period, or something else?
    Sorry again.
    How would you go about in this situation?

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

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

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

  • Generate report using Word Report Generation VIs error

    When I Generate report using Word Report Generation VIs  ,the error is generated.
    This is  my Vi
    can somebody  tell the error reason?
    The attaché is Vi (one is 2011,other is 8.6)
    Attachments:
    report-8.6.vi ‏16 KB
    report2.vi ‏33 KB
    template.doc ‏40 KB

    Hi Ben64
                 Thank you! The problem is solved.
       BUT when I use the Word Easy Graph vi  ,the result is
    I want the Graph (curve),like as:
    How Can I do get the picture.
    I have other problem. I want to get default name for the new word file.
    liang

  • How do I use a counter to measure frequency and multiple analog signals in the same VI?

    I have a PCI-6071E, an SC-2345 with multiple modules, and a PXI-8184 (with a PXI-1002 Chassis).
    My goal is to monitor pressures, flows, temperatures, and speed in one VI.
    I am using Measurement and Automation Explorer version 3.1.1.3004 to manage my channels.
    My speed is a PWM signal which I recently rewired through the counter 0 of my board.
    I was hoping to configure this to read frequency directly in measurment
    and automation, have this scale the value to RPM, and then feed it
    directly in to my labView program.
    In labView, it will not except this signal though.
    I get error -200300 from the DAQmx Start Task.vi
    Possible reasons(s):
    Invalid timing type for this channel.
    Property: SampTimingType
    You Have Requested: Sample Clock
    You Can Select: Implicit, On Demand
    After doing some research, it seems that the counter wants "Implicit"
    selected for the DAQmx Start Task.vi, but then I cannot use my other
    channels. Also, counter is included in the "Sample Clock" option
    description, so I do not understand why it is not working.
    Does anyone know how to work around this problem or a way to configure the counter so that it will work in this way?
    All my other channels are Analog.
    Thank you.

    I am working on getting just the counter working by using
    the program posted previously, and I am running into issues. Periodically I get
    the error:
    Error -200141
    occurred at DAQmx Read (Counter DBL 1Chan 1Samp).vi
    Possible reason(s):
    Data was overwritten
    before it could be read by the system.
    If Data Transfer
    Mechanism is Interrupts, try using DMA. Otherwise, divide the input signal
    before taking the measurement.
    It seems to work better if I use cascaded counters, but I need timer 0 for
    analog channels when I run this code along with the program for the other
    measurements.
    I have tried averaging, and selecting different values for the millisecond
    timer, and these did not seem to have an effect.
    I tried different DAQms configurations and "Counter DBL 1Samp" seemed
    to work the best.
    The program will work for a while and then it will give me the above error
    message.
    If I use counter 0 as a cascaded counter input, the program runs fine. If I run
    this with other analog channels, it errors out because the analog channels use
    counter 0.
    If I use counter 1 as a cascaded counter input, it seems to work better than a
    single channel, but it will still error out with the above error.
    If I use only counter 1, I get the error above even faster.
    Also, none of the
    configurations give measurements outside the While Loop.
    The only place I can add a speed dial for the front panel is within the While
    Loop.
    Is there someway to get the signal to continuously send out of the while loop?
    I thought if I could get the signal out of the while loop, I could condition it
    anyway I wanted without the program erroring out.
    Any suggestions would be much appreciated.
    Thank you.
    Attachments:
    Counter_error.jpg ‏45 KB

Maybe you are looking for