Splitting datamatrix by output frequency

Hi, I have trouble finding out how to solve a problem in Labview
I am working on improving a program so that it may present data in different frequencies. My NI6211 reads 1000 analog samples per channel and second. I want to be able to display this data with various frequencies as i want to study transients more closely.
The program used to run in 20hz, thus i presented 20 values every second and channel, each value the mean of 50 samples. When i had a fixed frequency of 20 i just told the Read.vi to get 50 samples every 50ms working cycle, used "index array" to split it into 15 1D rows and calculated the mean for each row. The rows were then assembled back into a matrix and used as output.
Now i want to be able to run in 100hz/10samples (and also 50/20, 200/5, 500/2....). I have also changed the working cycle time to 60ms for other reasons.
DAQmx thus reads 60 samples on 15 analog channels every working cycle, and so i get a data matrix of 15x60.
Is there a way to split it into smaller pieces of 15x(sampling speed)? For example if i used a frequency of 100 i would get 6 sets of 15*10, allowing me to calculate the mean value of smaller intervals. For 500hz i would get 30 sets of 15*2 etc...
Is it possible to split a matrix into equally wide columns? Can it be solved with an indexed for loop?
Any help would be appreciated, im still a beginner at Labview!
Attachments:
Varying output frequency.jpg ‏92 KB

