How to change the frequency of a finite/continuous pulse train in the program?

Hello!...
I am trying to modify the Finite pulse train vi example to change the frequency with respect of a ratio (1:2) of the data of a spreadsheet file as they are read one by one.
My aim is to get the pulse train to clock a stepper motor controller, in such way that the speed of the motor increases when the data of the spreadsheet increases and vice-versa.
I think that if I want to get the clock to change its speed, I must change the frequency and if I want it to increase/decrease like the data in the spreadsheet, I must tell the frequency that the data is increasing or decreasing in value.
Obviously the program must do it while it is running
Can anyone see wh
ere I have gone wrong and/or give any suggestions?
I have attached my vi and the spreadsheet file.
Thanks
Tiano
Attachments:
My_VI.vi ‏99 KB
wave.txt ‏18 KB

Tiano,
Try to build the pieces of the program separately. Get a VI running that reads the spreadsheet and reports the data in it sequentially in an indicator (forget about the pulse generation at this time). This indicator will be wired to the frequency input of the pulse generator VI.
You have read the data and have a transposed array. Now you must learn to use the Index Array function in a For Loop to extract the data sequentially. You will wire the increment output [i] of the For Loop into Index Array to shift from one data point to the next.
You have a For Loop with no constant wired to [N] to tell it how many times to run. If you use Array Size to extract the number of entries in the spreadsheet data, this can be the constan
t that tells the For Loop how many times to run.
You are using the Tab Control in a way I have never seen before (I don't think it will work this way either. Tab Control is for presenting and hiding controls, indicators, labels, etc. on the front panel, before running the VI. They are not used to control the program functionality itself. Typically you would use a Boolean to choose between 2 options for a Case Structure.
You can also change the path constant which selects the spreadsheet file into a control. This would allow you to browse for any file you want and eleiminate the need for the Case Structure altogether.
Mike

Similar Messages

  • How to change the frequency of pulse train on the fly using an array of values?

    Hi all!
    First I want to thank U for the great job you are doing for this forum.
    Iam still busy trying to control a stepper motor, by sending pulses from my E-series 6024 to a compumotor s6- stepper Driver. I've managed to get it working. I desperately need to control the motor using the values from an array. I believe we can use two approaches for that:
    1st - I can get an array of the "numbers of pulses". Each element must run for 10 milliseconds. Using that we can calculate the array of frequencies to send the number of pulses within 10 milliseconds for each specific element. Could we use the arrays of "number of pulses" and frequencies in a "finite pulse train " and up
    date with each element every 10 millisecond?
    2nd - Or Could we use of the frequency array in a "continuous pulse train vi" and update it every 10 milliseconds?
    Please note that I must use the values as they are.
    Can someone please built a good example for me? Your help will be appreciated.
    Regards
    Chris
    Attachments:
    number_of_steps.txt ‏17 KB
    frequency.txt ‏15 KB

    Tiano,
    I will try to better explain the paragraph on LabVIEW. The original paragraph reads ...
    "While in a loop for continuous pulse train generation, make two calls to Counter Set Attribute.vi to set the values for "pulse spec 1" (constant 14) and "pulse spec 2" (constant 15). Following these calls you would make a call to Counter Control.vi with the control code set to "switch cycle" (constant 7). The attached LabVIEW programs demonstrate this flow."
    You can make two calls to Counter Set Attribute or you can make a call to Set Pulse Specs which, if you open this VI, you will see that it is just making two calls to Counter Set Attribute. What you are doing with the Counter Set Attribute VIs is setting two registers called "pulse s
    pec 1" and "pulse spec 2". These two registers are used to configure the frequency and duty cycle of your output frequency.
    The example program which is attached to this Knowledge Base demonstrates how to change the frequency of a continuous generation on the fly. Why continuous? Because changing the frequency of a finite train would be easy. When the train completes it's finite generation you would just change the frequency and run a finite train again. You would not care about the time delay due to reconfiguration of the counter.
    If you would like to change the frequency of the pulse train using a knob, this functionality will have to be added in the while loop. The while loop will be continuously checking for the new value of the knob and using the knob value to set the pulse specs.
    LabVIEW is a language, and as with learning all new languages (spoken or programatic) there is a lot of learning to be accomplished. The great thing is that LabVIEW is much easier than mo
    st languages and the learning curve should be much smaller. Don't fret, you'll be an expert before you know it. Especially since you're tackling a challenging first project.
    Regards,
    Justin Britten

  • How to change the frequency of a finite pulse train?

    Hi all? I Know I’ve asked once a similar question, but I need a better answer. I would like some ideas or examples on how to modify the example in LV; "Finite Pulse Train Generation - Intermediate for AM9513-Based Devices",so that the frequency can be changed while the VI is executing.
    Will i have any problem with I use this VI in a DAQ-STC-Based Devices(E-series)?

    Tiano,
    I will try to better explain the paragraph on LabVIEW. The original paragraph reads ...
    "While in a loop for continuous pulse train generation, make two calls to Counter Set Attribute.vi to set the values for "pulse spec 1" (constant 14) and "pulse spec 2" (constant 15). Following these calls you would make a call to Counter Control.vi with the control code set to "switch cycle" (constant 7). The attached LabVIEW programs demonstrate this flow."
    You can make two calls to Counter Set Attribute or you can make a call to Set Pulse Specs which, if you open this VI, you will see that it is just making two calls to Counter Set Attribute. What you are doing with the Counter Set Attribute VIs is setting two registers called "pulse s
    pec 1" and "pulse spec 2". These two registers are used to configure the frequency and duty cycle of your output frequency.
    The example program which is attached to this Knowledge Base demonstrates how to change the frequency of a continuous generation on the fly. Why continuous? Because changing the frequency of a finite train would be easy. When the train completes it's finite generation you would just change the frequency and run a finite train again. You would not care about the time delay due to reconfiguration of the counter.
    If you would like to change the frequency of the pulse train using a knob, this functionality will have to be added in the while loop. The while loop will be continuously checking for the new value of the knob and using the knob value to set the pulse specs.
    LabVIEW is a language, and as with learning all new languages (spoken or programatic) there is a lot of learning to be accomplished. The great thing is that LabVIEW is much easier than mo
    st languages and the learning curve should be much smaller. Don't fret, you'll be an expert before you know it. Especially since you're tackling a challenging first project.
    Regards,
    Justin Britten

  • 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

  • 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

  • How to change my 4th generation iPod with 5th generation iPod under exchange program

    how to change my 4th generation iPod with 5th generation iPod under exchange program in uae?

    Apple does not have such an exchange program.  There is a general "recycling" program
    http://www.apple.com/recycling/ipod-cell-phone/
    (see International link in the right column)

  • Hello, I would like to produce 2 different pulse trains on the CTRo and CTR1 output pins.

    (DAQ-CARD E6024 PCMCIA)I have the 2 output pins monitored on my scope, when CTR0 puts out a pulse train, CTR1 goes high. When CTR1 puts out a pulse train CTR0 goes high. Also, the pulses are interleaved with each other. Is there a way to make then start at the same time
    Attachments:
    Stim_Output_pulses_CTR_0,1.vi ‏94 KB

    Hello Zoltan,
    I would suggest using the counter gates to synchronize the counters. You will need to externally run a wire from one of the DIO lines you're not using to one of the counters' gates. When the counter gate is high, the pulse train will be generated on each counter. Both counters will need to use the same PFI line as the gate.
    There is an example program that ships with LabVIEW 7 called "Gen Dig Pulse Train-Continuous-Pause Trigger" for DAQmx. This demonstrates how to configure the counter to only generate the pulse train when the gate is high.
    With this configuration, you could synchronize the counters by writing to the DIO line which is wired to one of the counter gates when you're ready to start the pulse train generation.
    Hope t
    his helps.
    Kristi Hummel
    Applications Engineer
    National Instruments

  • How to merge to frequencies together and play it? I have a program that outputs two numbers everytime and those numbers in Hz. I want to merge those two different frequencies and play the sound.

    Hi there
    I have a program that reads from a table done in excel and finds two numbers from the table(they're different all the time). Those numbers are represented in Hz. What I want now is how to merge those two numbers as frequencies and output them and hear them from the speaker as audio. I also have the part of hearing them done but I can't figure out a way to have it connected so that it doesn't matter which numbers come up, it'll update it accordinaly. I appreciate any helpers.
    Thanks a lot

    Then I'm not sure what you're doing, or what your definition of "add" is. Here is the example I posted, with Signal 1 at 250 Hz and Signal 2 at 500 Hz:
    Message Edited by smercurio_fc on 01-15-2009 03:46 PM
    Attachments:
    add freqs.png ‏25 KB
    add freqs.vi ‏123 KB

  • How do change my phone to where when i get a message the whole message doesnt come up on my screen?

    How do i change my phone to where when i get a message the whole message does not come up on my screen?

    Settings-Notifications-Messages-Turn "show preview" off...

  • How to change font size of text inside a "text box" form the Drawing Markups?

    Hi,
    I expected there to be an option to change the font size after I selected the text and right-clicked, but no, there is only one option that allows you to change the text style but not the font size.
    Does anyone know how to change the font size?

    Don't know what the e-mail is about, why not just log into the forums. In any case, it does not sound like a text box, but one of the other text options (like the Typewriter tool). The regular text edit tool allows you to edit the text and fonts in a regular text box. Select the box and use ctrl-E. You may have to select the text edit tool (name changed in AAX) first. Such editing is not really recommended. Editting in Acrobat should be limited to simple changes, and those often become a pain. The best method of fixing the problem is in the original document and then creating a new PDF.

  • How do I make a VI to measure the frequency and power level of a transmitter using the NI 5660

    I am working on an RF project that requires me to measure and record the frequency and power level of a transmitted signal. I am using the NI 5660. I am quite new to Labview and the PXI, so I'm not so sure how to do this.
     I know I have to initialize the NI 5660 but I don't know what to do afterwards in terms of measuring the frequency of the acquired signal. I'm not sure what blocks to put together nor do I know where to find them. could someone please enlighten me on how I may understand what I need to do.

    Hi princess!     (it's funny writing that somehow)
    Have you considered the example finder?
    There should be examples on how to acquire and measure with the NI 5660.
    And there should be a block in LV that was delivered with the NI 5660 software, that does something like "acquire spectrum" or something like that.
    Regards,
    Pattos
    LabVIEW Gretchin

  • How to change sampling frequency

    Hi,
    what is the simple way to change sampling freqiency for more AIChannels (some differential and some RSE and diff. min/max values) trough cont. data acquisition?
    Thanx
    Vedran

    The only way I have found to do this is to use a counter as your clock source for you analog input lines. You can vary the frequency of this while the program is running. Take a look at the attached program. I have an E-series card, so that is what this is based on.
    Hopefully it will be useful.
    Randall Pursley
    Attachments:
    Counter Clock Acq.vi ‏180 KB

  • Using cDAQ timers to repeat a hardware-timed finite-sample pulse train clock

    Hi all,
    As part of a complex project, I must implement an acquisition hardware interface for a linear motion sensor using the Synchronous Serial Interface (SSI) output common in industrial motion control. (I have a fair bit of experience in digital electronics, but I'm new to hardware timer-synchronized digital I/O in LabVIEW.)
    To do this, I need to create a hardware-timed bursted pulse train TTL clock signal. Each burst consists of 25 high-low transitions with a full-cycle period of 2.67 microseconds (375kHz). The output must then be held high until the next burst, which occur at 1ms intervals.
    Using cDAQ timers and a NI 9401 (based on the example at http://www.ni.com/example/30256/en/), I've been able to create the pulse train burst as described (see attached VI image). Next I need to configure another timer to trigger this burst to repeat at 1ms intervals.
    Does anyone have any pointers about the best way to accomplish the hardware timing for repetition of the pulse train?
    Any suggestions of alternative strategies or observations as to the ways my noobish code is stupid or inefficient are welcome as well!
    Thanks!
    Solved!
    Go to Solution.
    Attachments:
    Hardware Timed Pulse Train Clock.jpg ‏102 KB

    Hey Ryan, 
    A picture of the behavior you are seeing would be helpful. The NI 9411 should only be reading 50 bits every 1 ms.  
    It may not be possible to read 25 bits (do you mean 50 bits? 25 high 25 low) and push it to a queue without encountering an overflow error. If you take a look at the above code the digital input will receive 50 sample clocks every 1 ms. This is equivalent to acquiring 50 points every 1 ms which is an acquisition speed of 50 samples/1 ms=50 kHz. The read loop must keep up with the 50 kHz rate otherwise the buffer will overflow. In the above example I’ve set the read to pull 5000 samples (x) with the assumption that the loop will take less than or equal to .1 seconds (y). This yields a software acquisition speed of 50 kHz (5000 samples/100 ms). If the loop speed is faster than 100ms then the 10 seconds timeout on the DAQmx read will allow for the read to block so the FIFO may be filled.
    The options available for question 2 are below. They may be used separately or in conjunction.
    Move the DAQmx Read for the NI 9411 to its own independent while loop, set the DAQmx Read to acquire 50 samples, do not graph the data, and pass the data to a Queue for processing in a consumer loop. This will increase the loop speed which may allow you to keep up with the 50 kHz acquisition speed. This may not work because the loop speed will need to be 1 ms or less.
    Increase the value of the Samples per Channel control that goes into the DAQmx Timing VI. This will increase the DAQmx Software Buffer size. This buys time until you receive an overflow error because the DAQmx Software Buffer is being filled faster than samples are removed.
    Read in 5000 sample chunks (producer loop), push this to the queue, and perform the analysis in 50 bit chunks (consumer loop). The additional queue created should allow for the acquisition loop to keep up.
    Regards,
    Izzy O.
    Product Support Engineer
    ni.com/support

  • Tracking the learner so they can continue where they exit the last time

    Hi everyone, need some advice here.
    My course will be uploaded to a LMS.
    Is there any setup I need to do so that the learner can continue where they exit from the course when they return?
    Is this a LMS setting or is it a Captivate setting?
    Any help would be appreciated.
    A link to the tut would be great too.
    Spec:
    Course to be published in swf
    Using CP 8.

    Hello,
    Welcome to Adobe Forums.
    Bookmarking a lesson provides the learner an opportunity to continue viewing a lesson from the exact spot where they left off. If you've uploaded your e Learning lesson into a Learning Management System, bookmarking is enabled by default in every lesson that you publish.
    There are two options for bookmarking the course. "Self-paced learning" is the used only when you are not using a LMS. But if you want to upload your course to  LMS ( "Never Send Resume data") is the option.
    You have to make sure that Never Send Resume Data is unchecked from the EDIT>>Preferences>>Quiz>>Reporting.You need to click on advance button to check this option as mentioned below.
    Regards,
    Rajeev.

  • How to change replication frequency

    Server2012R2, how can I change the hyper-v replication frequency after replication has already been enabled? When I set it up I set it to 30secs but I am finding that is too frequent and would like to increase that to 5mins or 15mins.
    davidh

    Hi its easy, open the settings of the Virtual Server which is being replicated.
    Go to the Management Section > Replication
    on this page there is a tab to select the replication time,
    click apply
    regards
    Mark

Maybe you are looking for

  • Delivery note from sale order

    Hi all, While trying to create a delivery note against sale order in VL10G, the message "only 0 ea of  material XXX available".    In stock material quantity is available.  The material has some reservations against it.  Will this be resulting in not

  • ITunes 7.4.1 (2)

    I just updated to the latest iTunes version. As the describtion said this version will have the ringtone availability for the iPhone. Unfortunately the ringtone icon is not showing in my library. If I syncronize my iPhone it shows me this extra folde

  • Spool Error: "Error in spool C call: Error from TemSe"

    Hi All, We are getting the above error in F110 transaction. Even though the line items are clearing. But, cheque numbers are not updating and spool also not creating. Please suggest me, what i have to do for this. Thanks in Advance, Krishna.

  • Cannot print - troubleshooting help

    I am using an oldish pdf generator (header is PDF1.0) and cannot print the document, although it looks fine on-screen The generator embeds full (non-subset) T1 fonts summary: print (to ps file) - fails (in reader) print(to ps file)  as image - fails

  • How do I get delete button back on inbox, it disapeared.

    My delete button has disappeared from my inbox. I have to open email to delete it now. How do I get it back?