Generate Pulse Train.vi

I am updating a legacy application using LabView 5.1 and the DAQCard-500.  I have NI-DAQ ver 6.9.3 installed.  I installed NI-DAQ after LabView.  I have no other versions of LabView installed on this machine.
I am using the generate pulse train.vi and get the following error message:
Error -10403 occurred at CTR Group Config.
Possible Reasons:
NI-DAQ LV: The specified device does not support the requested action (the driver recognizes the device, but
the acion is inappropriate for the device).
Looking a bit deeper I see that CTR Group Config is called in a subvi of Generate Pulse Train.vi but I do not understand why I would get the error message on the presumption that the Generate Pulse Train.vi is matched to the DAQCard-500.
Where might I be going wrong?
Is there a definitive way to know if I am using the correct .vi for the DAQCard-500?
How could I troubleshoot this further?
I have attached a .jpeg snapshot of the vi call just to show how I have wired the inputs.
Thanks in advance,
Bernie
Attachments:
Pulse Train Snap.jpg ‏10 KB

Ok the next thing to check is whether you can successfully access the board from the test panels inside MAX. If that works, I would try to find an example that sort of does what you are wanting to do and see if it works. If that works, start comparing the example code to the VIs that are in your example.
Mike...
Message Edited by mikeporter on 06-05-2007 08:32 PM
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Similar Messages

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

  • Can I generate pulse trains on more than one counter output at the same time?

    I have a PCI 6601 card with a BNC 2121 to connect the signals to two devices. The card is used as a trigger for both devices and I want to be able to generate pulse trains on two output channels at the same time, with a time delay between the two. How do I do that in Labview 7.1 Development with DAQmx?

    I feel foolish for not being able to figure this out, but it still doesn't work. Attached is the VI I use now. Counter 0 generates a finite pulse train and I programmed Counter 1 to generate a retriggerable single pulse triggered by CtrOinternaloutput. I still get the same error message: -50103 The specified resource is reserved. The operation could not be completed as specified.
    The same happens if I set the trigger for counter 1 at PFI36 (default output of counter 0) or any other PFI line. If I try a pulse train generation on only one of the counters, both work fine.
    If I try the example in traditional DAQ for multiple counter outputs with phase delay, it works fine.
    Can you tell me what I'm doing wrong?
    Attachments:
    Shutter_AND_lamp_trigger.vi ‏103 KB

  • How can I generate pulse trains whenever the value of the gate changes?

    I need to generate pulse train both at the rising edge and falling of the gate signal. My DAQ board has only two counters.
    Have a nice day,
    Jun

    Jun;
    As your DAQ board has only two counters available, I'm assuming you are working with either one of the E-series board or SMIO boards.
    If that is the case, your board doesn't have the capability of generating triggered pulse trains. And that is what you need.
    You will need to use the 660x family instead. Those boards have the trigger pulse train capability. Regarding the second part of your application; none of the DAQ boards has the capability of triggering a pulse train generation at both rising and falling edges of the same trigger pulse. You can configure either as rising or falling edge of the trigger pulse. Then, to accomplish wath you need, you will need to configure two counters, both having the same trigger pulse triggering a pulse train gen
    eration, and one configured to trigger the pulse train at the raising edge of the trigger pulse and the other to trigger at the falling edge of the trigger pulse; then have an external OR Gate which the two inputs are the outputs of those two counters.
    Hope this helps.
    Filipe

  • Generate PULSE TRAIN VI & Measure Frequency VI

    Can I RUN both Generate pulse train VI and Measure Frequency VI without either slowing down? Is Generate pulse train VI same as generate PWM VI? I have only attached the generate pulse train VI as I can only attached one file at a time.
    Attachments:
    Generate Pulse Train VI.vi ‏15 KB

    Hi labview1958,
    This depends on the kind of frequency you'd like to generate, and the range of frequency you'd like to measure. You didn't mention the kind of hardware and software (version) being used, so I'll assume you're using an E Series DAQ device and programming in LV 7.1. If you're generating a continuous pulse train, only one counter is required, hence there should be another counter available (for most DAQ devices). If you're generating a finite pulse train, two counters are required, and there'll be no counter available for frequency measurement. Also, frequency measurement can use one or two counters depending on the frequency range. You can find LV shipping examples (Help >> Find Examples) for both pulse train generation and frequency measurement. These make a good starting point for your development. In the case that you don't have a counter available for frequency measurement, you can also use the "Extract Single Tone Information" VI to measure the frequency in software.
    These tutorials will provide more details:
    Generating a Pulse Train with a Counter
    Making Accurate Frequency Measurements
    Hope this helps,
    Lesley Y.

  • Generate pulse train

    hello,
    i have a question:
    how to generate a 7 Hz pulse train with a daq dt304???
    Thank you very much.

    Found what I was looking for. The resulting page upon posting this question had a link to the LabVIEW palette upgrade for new counter VI's.

  • Generating pulse trains independent from my PC

    Hallo,
    I want to ask , how to generating a digital pulse with counter gate from my Labview 7.0 and that signal should be independent from my PC (My tutor said, even i shut down my PC , the signal will always be generated). I use Labview 7.0 , DAQ card , and Shielded I/O Connector Block SCB-68 . And which PIN should i use in that connector?
    Thank you very much for any help.
    Jimmy

    Hello Jimmy,
    Thank you for contacting National Instruments.
    You can easily generate a pulse or a pulse train from your DAQ board using LabVIEW 7.0. If you choose to generate this output on counter 0, you will most likely need to connect to pin #2. If you choose to use counter 1, you will most likely need to connect to pin #40. You can connect to any of the DGND signals for a ground reference. These are pins: 35, 36, 4, 39, 9, ...
    In order to actually program your board, I recommend that you use our DAQmx driver. I have attached two example programs below. One demonstrates how to generate a pulse and the other generates a pulse train. You can find these examples on your machine by going to Help >> Find Examples >> Hardware Input and
    Output >> DAQmx >> Generating Digital pulses
    You will not be able to have the signal be independent of your PC. First, the board must be programmed by your PC to start and stop the output. Secondly, your DAQ board is powered by your PC power supply. If you turn off the PC, you will effectively turn off your board.
    Let me know if you need any additional assistance with this issue.
    Regards,
    Bill B
    Applications Engineer
    National Instruments
    Attachments:
    Gen_Dig_Pulse.vi ‏45 KB
    Gen_Dig_Pulse_Train-Continuous.vi ‏57 KB

  • Signal generator Pulse train with switch cycle

    Bonjour,
    J'essaie de générer un signal avec un rapport cyclique tres variable sur une carte PCI6602
    Par exemple,
    j'utilise  en signal source internal clock de 20MHz et je souhaite que mon signal soit de la forme suivante :
    4cycles d'horloge à l'etat haut
    puis 2cycles d'horloge à l'etat bas
    puis 17cycles d'horloge à l'etat haut
    puis 4cycles d'horloge à l'etat bas
    puis 20cycles d'horloge à l'etat haut
    puis 5cycles d'horloge à l'etat bas
    pour cela j'utilise le generateur de signaux Pulse Train avec la fonction ND_SWITCH_CYCLE
    mais en verifiant à l'oscillo je ne vois pas le signal varier de cette sorte juste appliquer le dernier rapport cyclique défini.

    Unfortunately, I don't think you can accomplish that with a 6602.  The only way to change the pulse specs on-the-fly is through software calls to the driver, and those won't execute nearly as quickly as you need.  You would need to change the pulse specs for each and every pulse, and do it at a rate of ~1+ MHz.  The software calls will limit you far below that -- I'd guess somewhere in the order of 10 kHz.
    There's a further issue that you must let the prior pulse specs produce a pulse before the new pulse specs are allowed to take their place. So even for very slow pulse trains, it's difficult if not impossible to produce exactly one pulse at each set of specs.
    What is needed (see my wishlist starting at reply #10-11) is the ability to perform hw-timed buffered counter pulsetrain outputs.  Some of the M-series boards allow for hw-timed digital output at rates up to 10 MHz, but it appears that some of your intervals need to be odd multiples of a 20 MHz clock.  Some of the high-speed digital boards could work, but you're looking at ~$2000.
    How many cycles of precisely-timed pulses do you need?  If 8 or fewer, there may be a way to setup a bunch of separate counters that are hw-triggered to start simultaneously, but each produces a single pulse with just the right specs.  Then you'd need an output logic circuit which would essentially OR all the counter outputs together to produce the 1 output you need.
    -Kevin P.

  • How can I generate synchroniz​ed pulse trains with 6602?

    Hi,
    I would like to generate multiple pulse trains with different frequencies with the 6602 TIO card. Currently I am able to generate pulse trains with different frequencies. But is there any way to synchronize all the pulse trains? For example, I'd like to have all pulse trains with their first low-to-high at the same moment.
    Thanks!
    Dan

    Dan,
    Absolutely, the NI-TIO chip on the PCI-6602 supports a start trigger. If you configure all of the counters that are generating a pulse train to use this start trigger, they will be synchronized. The example Generate Pulse Train - Start Trig (NI-TIO).vi demonstrates this process for one counter. In LabVIEW 7, this example can be found in the following location:
    Examples >> Hardware Input and Output >> Traditional DAQ >> Counters >> NI-TIO
    You will need to add code for the other counters, but this example should give you the general idea. Furthermore, this example demonstrates how you can use one of the digital lines to generate the start trigger.
    Good luck with your application.
    Spencer S.

  • Using a SCC counter pulse train to control a SCC digital out signal

    I am trying to send a digital high signal on a SCC-Digital ouput module for a certain number of pulses generated by a SCC-Counter/timer pulse train. I have found examples of how to route such signals through PFI12 etc on an M-series board but I am trying to achieve this without referring to the card, just the SCC modules themselves.
    I cannot find a way to use the sample clock from the counter generated pulse train to synchronise the digital output.
    Is there any way I can do this without referring to the connected M-series DAQ card channels?
    Thanks in advance for your assistance.
    Cheers.

    Hi Phil,
    The SCC carrier is only conditioning your signals (i.e. if your signals are not in optimal ranges, bandwidth or need external excitation). The actual counters and all digital lines are controlled directly by the M-series board. This means you will never be able to refer to a counter in the SCC module.
    If you route the signals of the M-Series board, is as if you had done so externally from the SCC. Look at this example and might give you more insight to how to implement it (This is software timing). The hardware timing would be doing correlation DIO. Here is an example that needs to be modified to adapt to your timing: http://zone.ni.com/devzone/cda/epd/p/id/4414
    Hope this helps,
    Yardov
    Gerardo O.
    RF Systems Engineering
    National Instruments
    Attachments:
    Finite Dig Output High.vi ‏31 KB

  • Pulse Train Generation using PCI-MIO-16E-4

    I need to generate pulse trains of changing pulse widths using PCI-MIO-16E-4 daq card using Igor Pro.
    I have tried to use the CTR functions (but always keep getting errors and it doesn't work). I also used the general purpose counters (GPCTR functions) but cannot visualise them on a CRO. If someone can help in regards to the programming aspect, it will be greatly appreciated.
    Thanks
    Vakul

    Hi Vakul,
    Some questions that might help me to get you a solution.
    Are you using Traditional DAQ, or DAQmx and which versions are you using?
    What operating system are you running?
    When you say you can't visualize them on CRO, I assume that you are hooking the counter out to a cathode ray oscilloscope and can't see the pulse train?
    Are you going to need more than two different pulse widths for your pulse train?
    There are several online knowledge bases describing how to change the frequency of a pulse train on the fly.
    This link explains how to use software to create a new pulse width.
    http://digital.ni.com/public.nsf/websearch/7B1B0427C39FE33086256CEE00752133?OpenDocument
    This link discusses using frequency shift keying, which will only allow you to have 2 different pulse widths.
    http://digital.ni.com/public.nsf/websearch/EC1F089252F33B248625696E006FB6FC?OpenDocument
    I assume that you are writing this program to compile in Igor Pro using C. I can help you with the C code development, but don't know anything about the Igor Pro API.
    Please get back to me about those questions and let me know if you need further help.
    Michael Denton

  • Can I create pulse train above 167s?

    I need to generate pulse train with pulse width longer than 167.7 sec. using card 7030/6030E. Can anybody help me? Thanks

    The 167.7 sec limitation is caused by dividing 100 kHz by 2^24. So all you have to do is use two counters instead of one. Use the first counter to generate a pulse train slower than 100kHz and you can use the second counter to generate a very slow pulse train if you set its source to the out of the previous counter. You will have to use the pulse specs on the second counter, because it is going to be used to divide down the initial pulse train.
    I hope this helps.
    Joshua

  • Trigged generation of two pulse trains

    I have to write an application that will generate two equal pulse trains (with a given phase difference) on two different counters when I recieve a trigger signal. I'm using a 6063daq-card. If anyone have an related example, or some hint on how to solve this (elementary problem) please let me know.

    Hi OG,
    Although this functionality is present on NI-TIO counter/timer chips (NI-660x boards) by use of an initial delay within the counters (could program a delay equal to the desired phase shift) this is not available on DAQ-STC chips (E Series boards). This is because DAQ-STC counters do not support an initial delay in pulse train generation mode (driver doesn't support it).
    The only way I see this happening is if you use the frequency generator on the E Series to generate your first pulse train (output on the freq_out pin) and use your two main counters to generate 1) a triggered and delayed pulse which will gate 2) your second counter which is a pulse train of the same frequency. To get the phase correct, your delay of the pulse should be equal to t
    he desired phase shift of your pulse train period and should be gated/triggered by one of the rising edges of your frequency generator pulse train. The actual pulse width of this single pulse should be made as large as possible (or should toggle the output - see the 2nd knowledge base linked below). I have included a couple good references to get you started. Hope that helps. Have a good day.
    How Can I Generate Two Pulse Trains without Using Both Counters on My E-series Data Acquisition Board?
    http://digital.ni.com/public.nsf/ websearch/ 129541C85CEEDDBF86256ADF005C4409?OpenDoc ument
    Using the General Purpose Counter (GPCTR) on the Data Acquisition (DAQ) Device as a Digital Line
    http://digital.ni.com/public.nsf/ websearch/ B8A49A4E33F38AB686256B610061DC6D?OpenDoc ument
    Ron
    Applications Engineering
    National Instruments

  • How to continuously generate a pulse train with variable frequency

    Dear all,
    I am trying to use NI-USB 6259(BNC) to send Pulse signals to conduct position control of a servo motor with labview. The position control of servo motor follows these rules:
    The number of the pulse train determines how many degrees the motor rotate ;( e.g. the angular position of motor)
    The frequency of pulses determines how fast the motor rotate; (e.g. the speed of motor rotating)
    The digital determines the direction of rotation of motor (e.g. clockwise or counterclockwise)
    My question comes when I need to continuously generate a finite plus train signal in a period of time. Below is a sample:
    Time(s)
    Number of pulses
    Direction of rotation
    (1 is clockwise, 0 is counterclockwise)
    Frequency
    0-1
    923
    1
    923hz
    1-2
    3540
    0
    3540hz
    2-3
    1751
    1
    1751hz
    3-4
    2663
    0
    2663hz
    4-5
    353
    0
    353hz
    5-6
    1017
    1
    1017hz
    6-7
    3436
    1
    3436hz
    7-8
    302
    0
    302hz
    8-9
    1513
    1
    1513hz
    9-10
    570
    1
    570hz
    Here is the explanation of this table, the motor keeps rotating in clockwise direction during 0~1s. When the time reaches 1s, the motor just complete the rotation of 923 pulse signals. And then the motor starts to rotate in counterclockwise direction during 1s~2s. When the time reaches 2s, the motor just complete the rotation of 3540 pulse signals. So we can see that the rotating speed of motor in 0~1s is different from the speed in 1s~2s. Namely, the frequency of pulse signal in 0~1s is different from the frequency in 1s~2s.
    I have already use the counter output of DAQmx, it just can generate pulse signal with certain numbers and certain frequency in one time. The attachment is the vi which can generate a finite digital pulse train from a counter output channel and the frequency, duty cycle, Initial delay, and Idle state are all configurable.
    How can I continuously generate  a series of pulse train with varying numbers and frequencies during a certain period of time.
    Thank you very much for your help!
    Solved!
    Go to Solution.
    Attachments:
    Counter - Finite Output.vi ‏57 KB
    Finite output.png ‏13 KB

    Hi aacuna,
    Thank you for your reply!
    I already checked that  article.  The frequency in that Vi can change dynamically, but the method of adjusting the frequency is ‘manual’ .Below is the front panel of that Vi. When the Vi is running we can change the frequency by press the button.   
    Time(s)
    Frequency
    0-1
    923hz
    1-2
    3540hz
    2-3
    1751hz
    3-4
    2663hz
    4-5
    353hz
    5-6
    1017hz
    6-7
    3436hz
    7-8
    302hz
    8-9
    1513hz
    9-10
    570hz
    Thank you!

  • HOW TO GENERATE FINITE AND CONTINUOUS PULSE TRAIN WITH USB6216 AT THE SAME TIME?

    Hello.
    I am using a USB6216 DAQ and need to generate a 20 kHz signal using the
    ct0 output and at the same time I need to generate a finite number of
    pulses, say 9, on a software trigger using the second counter output
    ct1.
    Currently, I have two VIs that can do this separately, but when I want
    to integrate these into one single VI y get an error in the finite
    pulse train for ct1 that indicates that the requested task is already
    reserved. I am thinking this has to do with the fact that maybe both
    types of task use the same timebase but I have not found the way to
    solve this problem.
    Any help would be very much appreciated.
    Thank you.
    Sincerely
    JSL

    Hello.
    If anybody is interested, the problem is solved.
    There is no resource confilct if I generate the 20 kHz continuous pulse
    signal using the frequency out terminal, and this way I can use both of
    my counters as I please with no problems.
    It's kind of fun to answer one's own questions...
    Sincerely
    JSL

Maybe you are looking for

  • Date function in tablename

    Hi I would like to create a table where I include a reference to year and month, something like this (which I know don't work); create table abc_(sysdate, 'YYYY-MM') Is it all possible without a mile of code :-) Rgds Robert

  • While doing inbound delivery using VL31N

    While doing inbound delivery using the T-code VL31N , am getting the error message " Factory calendar  is not recognised " Guys Please help me out

  • Freeze header columns in web reports

    Hello Gurus,    I am looking for a solution to freeze the header columns. I tried with the java script code from the below link. Forum post in BI Suite – Business Explorer: Re: Freeze Panes in web reports Re: Freeze Panes in web reports but did not w

  • NC6230 heats up and shuts down quickly

    If anyone can please help so I dont spend anymore money on this.LOL  I have a NC6230 that would overheat and shut down after half a minute of so.  I went on EBAY and purchased two other boards and I have the same issue.  Thinking I couldn't have 2 ba

  • Erreur 1015

    bonjour j'ai une erreur 1015 en restaurant mon itphone aider moi s'il vous plait