Pointer Manipulation: Wrap Around/Rollover/Rotation of LabVIEW Arrays and Waveforms???

I know we can't use pointers in LabVIEW, but I was wondering if there's any way we can do wrap-around [or "rollover," or "rotation"] of Array [or Waveform] values without having to make copies of the Array [or Waveform]?
For instance, suppose I'm reading one second's worth of data into a five second buffer. After the first five seconds, I've got
1st (1/5)th: 1st second's worth of data
2nd (1/5)th: 2nd second's worth of data
3rd (1/5)th: 3rd second's worth of data
4th (1/5)th: 4th second's worth of data
5th (1/5)th: 5th second's worth of data
Now I read the sixth second's worth of data, and overwrite the [original] first second, so that I have
1st (1/5)th: 6th second's worth of data
2nd (1/5)th: 2nd second's worth of data
3rd (1/5)th: 3rd second's worth of data
4th (1/5)th: 4th second's worth of data
5th (1/5)th: 5th second's worth of data
and in C, or C++, I'd just move the pointer up to the second (1/5)th of data, and start from there.
The LabVIEW Complex FFT is another place where this would be really useful. The Help File for the Complex FFT is in
Help | VI and Function Reference | Analyze VIs | Signal Processing VIs | Frequency Domain VIs | Complex FFT.
If you read the Help File, you see that LabVIEW returns an FFT with values in the range
[0, 2n - 1)
rather than the standard
[-n, n - 1)
i.e. LabVIEW takes the negative frequencies and tacks them on at the end, after the positive frequencies.
I'd like to be able to view my FFTs with the negative frequencies where they're supposed to be [i.e to the left of zero], and this would be SO easy if I could just move the underlying data pointer of the Waveform forward to the halfway point.
But, of course, in LabVIEW, I don't have pointers, so I was wondering: Are there any built-in VIs for Array [or Waveform] manipulation that will perform this sort of wrap-around [or "rollover," or "rotation"] of the data? If so, I couldn't find them. Ideally, such a VI would have two inputs: {old Array, new starting point}, and one output: {new Array}. Similarly with Waveforms, only you'd need to manipulate t0 as well.
Or do I have to copy the entire data set to a new Array [or Waveform] each time I reach the end of the buffer?
Thanks!

