Pulse out for every Nth pulse in using 6024E counter?

Is it possible to get (continuously)a pulse out of the 6024E counters for every Nth pulse of an external signal going to the source pin? A VI and the description of the connections will be appreciated.appreciated
Scientia est potentia!

Hi magvar,
Depending on your application development environment (ADE) API (LabVIEW, CVI, VC++ etc.) you will want to configure the counter for continuous pulse generation. There are two pulse specs that you have to configue. The first configures the delay in number of edges of your source and the second configures the width of your pulse. Therefore if you set pulse spec (ND_COUNT in C code) 'A' to N/2 and pulse spec 'B' to N/2 then your pulse train will output a pulse every Nth pulse on the source.
Each ADE will have a shipping example that demonstrates this configuration. These examples ship with NI-DAQ and can be found in the NI-DAQ folder of National Instruments unless it is LabVIEW or CVI in which case it should be in their respective direc
tories. Hope that helps. Have a good day.
Ron
Attachments:
TIOgenSquareWave.C ‏6 KB

Similar Messages

  • ALV Output splitting out for every 60 lines if i run in background...

    Hello,
    I am running ALV report in background.Output is splitting out for every 60 lines.If i run report inforeground it is not happening.
    For exmaple...let us take there are 200 rows in output.for every 60 lines cloumn heading is printing.IF i download output into excel same for every 60 lines col headings are printing.issue is header should not print for every 60 lines...could you please let  me know is there settings to avoid this ...?Thanks in advance.
    Regards.
    Abshek

    Hi
    Its May be LINE SIZE OVERFLOW.
    Please Check SAP NOTE 1059001....
    This URL helps you
    http://help.sap.com/abapdocu_70/en/ABENPRINT.htm
    Regards
    Ajit

  • 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;      

  • How to generate a pulse waveform 90 deg phas shifted with respect to a pulse generated using a counter in PXI 6070E daq card ?

    Hi
    I ma using 6070E daq. I am generating a infinite pulse train using one of the counters. I want to generate another pulse train which should 90 degress phase shifted with respect to the previsously generated pulse. How to implement this using the counters in the DAQ card.

    Hi Gopal,
    1) yes the frequency generator is programmable. You have 2 timbebases (10MHz and 100kHz) and you can divide down by any integer between 1-16. Those are the only frequencies you can use.
    2) The way counters work is that you can apply a gate signal to the counter which will cutoff the output. Therefore, you can have a second counter generating a pulse train of an equivalent frequency to the frequency generator (fout) but you don't want it to start immediately. You want it to start only after a short delay (equivalent to a 90d phase). Therefore, you need to "gate" or prevent the output on this counter for that small delay period of time. The way you can do this is by using a second counter to create a delayed pulse. You would
    connect the output of that counter to the gate of your pulse train function. That way, during the delay period of the pulse, you won't be outputing your pulse train yet. When the pulse (high-time) of your pulse reaches the gate, then your pulse train will start generating its pulse train (which is consequently delayed by the amount of delay used in the single delayed pulse counter). Since you don't want your pulse to go back low, you will have to turn off or clear your pulse counter while it is high. That way the signal on the gate will remain high forever.
    Your better solution is to use a PCI-660x card to perform this action. You will have more counters which will give you a greater range of frequencies to choose from and you will have more accurate timing of the signals.
    Anyway, hope that clears things up. Have a good day.
    Ron

  • Can I Control the Pulse offset using the Counter Out?

    Hello Everyone.
    I am trying to generate the Pulse as below;
    I have seen and understood an example to generate a pulse waveform "GenDigPulseTrain_Continuous".
    However, I can not control the offset of the pulse train.
    Although the function gives me "initial delay(The amount of time in seconds to wait before generating the first pulse)",
    I can not shift "t_dead" cycle.
    /*01.Frequency Control*/
     // The units to use to define pulse frequency.
      m_pTaskWrite->COChannels.CreatePulseChannelFrequ​ency(vecstrings[0]/*LPCTSTR counter*/,
       "PWM_C0_CH_HIGH"/*LPCTSTR nameToAssignChannel*/,
       DAQmxCOPulseFrequencyUnitsHertz,
       DAQmxCOPulseIdleStateHigh,
       dDeadTime, 
       m_nFncFrequency/*frequency*/,
       prDuty.second/*dutyCycle*/);
      // The units to use to define pulse frequency.
       m_pTaskWrite->COChannels.CreatePulseChannelFreque​ncy(vecstrings[1]/*LPCTSTR counter*/,
        "PWM_C0_CH_LOW"/*LPCTSTR nameToAssignChannel*/,
        DAQmxCOPulseFrequencyUnitsHertz,
        DAQmxCOPulseIdleStateLow,
        dDeadTime/**2 + (prDuty.second *dCycleTime)*/, 
        m_nFncFrequency/*frequency*/,
        prDuty.second/*dutyCycle*/);
    Please let me know how I solve this problem.
    Thank you

    Dear Zl,
    Counting pulses is much easier with the FP-QUAD-510 or FP-CTR-500, but can be done with the FP-AI-110.  You can't directly count the pulses with a FP-AI-110, but you can do it in software. Bring in the data by doing a normal read. Then, using shift registers, if the previous voltage is less than .8V (low) and the current voltage is more than 2.5 (high), increase the pulse count. I have attached a program that shows what to do with the data once you bring it in. I took the data from an array outside the while loop, but your data will be brought in one point at a time inside the while loop. One thing to take note of, since Fieldpoint brings in data at 1 kS/s, this will only work with pulses slower than 500 Hz. The farther the duty cycle is away from 50% duty cycle, the slower the signal must be in order to catch the pulses correctly. Please let me know if you have any questions. Have a great day!
    Sincerely,
    Marni
    PS- Please only post question once.
    Attachments:
    pulsecount.vi ‏22 KB

  • Generate a pulse train using a count from a quadrature encoder as the clock

    I am trying to generate a pulse train with the same frequency as my quadrature encoder.  Every time the encoder counts, I want the pulse to go high until the next count and then go low and so on.  I am using a 6602 PCI card and a BNC 2121 accessory.

    Maybe I'm not understanding your app, but I *think* you and I are approaching it from two very different directions.
    As I understand it, you'd like to emit a pulse with each quad state change.  Then that pulse would act as a counter Source signal.  The counter will then increment on each pulse, to keep track of accumulated position.  Further, you'd use your device-under-test (DUT) as a counter Gate signal, which would buffer the position count each time there's a rising edge on your DUT.  The end result is a buffer of position values, captured at each rising edge of your DUT.
    I'm talking about a different approach to produce the same data.  You'd use 2 tasks on a M-series board.  One of them is a hardware-timed digital input task based on "change detection."  Each time one of the specified bits has a transition, your whole set of digital input bits can be captured and an internal "change detect pulse" is generated on the board.  This task should be sensitive to the DUT edges.
    The other task would be a buffered position measurement.  It would receive the reference encoder inputs and internally do quad decode and keep a running count.  The sampling clock for this task would be specified as the other task's "change detect pulse."
    Net result: on each specified edge of your DUT, you'll buffer a reference encoder position value and a digital state of your DUT.  You can choose to be sensitive to rising edges, falling edges, or (!!!!) both at once. You can also choose to be sensitive to many bits simultaneously.  These are better capabilities than you get with the 6602 alone.
    I *think* the 6220 should be ok, based on a quick overview of specs.  I assume your 3.6 MHz is the rate of ref encoder quad state changes, right?  In the approach I'm suggesting, you only need concern yourself with the rate of DUT edges which appear to be in the 10's of kHz or less.
    Gotta go for now.  Post back if any further questions.
    -Kevin P.

  • Airplay works with Remote but cuts out for every other App

    Remote works perfectly fine but whenever I try another AirPlay app it cuts in and out.  Driving me crazy. I have att wifi with an airport express.  Any ideas?  Why would AirPlay work with Remote but fail with every other app?

    Remote does not use AirPlay.

  • Support schedule print out for every maintainance contract

    Hi Experts
    Below is the scenario
    I create a maintainance contract with below items
    Contract num:900001    customer:A contract period- 1yr
    Material           Description                             Qty          Maint fee
    12345              car- GMC-full maint                   2             1000*2=2000/month
    10001              car-maruti-ful maint                   5              50*5=250/month
    20001              truck-engine serv only               2              2000*2=4000/month
    20016              truck-ful maint                          1              6000*1=6000/month
    For this contract I need to generate, print and send a service schedule for the customer A when I create contract.
                    SUPPORT SCHEDULE
    Contract num:900001    customer:A contract period- 1yr
    Description              Qty          Maint fee
    car maint                   7             2250/month
    truck service              3             10000/monnth
    Total = 12250
    How can I generate this output and make it available for print for each contract?should we use any form?
    Request your valuable and earliest comments.
    Thanks
    Banu

    James,
    Failure to properly print ligatures would not typically have anything to do with RIP processing. Assuming that your "Xerox printer" has a RIP that has Adobe PostScript, fonts in the PostScript stream (or in the orignal PDF file if appropriate)
    always override any fonts that are resident in the RIP. And for that matter, for PostScript printing, the PostScript printer driver is irrelevant as well since InDesign generates all the PostScript and simply uses the driver to channel that PostScript to the spooler and hence to the printer itself.
    As suggested in earlier responses in this thread, the symptoms suggest that the print stream was generated without all fonts embedded (or
    properly embedded) in the print stream. The original poster (Jason) did not indicate what version of InDesign he was using but there was a problem with a very old InDesign version (possibly InDesign 2.0 or 3.0) in which one of the print dialog's font options did not work correctly and omitted some glyphs from the output stream. That problem definitely was fixed long ago. It is certainly no longer an issue with InDesign 4 (CS2) and InDesign 5 (CS3) in which case make sure that in the InDesign print dialog's "graphics" pane, you set "fonts" to "download complete" (or "download subset") and also enable the "download PPD fonts" option. (If you are using an older InDesign version and having this problem, simply change "download subset" to "download complete" or vice versa - still enabling the "download PPD fonts" option - and see if that solves the problem).
    If you are running either InDesign 4 or 5 and still having this problem after making the appropriate print dialog fonts settings adjustment, we'd be very interested in (1) knowing exactly what printer is having this problem and (2) your sending us a simple example InDesign document exhibiting this issue.
    - Dov

  • I listen to the BBC on their iPlayer. I have other applications which use Pop-ups. The iPlayer window comes to the fore every time I've used another pop-up, and I have to minimize it to carry on. How do I keep it minimized by default?

    I listen to the radio on BBC iPlayer. Whenever another application opens a pop-up, the iPlayer window is activated first, then overlayed by the new pop-up. I work in the pop-up and close it, only to find that the iPlayer pop-up is active. I have to switch to my main application to carry on working. Doesn't sound a big problem, but I have to do this every few minutes.
    How do I keep iPlayer in the background please?
    Many thanks,
    Hassall Balshen

    Doesn't Chrome have a support forum?

  • How would I find the most common value every nth row in a column

    SCENARIO 1
    I have a column with a series of numbers in c1:c1000 as follows:
    2
    2
    3
    1
    1
    4
    2
    3
    1
    2...
    and I would like to find the most common value for every nth (in this case, second) row.
    SCENARIO 2
    Originally, I created a separate column in J and used this to find a value of 0 or 1 via a filter to label the rows odd or even. I was then going to create two separate columns, one for even rows of data and another for odd rows of data to separate them and perform functions on each column. But I do not know how to copy just the filtered data to one of the new columns to apply the MODE function (or any other for that matter).
    Perhaps my question should be: after applying a filter, how do i copy just the visible filtered data of every nth row to a new column in my spreadsheet while retaining the original column with all rows of data? 
    BACK TO SCENARIO 1
    If I do not need to go through this effort, I would just apply the MODE function (or AVERAGE or SUM) to every nth row in the original data column.

    Since Index and Offset were already taken, I used INDIRECT(ADDRESS()) in my example.
    Here's how I approached it:
    Expressions are as follows...
    Data Subset, Column A, Row 2: =IF(StartingRow :: A, 1, NSelector :: $A)
    Subsequent rows in Column A: =IF(ROW()<COUNT(Input :: $B)/NSelector :: A:$A+2, A2+NSelector :: $A, "")
    Data Subset, Column B, Rows 3
    throuth the last: =IFERROR(INDIRECT(ADDRESS(A+1, 2, ,,"Input")), "")
    Stats, Column A, Row 2: =IFERROR(MODE(Data Subset :: B), "No Mode")
    Stats, Column B, Row 2: =COUNTIF(Data Subset :: B, A)
    Lots of ways to skin this cat.
    Jerry

  • Count for every partition

    Hi,
    How can I get the count for every partition. I want:
    partition_name count(*)
    The table is daily partitioned by a date column.
    Ex:
    ALTER TABLE 'tableName' ADD PARTITION 'tableName||today' VALUES LESS THAN (TO_DATE('tommorow','DD-MM-YYYY'))'
    Regards,
    Gicu

    Hallo,
    if you analyze your table regularily and you want to know
    only approximate count of rows you can use :
    select partition_name, num_rows from dba_tab_partitions
    where table_name = 'TBL_TEST'Else , dynamic SQL:
    declare
    v_partition VARCHAR2(30);
    v_count NUMBEr;
    begin
    FOR x IN (select table_owner, partition_name from dba_tab_partitions
            WHERE table_name = 'TBL_TEST')
    LOOP       
        execute immediate 'SELECT '''||x.partition_name||''', count(*) from '||x.table_owner||'.TBL_TEST PARTITION ("'||x.partition_name||'")'
                           INTO v_partition, v_count ;
        dbms_output.put_line('Partition '||v_partition||' count '||v_count);                  
    END LOOP;                      
    end;     Regards
    Dmytro Dekhtyaryuk

  • How to send trigger pulse for every 0.25 sec until user stops the task?

    Hi All,
    Iam using NI_DAQ PCI 6221 Card for the Data Acquisition.
    Can any body please tell me how to send trigger pulse for every 0.25 sec until the user stop the task??
    Please suggest me the methods I should use to meet this requirement.
    Thanks In Advance,
    Sindhu

    Hi Sindhu,
    Am I correct in thinking that you do not want to use your 6221 to output a digital pulse, but that you are getting a digital pulse from somewhere else that you want to use as a trigger for the analog input?  And you will have more than one trigger?  If this is the case, then it can be accomplished by doing a retriggerable operation.  The way that this works is you use the counter on your board to generate the sample clock for your analog input because analog input cannot do retriggerable operations with its own sample clock.  You can modify the example GenDigPulseTrainContinuous_DigStart that is in the same location as the example I referenced before to be retriggerable by using the property DAQmxSetStartTrigRetriggerable.
    After doing that and testing to make sure that it works, you can setup an analog input task like the example ContAcqVoltageSamples_IntClk but specify the source of the sample clock to be the internal output of the counter you used in the counter portion of your program.  If you need help with the terminal names (You will need to use Ctr0InternalOutput for example), you can reference the NI-DAQmx C Reference Help at Start >> Programs >> National Instruments >> NI-DAQ.  After doing this, you will acquire the same number of samples as the number of pulses you choose to generate in the counter portion of your code every time a trigger is received.
    Also, I have come across an example that does retriggerable analog input using the counter as a sample clock in C++.  Either by using this example or modifying the shipping examples as I stated above you should be able to achieve what you are trying to do.
    Let us know if you have any questions.
    Thanks,
    Laura

  • Web pages come out tiny, I must use control + to view every page. How can I set a defult size for every page I vivit?

    After upgrading to 3.6 all the web pages come out tiny. The text and the pictures. I must use the Ctrl + in order to make the web page fill my screen. What do I have to do to set a default size for every web site I visit?

    ■ Easiest method, if you allow firefox to tabs you used then on restarting I believe it also retains the zoom settings
    * '''Tools -> Options -> General -> Startup = use current pages'''
    ■ There are also extensions that can be used, some allow individual sites to have individual settings. Look at the [http://support.mozilla.com/en-US/questions/772884 this thread] which also discusses related matters.
    ■ The best method if you need the same effest accross all sites is probably changing one of the preferences within the config files, it is discussed in the above linked thread and also in this MozzillaZine article http://kb.mozillazine.org/Layout.css.dpi

  • I need to change from Japan App Store to Australia App Store. I get this every time I try using My MacID: "This Apple ID is only valid for purchases in the Japanese iTunes Store. You will be switched to that Store." What next TY. JohnCahill

    I moved from Japan to Australia. I need to change from Japan App Store to the Australian App Store. I get the following message every time I try using My MacID which was set up in Japan: "This Apple ID is only valid for purchases in the Japanese iTunes Store. You will be switched to that Store." At one point... by which path I do not remember... I was instructed to created a new ID. I fill out the new ID forms, but the address is rejected each time... quite confusing. Does it want a new name? But it says I cannot use an apple domain (tag?) even though I guess it has to be an apple address... ? So I have iTunes crdit cards purchansed in Australia, can't spend in AUstralian iTunes Store, get directed back to Japan each time, and can't open a new ID... What am I doing wrong? Thank you in advance.  John. Australia.

    You must have a separate Apple ID registered in the other store along with a valid bank-issued charge card in the other country, and a legal billing address in the other country.
    Sorry... But... You cannot use other countries itunes stores.
    You must be within the Country with a Valid Billing Address and Credit Card for that Country to use the iTunes Store of that Country..
    iTunes Store Terms of Service
    http://www.apple.com/legal/itunes/us/terms.html#SERVICE

  • I accidentally quit my CC on my Macbook pro and now the cloud icon is grayed out and every time I hover over it with the mouse I get the spinning beach ball of death on the icon. I have no idea how to open it because when I use spotlight search to open it

    I accidentally quit my CC on my Macbook pro and now the cloud icon is grayed out and every time I hover over it with the mouse I get the spinning beach ball of death on the icon. I have no idea how to open it because when I use spotlight search to open it it gives me a message saying "Creative Cloud is not open anymore" help!

    Since you didn't include any pertinent info such as the Mac model and OS version you are running, here is some general information:
    Mac OS X: Gray screen appears during startup
    Depending on which OS yours came with originally - and which OS you are now running - you would either need your original install disks - you can call Apple for replacements by giving them your serial number. Or you may be able to reinstall the OS by using recovery (again, depends on which model/which OS).

Maybe you are looking for