Your current code can be replaced by an autoindexing FOR loop, you only need once instance of the "add array elements" operation. Easiest would be to acquire it as a 1D array with a constant number of samples then use "reshape array" to create a 2D array of the desired dimensions to be used for autoindexing as suggested.
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • Split pdf report output

    Hi, I'm writing a report that produces approximately 15000 pages of output. When running the report on the server, it fails with the error "Memory failure - core dumped". I believe that it is due to the size of the output (~20mb).
    Is there a way to split the report output based on the number of records? I've investigated distribution (both in the report builder and using the 9i .xml distribution) and can't seem to find an adequate solution.
    Any comments/suggestions would be greatly appreciated.
    Ta.
    Nick.

    Nicholas,
    I am sure that you will find a better answer of the Reports forum here on OTN, but what about using the bursting output feature in Reports (since 9i). E.g. if you have data that can be separated by a mster record (like departments) you can print the data for each master record in a separate file.
    Maybe this is a known issue that I am not aware of, but this is what the folks on the Reports forum can tell you.
    Frank

  • Output frequency to a port mentioned in MAX

    Hi,
    I am trying to output ca. 100 KHz on a PIF port using NI 6351. I used example from NI example bank and it's working fine with the following code.
    DAQmxErrChk (DAQmxCreateTask("",&gTaskHandle));
    DAQmxErrChk (DAQmxCreateCOPulseChanFreq(gTaskHandle, aChannel, aVirtualAddress, DAQmx_Val_Hz, aIdle, 0.0, aFreq, aDuty));
    DAQmxErrChk (DAQmxCfgImplicitTiming(gTaskHandle, DAQmx_Val_ContSamps, 1000));
     In the above example, I am creating a COPulseChannel and aChannel represents its physical address (for e.g. Dev1/ctr2) and aVirtualAddress is the one which I can assign to this physical address for future use.
    My question is:
    How can I create a virtual channel in MAX and use its name here with a name say "myFrequencyChannel" and then write a function to output Frequency to this channel?
    Motivation:
    This was possible till now for all channels like AI/AO/DI/DO, where I defined all channels with virtual names in MAX and then simply performed tasks by forwarding their names (only) to my functions. So the user need not remember always physical channel but just virtual channel names.
    Thanks in advance.
    Regards
    RB
    Solved!
    Go to Solution.

    Hi,
    I think I misunderstood your questions. I though you wanted to import a Virtual Channel from MAX. 
     As background info: You use the function DAQmxAddGlobalChansToTask when you want to import a global virtual channel from max and DAQmxCreateCOPulseChanFreq when you want to confugure it all programmatically. aVirtualChannel in your example in the name you want to give to the created channel. According to the help, you can also let this field empty. 
    Long story short, you use either DAQmxAddGlobalChansToTask to import a global channel from MAX or  DAQmxCreateCOPulseChanFreq to document your task programmaticaly. Then you can start your task using.
    DAQmxStartTask (gTaskHandle);
     I still have doubt concerning my understanding of your question. Please let me know if that is answering it.
    Best regards 
    Florian Abry
    Application Engineer Group Leader
    NI Germany

  • Calculatin​g the true output frequency of a PXI-5402

    I have a PXI-5402 card sat in a PXIe chassis. I am only interested in sine wave output at frequencies up to approx 10kHz. I know that it is posible to request an output frequency and then query the acutal output frequency but I would rather be able to calculate it before hand. All I can find in the literature is a figure of 0.355uHz for frequency resolution.
    Is there a better description of the frequency resolution? If not, is the resolution exactly 0.355uHz or is this an approximation (to 3 significant figures)?
    Solved!
    Go to Solution.

    This webcast is an excellent way to learn the process of which the NI 5402 and NI 5406 operate to generate their periodic functions: http://www.ni.com/webcast/75/en/ 
    The 0.355uHz value is a theoretical value of achievable frequency rates based on the Clock Rate and Phase Accumulator size. This is the closest thing I can find on ni.com for you to use to calculate the value: http://zone.ni.com/reference/en-XX/help/370524R-01​/siggenhelp/ni_5401_11_31_frequency_resolution_and​...
    I believe Fc for the NI 5402/5406 should be 100M and the accumulator size is 48-bit. Therefore frequency resolution = Fc / 2N = (100 × 10^6) / 2^48 = 3.55271368e-7
    Keep in mind that the device has a VCXO frequency accuracy spec of +/- 25ppm, if you do not PLL lock it to a better source.
    Product Support Engineer
    National Instruments

  • Split Track Audio Output Problem

    I'm trying to make a split track audio output as one requirement of the deliverables list on my current job. Dialog goes left, music right.
    But even though I set up my sequence as two track mono, and have pre-panned the tracks all the way to the left (A1) and right (A2), I seem unable to make a quicktime that will play them as discrete tracks.
    Inside Premiere, they play back properly -- A1 is coming out of the left speaker, A2 out of the right. No bleed or overlap.
    I'm exporting them as quicktime, 2 mono tracks, ProRes 422. But when I play back the resulting quicktime -- voila, the tracks have been re-mixed together without my consent!
    I've tried Media Encoder, with the same results.
    FYI, In the "Channel Layout" section I've tried clicking both "mono" and "discrete" without any improvement. I feel like the problem might be that I'm choosing "Stereo" from the "Channels" popup, but there is no option for two channels that are not in stereo. It goes from mono to stereo to 3.
    Any suggestions would be most welcome. Especially if they arrive soon!  : )
    (Using Premiere Pro 2014.1 on a MacPro Quad Core 2.93GHz machine with 16GB of RAM.)

    i'm experiencing the same issue since today.
    very loud (nearly ear damaging) glitches on crossfades on audio channel. doesn't matter if mp3, aif, or wav.
    plus one channel of stereo sometimes randomly gets louder on transitions for a short time.
    is still there in export. no matter if directly from premiere or via media encoder. (export as prores 422 with uncompressed audio). disabled native ppro import in AME, didn't help
    cleared all media caches and preview files, didn't help.
    not using preview files for export.
    read alot about this bug being in older version here on the forums, but it is still there in CC 2014 v8.0.1
    i am on osx 10.8.5.
    please help Adobe.

  • ?how do i ramp the Digital Output frequency?

    I need to apply a linear ramp to the output frequency of my digital TTL
    output to accelerate and deaccelerate the speed of a stepper motor - is
    there any way to do this such that the ramp is continous?
    using: Labview 5.0.1 on a PC with an AT-MIO-16E-1 board
    -thanks

    You can only decellerate the speed: see CTR Pulse Config.vi (see hierarchy
    of Generate Pulse Train.vi).
    In cluster 'low level parameters there is a auto-increment count value that
    adds to phase 1 of each new period
    wrote in message
    news:[email protected]..
    > I need to apply a linear ramp to the output frequency of my digital TTL
    > output to accelerate and deaccelerate the speed of a stepper motor - is
    > there any way to do this such that the ramp is continous?
    >
    > using: Labview 5.0.1 on a PC with an AT-MIO-16E-1 board
    >
    > -thanks

  • How can I output frequency readings of my signals using FFT?

    Hi there, I need help in regard to the topic stated.
    Currently I have accquired a sine wave with frequency that vary, using one of the accquistion card by NI. I had converted it to a digital signal so that labview can read it. Now, I will like labview to output the measurement of the frequency.
    For example : sine wave of 5KHZ is accquire ,  labview will use FFT to convert time domain to frequency domain, and then output the frequency of the sine wave, in the case, 5KHZ.
    What function block should I be using? I had explored the function blocks of all FFT. Most of them output either real FFT, complex FFT, magniture or phase. But none of them output the reading of the frequency.
    Maybe I had missed out some function block, so how do I go about output a frequency reading after using FFT?
    Thanks a lot in advance.

    After Converting your signal from time domain to frequency domain, u cant expect there is only one frequency component,they should have different frequency components according to your input signal.Use extract single tone information to get the output reading of the frequency.
    Balaji PK (CLA)
    Ever tried. Ever failed. No matter. Try again. Fail again. Fail better
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
    Attachments:
    Detect Freq.vi ‏15 KB

  • Split Stereo Channel Output into Left & Right

    Is there a way to split the output of stereo channel strip (in this case, consisting of an EXS24 sampler, with some samples panned hard left) into two mono channels strips, auxes, or outputs (left and right)? For example, in Pro Tools you can select "Track > Split into Mono" to split a stereo track into two mono tracks, and control each resulting track independently. I'm talking about signal path, not splitting a saved AIFF or sound file. Is there a way to do this within Logic?

    Route the output to a bus, then create two new aux channels and assign their inputs to that bus. At that point, you'll be getting the full stereo output routed to each of your two new channels. To split left and right, click-hold on the mono/stereo button at the bottom of the aux channels, and select "left" on one and "right" on the other.
    That should do it!
    James
    [email protected]

  • How to programatically very the PWM output frequency in 7344, to the desired value

    Hi
    I can use the PWM output only for the frequencies that is specified like 40Khz or 20KHz. I require to set the PWM frequency programatically to the desired value at a aduty cycle of 50%. How to implement this.

    What exactly do you need the PWM oututs for? Are you using a motion drive that requires a PWM command? The controller itself does not allow you to use the PWM ouputs to change the frequency on the fly. You might want to go to a DAQ board of Fielpoint moduel for this functionality.l

  • How can I use FREQ_OUT output frequency signal

    Now,I use VXI-MIO-64E-1 board and Windows/CVI,I want to know how can I use FREQ_OUT single.
    Thanks a lot,
    Wang

    The Frequency Scalar of the DAQ-STC based devices is essentially a third counter that can be programmed only for continuous pulse train generation. See the knowledgebase link below for more info on this. Since this counter is only four bits, this limits the clock divisors to 2^4 or 1 thru 16. Therefore the only frequencies that can be programmed for output on the FREQ_OUT line are timebase / (integer between 1 and 16).
    How do I use the FREQ_OUT pin on my E series board?
    According to the NI-DAQ Function Reference Manual, the signal name should be ND_FREQ_OUT. The source can then be ND_NONE, ND_INTERNAL_20_MHZ, or ND_INTERNAL
    _100_KHZ. sourcespec would follow respectively as ND_DONT_CARE, 1 through 16, or 1 through 16. Note that selecting ND_NONE will disable output on the FREQ_OUT pin.
    Thanks,
    Heath

  • Can MainStage split the audio outputs from a plug-in to separate busses/out

    Take EXS24 or Battery 3 or Kontakt as examples
    Only one plug-in instantiated but each drum 'hit' sent to separate outputs from within the plug-in/VI and brought into the mix on Audio/Aux channels for separate processing.
    It's easy to set up in ProTools and Logic.
    (I don't want to send the output of the channel strip to a bus - I know how to do that)
    I've read the manual so many times and can't find any answers.
    Does MainStage actually allow this routing ?
    Thanks for any help
    Lee

    As far as I know, the only way to do what you want in MainStage is to set up an EXS24 for each output.
    The EXS24 does have an option to load with multiple outputs, but I haven't found a way to make it work on my set up.

  • Splitting video and outputting in 4 files

    Hi guys, I'm new to using Final Cut Express and I have v3.5.
    I was recently asked to be in charge of the school's video wall and I'm trying to figure out a way to split a video file into 4 videos so that I could play each individual video on the four individual screens (top left, top right, bottom left, and bottom right).
    Is it hard to do? The more detail you could spare the better.
    I tried to find this in this forum, but some answers were very simple and I'm not quite sure where to start. I'm new to the whole world of video editing.
    Thanks for you help and time.
    Patrick

    Ah, got it. In that case, you should still create four separate sequences and edit the same clip(s) into each one. You can start by editing in one sequence and copy all the footage to each other one.
    You'll then need to take each sequence individually in order to crop and scale the content to work. For example, open the sequence for the top-left screen and double-click the content inside to open it into the viewer. Click the motion tab, and twirl down the crop selection. Change the "right" and "bottom" properties to 50 in order to crop off the right and bottom part of the video. Play with the "center" and "scale" attributes in the same area to fit the video to the canvas. If your canvas is in Image and Wireframe mode you'll be able to drag it around dynamically to fit. Once you've got the first area done, do the same with the other three sequences (adjusting your crop settings to reflect the appropriate area of the video). You'll need to export each sequence separately.
    The main problem with this method is that FCE doesn't support custom sequence resolutions, so you'll need to scale your video a lot to fit the canvas. This type of thing is really better done in a program like FCP or After Effects that supports custom resolutions - if you do it in FCE things might be a bit fuzzy because of the scaling. To this end, you should select a sequence to edit in with the smallest frame size of your aspect ratio possible (so you don't need to scale it as much). For example, if you are working in 1920x1080 you should select a sequence of 1280x720 (also 16:9).
    Let me know if I need to clarify, as it's a slightly complicated process.

  • Splitting CSV file; output a simple tokenised string of doubles - HELP

    Okay here it goes? I have a file that contains comma delimited double values in the form;
    2,3
    2.8,9.0
    4.8,9.0
    I am trying to get the values in to the a simple string of "2 3 2.8 9.0 4.8 9.0". Therefore i have tried to replace all commas with a space and then split on whitespace? no success there?
    Th other way is to split on white space string.split("\\s+") and creat a string [] array and then loop through each element of the array creating a multi dimensional array of seperated values. These i could then concatente to form a string?
    My question is where is my code going wrong for spliting the string???
    package LineGraph;
    import java.util.*;
    import java.io.*;
    public class ReadData extends Thread {
         private Cdf cdf = null;
         private String fileName = null;
         String rawData = "";
         double[][] data = creatData();
         static double[][] creatData() {
              String rawData = GUI.jta.getText();
                System.out.println("rawData: " + rawData);
                String dataSet = rawData.replaceAll(",","\\s+"); 
                String [] point = null;
                point = rawData.split("\\s+");
                for (int i=0; i < point.length; i++){
                     System.out.println("point:" + point);
              //for (int i = 0; i < dataSet.length; i++){
              //System.out.println("dataSet: " + dataSet[i]);
              //String [] point = null;
              //if (dataSet.length > 0) {
              // point = dataSet[0]; // start with the first element
              // for (int i=1; i<dataSet.length; i++) {
              // point = dataSet[i];
              //System.out.println("point:" + point);
              //String[] CoOrd = point.split(",");
              String result = "";
              if (point.length > 0) {
                   result = point[0];
                   for (int j=1; j<point.length; j++) {
                        result = point[j];
              StringTokenizer tokens = new StringTokenizer(result);
              List list = new LinkedList();
              while (tokens.hasMoreElements()){
                   String number = "";
                   String token = tokens.nextToken();
                   for (int i=0; i<token.length(); i++){
                        if (Character.isDefined(token.charAt(i))){
                             number += token.substring(i, i+1);
              if (!number.equalsIgnoreCase("")){
                   boolean add = list.add(number);
         System.out.println("list:" + list);
              double [][]data = new double[list.size()/2][2];
              int index = -2;
              for (int i=0; i<data.length;i++){
                        index += 2;
                        data[i][0] = Double.parseDouble(
                                  (list.get(index).toString()));
                        data[i][1] = Double.parseDouble(
                                  (list.get(index +1).toString()));
              System.out.println("data.length: " + data.length); //** add this -- see how much data is being created
              return data;
              //cdf = new Cdf(data, fileName, PrintMessage);
         public Cdf getCdf(){
              return this.cdf;

    the point being there are 2 delimiters to split, the first being the comma the second being the line break thus creating an array of single digits
    I have solved the issue by using replaceall to replace all commas with spaces and then split on the spaceStill makes no sense. A line break doesn't not contain spaces. So how does replacing commas with spaces allow you to split on the line break.
    If you are appending each line to a string (to build one long string) then append the data with a comma, not a space.
    I really get the idea you guys are not enjoying my code?Its your requirements we don't understand. You obviously aren't explaining them correctly.

  • How do I set the master clock output frequency on the PCI-1424?

    I want to use the master clock to generate the pixel clock to the imaging chip.

    Hi,
    We have tried everything to be able to set the Master Clock Frequency (please confirm pins 89 and 90 on the 100 pin connector). Everything we try including opening NI supplied camera files sets the Master clock to 40MHz.
    You're code however does do something, the Master clock frequency is set to 5MHz when we open a camera file with your code included. All the attributes show up in MaX but changing the values from Max has no effect, and the frequency remains at 5MHz. We undertake an apply and snap after each change of value with no effect.
    Am I missing something as the command OnBoardClock is supposed to be used to set the Master Clock Frequency, but you don't use that in your text at all. I would appreciate an explanation of the text yo
    u use, if you have the time, as I cannot find any reference to how the software knows what "Frame Grabber Clock" is.
    Thank you in advance for your help.
    Andy

  • 2 analog output channels with different frequencies

    Hi,
    hope that somebody can help me:
    I created two physical tasks, analog output channels.
    I should give signals (triangle signals) to a scanner. The problem ist that I need these triangle signals with two different frequencies.
    I can create the signal with each of the task, but not together. Can I solve this problem somehow?
    Ah, and of course the 2 tasks should start together...
    Thanks for your help!!
    Telly

    You didn't mention the type of device you're using, so I'll assume it's a standard MIO. A typical MIO only has one AO timing engine, so you'll have to create one task for both channels and use a single update rate for the task. You will have to make the output frequencies different by passing different data for both channels.
    For example, let's say your update rate is 1KHz. The data for channel 0 is 1000 data points of a single cycle of a triangle wave. The data for channel 1 is 1000 data point of two cycles of a triangle wave. When you run the task, you will get a 1Hz triangle wave on channel 0 and a 2Hz triangle wave on channel 1.
    Good luck,
    Joe

Maybe you are looking for

  • "iTunes Library" versus "iTunes Library.itl"

    Does anybody know what the difference between the "iTunes Library" file and "iTunes Library.itl" file is? It looks like the ".itl" file actually is being used. What is the other file for? The reason I'm asking is that I have 2 user acounts using the

  • New feature suggestion:  Graphic Pitch Adjustment

    Hey all -- Digital Performer user here, but soon to make the move to Logic (as soon as the new desktops come out in 2008). There is just one major time-saving feature I am missing in Logic, and I thought I'd post it here. I've also sent this suggesti

  • Enhance COID transaction

    Hi, System: ECC604 Please let me know the possiblities of adding custom fields and standard fields in COID transaction (either at header level or at operation level). I don't know to copy the entire program and making Z tcode. Looking for possible wa

  • Connect R Oracle distribution 3.0.1 to Teradata database?

    Is it possible to connect the Oracle R Distribution to a Teradata database?  What package would give the best performance?

  • Please, Wait - Processing Icon - for Interactive Report Query

    Is there a way to use the built in animation that displays a "busy or processing" animation when using an Interactive Form with a live dynamic query? For example, I built an Interactive Report using a query. However, I would like to display to the en