> Ideally, such a VI would have two inputs: {old Array, new starting point}, and one output: {new Array}.
Have a look at "rotate 1D array" in the array palette (second row, fourth column).
(Sorry, I dont use waveform data).
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • I'm suddenly seeing 2-point black boxes around any desktop icon I highlight, and around various elements in any window I'm working in. I have a G5 PPC iMac running 10.4.11.  Neither restarting the machine nor running Mac Warrior has helped.

    I'm suddenly seeing 2-point black boxes around any desktop icon I highlight, and around various elements in any window I'm working in. I have a G5 PPC iMac running 10.4.11.  Neither restarting the machine nor running Mac Warrior has helped.

    Thanks! I often inadvertently turn on the voiceover when I use the wrong keys to send an element to the back in Quark. Funny, I turned off the voiceover on my own, but never noticed that the black boxes had gone away until I saw your post.

  • Indicator wraps around at 16777200, how do you increase this maximum

    I am counting pulses that go much higher than this. I have tried setting the data range but it continues to wrap around at this value. how do you set ahigher value or count the number of times the indicator wraps around so that you can obtain the pulses counted.

    This problem is likely to be caused by counter overflow i.e. the problem you are observing is associated with the hardware being used rather than the software you are developing. You do not mention the board that you are using but by looking at the number you state I would assume that this is a 24-bit counter 2^24 = 16777216 (an E-series board with the DAQ-STC ASIC perhaps??). I don't imagine that the problem is associated with the data range of the indicators you are using. If you are using either 16-bit signed/unsigned integer data type (I16 or U16) you would expect the wrap around to occur at different values - the same is true for a U32 or I32.
    If you are using a board with 24-bit counters on it (you can check the user manual for you board for specific
    ations for the counter), there are several solutions:
    1. Use a board with 32-bit counters on it (the newer PCI-660x boards have 32-bit counters on them).
    2. Develop some logic within your software which detects this overflow and manipulates the values that you observe on the user interface accordingly.
    3. Cascade the two counters on the DAQ-STC (assuming you have an E-series board) to produce a single 48-bit counter, giving you 2^48 possible counts = 281,474,976,710,656 (I hope this is enough!!). There are several pages on the NI web site to help with this option. A good starting point is:
    http://zone.ni.com/devzone/explprog.nsf/6c163603265406328625682a006ed37d/ea97d16a1a8fa902862568c1005f840c?OpenDocument
    It does assume however that you are using LabVIEW....
    I hope one of these options helps with your problem
    Jeremy

  • String Array  Wrap Around

    Hello everybody,
    if I have a string array of say 10 elements, how would I go about shifting those elements to the right or left by one place, ensuring that what had shifted off either end of the array would "wrap around" to the other end of the array?
    Thank you for your help in this.
    regards,
    THE_TH1NG

    You could use Arrays.asList() to wrap your array in a list.
    To rotate to the right, remove the last element of the list, and add it to the front of the list.
    To rotate to the left remove the first element, and add it to the end.
    The changes made via the list are written through to the original array you had.
    Alternatively write a couple of methods that will do it by hand.
    1) store a reference to the array element that will wrap.
    2) loop through the elements in the array, copying them into the next element up/down as appropriate.
    3) put the stored element back at the start/end of the array as appropriate.

  • Making object wrap around square with rounded corners

    I'm trying to figure out how to get a pre-made scalloped edge to wrap around a rounded square to create a frame. Can someone please help me or point me in the right direction, please??

    Wrong tool. You don't do this in PS, you use Illustrator, but even then there will be limitations as to how art brushes can deform along arbitrary paths. The artwork will also have to be vector-based in the first place. if you can't use AI, then your only option in PS is to use the various transform and distortion tools and filters to adapt it to the contour. You will lose quality, though.
    Mylenium

  • Pointer to LabVIEW Array

    LabVIEW memory management question:
    Question Part 1: When I write a C .dll that takes a LabVIEW array,
    LabVIEW passes a pointer into LabVIEW's memory to the array to C. 
    Can C return the pointer to me (e.g., not the array I passed in, but
    it's memory location)?
    i.e.: void GetNativeMemoryPointer(float *pointer, float *array);
    where *array is my input array, and GetNativeMemoryPointer returns the pointer to this array on *pointer.
    Question Part 2: What issues will I run in to if I pass this returned
    pointer to another .dll call.  What if this .dll call is in
    .NET? 
    Concerns: How does LabVIEW hold this array in memory?  When I call
    GetNativeMemoryPointer, does LabVIEW make a copy and send this a
    pointer to the copy to the dll, or is the pointer to the
    original?  Will LabVIEW ever "move" the original, e.g., will my
    pointer become invalid after some time?
    Joe Gerhardstein
    Averna Test Systems
    Certified LabVIEW Architect
    http://www.averna.com

    Part 1: I must confess that I don't understand your question. Pointers and arrays are very closely related in C so I'm not following the sequence. So I don't know if the following applies, but here is a possible answer...
    The pointer to a LV array that is passed to a call library node is valid ONLY during that call. Once the call to the DLL completes, you should consider that pointer value invalid. You can, of course, make a copy of the array and return a pointer to your copy - but LV won't know what it is. It definately won't show up in LV as an array. However, you can pass that pointer to the copy around to other DLLs as much as you want.
    * Don't forget to free the copy. If you make a copy of the array, you own it - therefore you must free the memory of the copy at some point *
    Part 2: Easier to answer.
    * If you want LV to convert your pointer to a LV data type (such as a LV array): Take a look at page 2-4 in the "Using External Code in LabVIEW". In almost all cases we do not support pointers. The only exceptions are the ones shown in the Call Library Node configuration. For arrays, notice that if you want to return an array to LV, we have our own defined data types for this - read up on the CIN section for more information.
    * If you want to return a pointer than LV just messages to other DLLs: No problem. Put the parameter to the routine as a pointer to integer (or a return value of type int). Thus your pointer is an integer as far as LV is concerned. When you pass it to another DLL, we'll pass the exact same value to the DLL - thus the pointer is never modified or the data touched.
    Did this help?
    Message Edited by Lycangeek on 08-10-2005 02:12 PM
    Brian Tyler
    http://detritus.blogs.com/lycangeek

  • Is there an easy way to make JSpinner wrap around at max/min values?

    I have several pages with a couple dozen JSpinners to set various values - mostly numeric, but some are not.
    I would like to make them wrap around when either the max or min values are reached.
    Is there an easy way to do this?
    I was hoping for something like an "enableWraparound" property, but I haven't found such an animal.
    I suspect I could add value change listeners to all the components and do it by brute force,
    but there are too many spinners scattered around to make that an option I would like to take.
    Any suggestions?
    Thanks.

    Ok, it looks like custom spinner models are the way to go.
    Hopefully, I can create a couple that are generic enough to meet my requirements without too much pain.
    It looks like the ones I have already created will be easy enough to modify.
    Thanks for the feedback.

  • Text will not wrap around a photo in indesign cs3?

    we have tried EVERYTHING. we use adobe indesign for our school newspaper and for the past 3 days we have been trying to get one of the articles (text) to wrap around a photo.
    the photo is a simple rectangle shape. for all of the other pages, the text wraps around photos perfectly fine. but for some reason on this one page it will not wrap around any picture at all.
    of course "text wrap" is selected for the photo and we also tried going to the text frame options and unchecked ignore text wrap. that still didn't work.
    we tried putting it on "detect edges" and that also did not work. ):
    please please please if you have any suggestions, add them!!! we really need to fix this issue because this page needs these pictures!

    I just encountered the same problem, the text did not wrap around the image whatever i did. I found the solution on my problem, that i had an imagebox underneath the image, which i was not aware of. I discovered it when i deleted first the textframes and the image. After i deleted the second imagebox the text wrapped around the image as i wanted it!

  • In the Pages Program template on the 4 column page a text is wrapped around a violinist photo How do I prepare the photo for a similar result

    In the Pages Program template on the 4 column page a text is wrapped around a violinist.
    How do I have to prepare the photo to have a similar result.
    Thanks

    You need to have an image with a more or less even background or at least contrasting to the main part.
    Menu > Format > Instant Alpha > run the cursor over the parts you want to eliminate
    With the image selected > Inspector > Wrap > check Image causes wrap > click on 2nd icon > Text Fit > 2nd icon
    Play with Extra Space and Alpha to get what you want.
    Peter

  • MY MAC PRO MOUSE POINTER JUMPS FREELY AROUND THE SCREEN AND MAKES IT IMPOSSIBLE TO NAVIGATE PROGRAMS... ANY IDEAS

    My mac Pro mouse pointer jumps freely around the screen, making it dificult to navigate... it also moves the screen around without touching anything... any ideas whats wrong?

    Check this forum link for some good suggestions:
    https://discussions.apple.com/thread/4650109?tstart=0
    Post if you have any questions!

  • Pasting images, editing, wrap around text in appleworks

    When I try to insert images into a text document in Appleworks, it will add the image, but the only thing I can do is resize it. I can't place the image where I want it to go, and I can't make the text wrap around it either.
    Also, is there a way to make flow charts, or add text to the shapes you can insert????
    Thanks!

    Hi Cristina,
    Images can be inserted into AppleWorks WP documents in two different ways—as inline objects or as floating objects.
    If AppleWorks is in Text mode when you insert or paste the graphic, it will become an inline object. These are treated as a single (large) character in the line of text, and their location is fixed relative to the text itself. Inline objects can be moved, within the line of text, by clicking on the object to select it, then dragging it to another position in the text.
    If AppleWorks is in Draw mode when the graphic is inserted or pasted, it will be a floating object. These 'float' above the text layer, and can be moved independently of the text, which flows under the object. If Text Wrap (go Options > Text Wrap) is applied to the object, the text will flow around it.
    You can change an inline object to a floating object using the following steps:
    •Click on the red toolbox at the lower left of the window to Show the Tools.
    •Click the object (graphic) to select it. A single handle will appear at the bottom right corner of the object.
    •Press command-X to Cut the opbect from the document and place it on the clipboard.
    •In the Tools, click the Selection Tool (Arrow) at the top of the Tools Palette.
    •Press command-V to Paste the graphic back into the document as a floating object.
    (•With the object still selected, go Options > Text Wrap... Choose Regular, and click OK.)
    You'll now have a graphich which can be repositioned at will, and which text will flow around.
    Regards,
    Barry

  • HTML lines wrap around in the HTML report output

    I seem to have a problem with lines wrapping around in HTML format. If the report is ran using the report builder the output will fit in every line without wrapping the information.
    While if I run the same report -- to present the info using a browser -- using JSP in HTML format, the same lines will wrap around the info in two lines.
    Here is how I send this document to the server :
    pwrmpos_n: report=pwrmpos.rep destype=cache desformat=html server=rep60_wforms2 %*
    Any help will be appreciated

    Hello Hernando,
    I am a little confused, the command that you describe is only for paper layout...
    Anyway, let's try to help you:
    - on your paper layout you specified a width for each column (when you resize it in the Paper Design window). When you run the paper layout with HTML (ot HTMLCSS) as format the width is present in the <TD> tag.
    - for the JSP, by default the HTML does not contains any size for the table and cell so the browser size the table to fit in the screen.
    If you do not want any wrapping in the JSP just modify the HTML tags to specify a width, or wrap for the TD tag.
    Regards
    Tugdual

  • How do I get text to wrap around a jpeg photo. Pages instructions don't eem to work for me,

    How do I get text to wrap around a jpeg photo. Pages instructions don't seem to work for me. I'm just beginning to use Pages for other than simple word processing.

    I am creating a photo album with captions and have tried to have one caption wrap around a photo image that is part of a series of three overlapping and descending images. I have selected the photo, clicked Inspector etc. with no luck. I did read a previous answer re floating and noticed that both my text and my image have inline in light colour and floating in dark, which I presume means they are both inline. When I try to click on Floating in Object Placement, nothing happens. The option doesn't appear to be "available", unlike the wrap options below, which do light up and indicate what I want to happen. It just doesn't happen and I don't know how to solve the problem.
    I have had to replace my older computer on which I did all of these projects (newsletters, albums, etc.) with an old version of InDesign, which no longer works with the newer OS 10.6. So I'm trying to learn how to do the same types of things with Pages, and it's somewhat frustrating, since text wrap was quite simple with InDesign.
    Stan

  • How to use structure pointer with « Call Library Function node » in LabVIEW

    I use GetTimeZoneInformation from kernel32.dll. It definition is :
    DWORD GetTimeZoneInformation( LPTIME_ZONE_INFORMATION lpTimeZoneInformation );
    Where
    lpTimeZoneInformation
    [out] Pointer to a TIME_ZONE_INFORMATION structure to receive the current time-zone parameters.
    http://msdn.microsoft.com/library/default.asp?url=​/library/en-us/sysinfo/base/gettimezoneinformation​...
    I don't know how to set this parameter with my cluster based on the TIME_ZONE_INFORMATION structure.
    Your help will be appreciate
    Thanks
    INKSPEC

    INKSPEC wrote:
    I use GetTimeZoneInformation from kernel32.dll. It definition is :
    DWORD GetTimeZoneInformation( LPTIME_ZONE_INFORMATION lpTimeZoneInformation );
    Where
    lpTimeZoneInformation
    [out] Pointer to a TIME_ZONE_INFORMATION structure to receive the current time-zone parameters.
    http://msdn.microsoft.com/library/default.asp?url=​/library/en-us/sysinfo/base/gettimezoneinformation​...
    I don't know how to set this parameter with my cluster based on the TIME_ZONE_INFORMATION structure.
    Your help will be appreciate
    Thanks
    INKSPEC
    If creating a wrapper DLL which does the conversion for you is not an option (I think it won't since that would require C programming and if you knew C programming you wouldn't ask this here) then you will have to create a byte array of appropriate length and just configure the Call Library Node to pass this array as an Array of unsigned bytes and as C pointer.
    On return you will have to copy out the interesting data at the right position.
    First the length of this structure would be:
    typedef struct _TIME_ZONE_INFORMATION {
    LONG Bias; 4
    WCHAR StandardName[32]; 32 * 2
    SYSTEMTIME StandardDate; 8 * 2
    LONG StandardBias; 4
    WCHAR DaylightName[32]; 32 * 2
    SYSTEMTIME DaylightDate; 8 * 2
    LONG DaylightBias; 4
    } TIME_ZONE_INFORMATION
    Total 172 bytes
    Now the fun part will be to actually get out the information. There are a number of difficulties.
    First the strings are 16 bit Unicode so if you are interested in them you will have to call a different Windows API function WideCharToMultiByte function to convert the 16bit Unicode string into an ASCII string. For this part there has been a post here:
    http://forums.ni.com/ni/board/message?board.id=170​&message.id=123821&requireLogin=False
    For the LONG values you would pick 4 bytes at the appropriate offset from the array through the Array Subset function and then typecast it into an int32 and pass that through the Swap Bytes and Swap Words functions to reverse the LabVIEW Big Endian byte swapping in the Typecast function.
    The SYSTEMTIME is a structure with eight 2 byte integers so it would be best to use Array Subset again to extract 16 bytes at the correct offset, typecast this into a cluster with eight int16 numerics and pass it through Swap Bytes too.
    You see accessing such API functions in LabVIEW directly can get easily quite a mess and that is the reason why creating a wrapper DLL to convert properly between LabVIEW datatypes and C datatypes gets soon the easier solution if you need to interface with more than one or two functions taking such complicated data structures.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Word Wrap Around?

    Okay.
    I'm editing my MA thesis and my chair wants me to use "word wrap around" and "left justify."
    I have never heard of either of these. He works in word and does not know anything about Pages as he has never used it. I can say the same thing about Word myself, so to each their own.
    Does anyone know how to achieve that effect in Pages?
    What he wants it to do is not break up words, but not for me to do it manually.
    Any formatting ideas?

    *Word Wrap around* is an odd expression. It could be either +word wrap+ which is what Pages does naturally, which is start a new line when it runs out of room on the end of the line, or he could mean +no hyphenation+.
    If it is the later you will need to set that in:
    +Inspector > Text (T) > More > "Remove hyphenation for paragraph"+ with the text selected.
    *Left justify* is just simply +Align left+, again in the Text tab (the 1st option in the Alignments buttons) or on the toolbar. Unless he means Justify which is align both sides of the text to the margins and spread out the words in between (the 4th option in the Alignments buttons).

Maybe you are looking for

  • How to allign an apDiv with the template centre alligned?

    Hi, I am trying to create a website in Adobe Dreamweaver CS4 but made a website template in Adobe Fireworks which was then imported in. My template was then center alligned with the apDivs placed on it containing all the links/images/rolloevers etc.

  • Two 24 inch cinema displays - one has a yellow tint

    I have 2 cinema displays that are less than one year old. Today, I noticed that one of them has a distinct yellow tint to the display colors compared to the other. I've never noticed this before and I am wondering if the display needs to be re-calibr

  • Problem parsing a license

    I am trying to debug my code in VisualCafe and I get the following error: java.sql.SQLException: java.sql.SQLException: License Problem: The following applies to holders of standard BEA/WebXpress licenses: weblogic.d.h: Error parsing XML license file

  • SCILAB LabVIEW Gateway

    For those who do numerical computations, a new free tool has been released about a week ago. If you are familiar with SCILAB (The open source platform for numerical computation) you might be pleasantly surprised that a Scilab_LabVIEW_Gateway is now a

  • Complex form layout and PPR

    I have a form containing several other ADF Faces components. The first component is a selectOneChoice and I use it to trigger a PPR request. The purpose of this request is to conditionnally re-display the jsf components according to the selection (hi