Best way to create array from sampled signal???

I'm not sure exactly how to pose this question (been using labview for less than 2 weeks). I'm trying to graph the position of a motorized stage being run though an old Newport controller. I can obtain the position no problem. My sub-routine to get the position is in a while loop that repeats every 200 ms. I added a shift register to keep create an index to make the array, but it only stores the final position in the middle of the array, and puts zeros everywhere else (I initialized a large array outside the loop so it's basically just not writing anything except for that one value).
When I use the probe the index and position values change together, I just don't understand why it doesn't store.
Sorry if this is vague, I'm just not sure how to store these values to plot them. Any help is apprecated.
Thanks
Tim

I'm unclear from you message exactly what you are doing with the shift register, but if you create an array outside the loop, of the maximum size expected (with a little more in case your guestimate is wrong) then use the loop index to index a "replace array subset" to replace the 0 value with your new value. Alternatively, create a null array of the right data type (an array constant) and do an append. Or just lead the value to the loop edge and enable indexing. The first two allow you to "see" the array during the running, the later one only allows you to see the results when the loop is stopped.
P.M.
Putnam
Certified LabVIEW Developer
Senior Test Engineer
Currently using LV 6.1-LabVIEW 2012, RT8.5
LabVIEW Champion
Attachments:
adding to loop.vi ‏43 KB

Similar Messages

  • Best Way to Create Array of Values From ArrayCollection

    I often use Arrays of values from ArrayCollections in my
    application in order to facilitate faster performance when
    filtering other Collections.
    For instance, let's say I have an ArrayCollection of Objects
    with the properties "id", "name", "label", and "isActive". What
    would be the best way to get an Array of all the "id" values?
    Right now, I am looping over the ArrayCollection, and adding
    the value of the property I need to an Array using Array.push().
    For larger Collections, this seems like overkill. I was wondering
    if anyone knew of some quicker way to get an Array of values of one
    property from an Array Collection.
    My current method for doing this is attached below...
    Thanks.

    No, that won't work - toArray() simply returns the entire
    Collection as an Array.

  • Best way to create DVD from videos from several events?

    Hi all - I'm very new to iMovie and iDVD and was hoping for some advice. I'm making a compilation DVD "for the grandparents" of videos from a variety of the kids' events throughout the year. What's the best way to do this? By the way, I've switched to using iMovie HD but am still using iDVD '08. I've been prototyping a few things and came up with the following options:
    Option 1: Create one iMovie HD project and import all the videos from the various events into one timeline. I then create the chapter markers as usual, then Share with iDVD.
    Question: I want each of the event videos to return to the DVD Menu. How would I do that if all the videos have been combined into one timeline in iMovie HD?
    Option 2: Create each event video under its own iMovie HD project. Export each video into .dv format (I don't know what the best format would be). In iDVD, insert each video.
    Questions: Would I lose video quality going this route? If I wanted to create chapter markers within each event video, I assume I would lose them once I've exported to .dv format?
    Which of the above would be a better option? Is there a better option?
    Thanks!

    If you make changes to your iMovie project, the next time you open your iDVD project a pop-up will inform you that assets have been updated and asks if you want to update. Click update and your changes will be incorporated. As long as you haven't changed locations of your iDVD project and iMovie project, iDVD will point to the ongoing iMovie project. But if you move your iDVD project to another drive, or rename the iMovie project, iDVD will tell you that there are missing assets because it can't find your iMovie project. At least, that's what happens to me when I do that.
    Happy Turkey day!

  • Best way to create blocks from "No Year" to each year

    Hi,
    I have a scenario where I need to create blocks for each year based on the data in "No Year", keeping all the other members same.
    Years in Year dimension are not fixed as every year it would be added, so I do not want to hard code the years.
    I was looking the Datacopy command but am not able to get it using the same.
    Following is the extract of the code that I am trying to execute.....
    SET UPDATECALC OFF;
    SET CREATEBLOCKONEQ ON;
    SET LOCKBLOCK HIGH;
    FIX(
         [Scenario],
         "No Year",
         "ALDAR PJSC",
         "ICE99999",
         "ARB-Al Bandar","P115101", /* Projects */
         @RELATIVE("Emp013",0), /* Employees*/
         @RELATIVE("EMPG001",0), /* Employee Grade */
         @RELATIVE("D100000",0), /* Department */
         @RELATIVE("Period",0), /* Period - Dense */
         "ADJ120",     /* Adjust - Dense */
         "ST02021300" /* Account - Dense */
         [Version]
              [Version] = [Version] + 0;
    ENDFIX
    In the above case, I want to use @RELATIVE("Projects",0) which has around 90 members, but it takes huge amount of time. So, I tried having only one Project member initially and it took around 1 minute; then I tried using 2 members from Project dimemsion, then it took 2 minutes...
    Let know if there is any way to create blocks......

    Why not do a DATACOPY with a substitution variable as the target?
    FIX(
    [Scenario],
    [Version]
    "ALDAR PJSC",
    "ICE99999",
    "ARB-Al Bandar","P115101", /* Projects */
    @RELATIVE("Emp013",0), /* Employees*/
    @RELATIVE("EMPG001",0), /* Employee Grade */
    @RELATIVE("D100000",0), /* Department */
    @RELATIVE("Period",0), /* Period - Dense */
    "ADJ120", /* Adjust - Dense */
    "ST02021300" /* Account - Dense */
    /* Copy the data, creating blocks along the way. */
    DATACOPY "No Year" TO &NextYear ;
    /* Get rid of data, but keep blocks. */
    FIX(&NextYear)
    CLEARBLOCK ALL ;
    ENDFIX
    ENDFIX
    That would be pretty quick.
    Regards,
    Cameron Lackpour

  • What is the best way to create a database schema from XML

    What is the best way to create a database schema from XML?
    i have  a complex XML file that I want to create a database from and consistently import new XML files of the same schema type. Currently I have started off by mapping the XSD into Excel and using Mysql for Excel to push into MySQL.
    There must be a more .net microsoft solution for this but I cannot locate the topic and tools by searching. What are the best tools and way to manage this?
    Taking my C# further

    Hi Saythj,
    When mentioning "a database schema from XML", do you mean the
    XML Schema Collections? If that is what you mean, when trying to import XML files of the same schema type, you may take the below approach.
    Create an XML Schema Collection basing on your complex XML, you can find
    many generating tools online to do that.
    Create a Table with the above created schema typed XML column as below.
    CREATE TABLE youTable( Col1 int, Col2 xml (yourXMLSchemaCollection))
    Load your XML files and try to insert the xml content into the table above from C# or some other approaches. The XMLs that can't pass the validation fail inserting into that table.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • What is the best way to create Aperture book from Pages '09 document?

    What is the best way to create Aperture book from Pages '09 document?

    There is no way to import pages documents to Aperture and convert them to an Aperture book. Aperture books can only be created by manually adding images and text to the pages of a book, and using the layout of the predefined templates.
    The best you could do, would be to print your pages document to pdf and import the resulting pdf file into Aperture as a new project. This will create one image for each page. Then select the page images all at once and  create a new book. Select a theme with fullsize page images, like "picture Book", and then add the images of the pages to the empty pages of the book.
    But probably would you get a much better quality and layout, when you recreate your pages document in Aperture, by starting with an empty book and copying and pasting the text from your Pages document. But don't paste the photos from the document - try to use the originals of those photos.

  • Best way to create SVG file from drawing application?

    I am developing a drawing application that allow the users to draw and edit static two dimensional images such as Rectangles, Ellipses and Text. I have a superclass SVGShape that contains all the common features of a shape such as x1, x2, color etc. I then have SVGRectangle as a subclass of SVGShape.
    I want to know what would be the best way to create an SVG file from this? An idea I have at the minute is to have an abstract method getSVG() in the SVGShape class, and then implement the method in the subclasses. I will then create a new class called SVGManager which iterates through the list of shapes (Btw I'm using MVC, my shapes are stored in a Collection) and uses the getSVG() mehtod in each shape to build up a SVG file.
    What do you think of this? Any better ideas?
    Thanks guys

    I used a visitor for this in a similar project, so that when the svg library is used in a applet or browser and the writing functionality isn't required, it may be omitted from the bundle.
    Pete

  • Best way to create a conact list from the user profile properties

    We have a customer looking for a phone book utility, starting with a table showing main user information and with some search options. We would like o base it on the user profile properties and not to create an indipendent studion record browser porlet.
    What is best way to create a conact list from the user profile properties ?

    I did something like this using search.  It can get messy, so you need to take care with it.
    * Identify the properties you want to make accessible to search (ex: name, etc.)
            - add them to the user property map
            - flag them as searchable
    * I broke down and used the native server API.  I'd still suggest this approach.
    * Write some simple code to do vcard export if you like
    (my code is all in vb.net)
    I really believe this is the "right" approach, but honestly, this was a bit painful and has been
    messy for us given some other business issues.  (to my chagrin we have users with 2-letter last
    names...)
    I have code you're welcome to poke at, but it's more or less slapped together and has various
    different search methods commented out so you can see how I tinkered w/ the remote vs. server
    API.
    If you'd like it mail me at [email protected] and I'll send you a zipped copy w/ a
    readme.  I hope it may be useful to you as both a starting reference.

  • Best way to create an html from application

    I need connect to an Oracle database and generate a static report from the result Query.
    Do you know what can be the best way to create this html file ?
    There is exists some html library to use?
    Thanks in advance

    you don't need a library. html is verry easy to use. you only have to write text to a file with html-tags.
    hope it helps

  • What's the best way to create a panorama from a series of images?

    What's the best way to create a panorama from a series of images?

    This is PhotoMerge result
    This is WLPG
    This is a manual merge
    Before anyone comments on the poor image quality, I know. Its not my photography.
    The beach huts were in an arc which doesn't help.
    You can see that the photomerged image has not 'understood' the image and has bad destortion on the doors of some huts. The blend lines are also visible

  • What is the best way to create a SSRS 2005 Line Chart Report for a 12 month period?

    I'm looking for advice on how to create a SQL Server 2005 query and line chart report for SSRS 2005.
    I need to display the peak number of patients assigned to a medical practice each month for a 12 month period based on the end-user selecting a
    single month and year.
    I've previously created a report that displays all patients assigned to the practice for any single month but I’m looking for advice on how to
    how to produce a resultset that shows the peak number of patients each month for a 12 month period. I thought about creating a query that returns the peak count for each month (based on my previously created report which displays all patients assigned to the
    practice for any single month) and then use a UNION statement to join all 12 months but I'm sure that isn't the most efficient way to do this. The other challenge with this approach (twelve resultsets combined via a UNION) is that the end-user needs to be
    able to select any month and year for the parameter and the report needs to display the 12 month period based on the month selected (the month selected would be the last month of the 12 month period).
    For the report I’ve previously created that displays all patients assigned to the practice for any single month, the WHERE statement filters the
    resultset on two fields:
    Start Date - The date the patient was assigned to the practice. This field is never null or blank.
    End Date - The date the patient left the practice. This field can be null or blank as active patients assigned to the practice do not have an End Date. When the patient
    leaves the practice, the date the patient left is populated in this field.
    Using these two fields I can return all patients assigned to the practice during Nov 2012 by looking for patients that meet the following criteria:
    start date prior to 11/30/2012 (using the last day of the month selected ensures patients added mid-month would be included)
    AND
    end date is null or blank (indicates the patient is active) OR the end date is between 11/1/2012 -11/30/2012 (returns patients that leave during the month
    selected)
    Regarding the query I need to create for the report that displays the peak count each month for 12 months, I'm looking for advice on
    how to count patients for each month the patient is assigned to the practice if the patient has been assigned for several months (which applies to most patients). Examples are:
    John Doe has a start date of 6/01/2012 and an End Date of 10/07/2012
    Sally Doe has a start date of 8/4/2012 and no End Date (the patient is still active)
    Jimmy Doe has a  start of 7/3/2012 and an End Date of 9/2/2012
    Given these examples how would I include John Doe in the peak monthly count each month for May - October, Sally Doe in the peak monthly count for
    August - December and Jimmy Doe in the peak monthly count for July – Sept if the end-user running the report selected December 2012 as the parameter?
    Given the example above and the fact I'm creating a line chart I think the best way to create this report would be a resultset that looks like
    this:
    Patient Name              
    Months Assigned
    John Doe
    June 2012
    John Doe                     
    July012
    John Doe                     
    Aug 2012
    John Doe                     
    Sept 2012
    John Doe
    Oct 2012
    Sally Doe                     
    Aug 2012
    Sally Doe                     
    Sept 2012
    Sally Doe
    Oct 2012
    Sally Doe                     
    Nov 2012
    Sally Doe
    Dec 2012
    Jimmy Doe                  
    July 2012
    Jimmy Doe
    Aug 2012
    Jimmy Doe
    Sept 2012
    From the resultset above I could create another resultset that would count\group on month and year to return the peak count for each month:
    June 2012 - 1
    July 2012 – 2
    Aug 2012 - 3
    Sept 2012 - 3
    Oct 2012 - 2
    Nov 2012 - 1
    Dec 2012 - 1
    The resultset that displays the peak count for each month would be used to create the line chart (month would be the X axis and the count would
    be the y axis).
    Does this sound like the best approach?
    If so, any advice on how to create the resultset that lists each patient and each month they were assigned to the practice would be greatly appreciated.
    I do not have permissions to create SPs or Functions within the database but I can create temp tables.
    I know how to create the peak monthly count query (derived from the query that lists each patient and month assigned) as well as the line chart.
    Any advice or help is greatly appreciated.

    Thanks for the replies. I reviewed them shortly after they were submitted but I'm also working on other projects at the same time (hence the delayed reply).
    Building a time table and doing a cross join to my original resultset gave me the desired resultset of the months assigned between dates. What I can't figure out now is how to filter months I don't want. 
    Doing a cross  join between my original resultset that had two dates:
    08/27/2010
    10/24/2011
    and a calendar table that has 24 rows (each month for a two year period)
    my new resultset looks like this:
    I need to filter the rows in yellow as the months assigned for stage 3 that started on 8/27/2010 should stop when the patient was assigned to stage 4 on 10/24/2011.
    You'll notice that Jan - Sept 2011 isn't listed for Stage 4 assigned on 10/24/2011 as I included a filter in the WHERE clause that states
    the Months Assigned value must be greater than or equal to the date assigned value.
    Any advice would be appreciated.

  • WHAT IS THE BEST WAY TO CREATE AN XSD FILE (TO BE USED BY SOAP ADAPTER)

    Dear friends
    I have a simple scenario.
    OUTBOUND DATA  -->  SOAP ADAPTER  --> ( XI )  -->  RFC ADAPTER  --> INBOUND DATA
    The XML file that I got from mapping area of IR (Design) is as follows
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_NAME_SOURCE xmlns:ns0="http://test3.com">
       <FIRSTNAME>DAVE</FIRSTNAME>
       <LASTNAME>SMITH</LASTNAME>
    </ns0:MT_NAME_SOURCE>
    If you notice, there are only 2 fields.
    I need to create an XSD file and import it as an external object, which I can use for SOAP Adapter.
    Which is the best way to create it.
    Also, I need to know if there is any step by step of sending a message from XML SPY. I have downloaded this software, but am not able to undertand how to use this.
    Hope to hear from any experts on this forum.
    Thanks in advance
    Ram

    Hi Ram,
    See the below blog..
    It shows how to send SOAP message using XML Spy.
    It also shows how to generate wsdl.
    /people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi
    Regards,
    Sumit

  • What is the best way to create business documents in CRM

    Hi All,
    What is the best way to create business documents like contract, sales order, debit memo etc in CRM ? Unlike R3 we can't use our good old BDC with recording. Moreover for most of them although there are Business Object but no BAPI to creation so what is the way ? I found in SDN there are two MAGIC Function module CRMXIF_ORDER_SAVE. Do I need to that alawys ?
    Is it nees to via IDoc and cannot be done just by calling from ABAP program ? The input parameter of the FM is a complex deep structure.
    Please help.

    Ashim,
    Try looking at the program:
    CRM_TEST_ORDER_MAINTAIN
    I think that should help you figure out the parameters.
    Good luck,
    Stephen

  • The best way to import photos from Picasa to iPhoto

    Hi,
    Many of my friends share their pictures online using picasa. Sometimes, I'd like to copy these pictures to keep a backup offline. As a software, I use iPhoto; not picasa. What is the best way to import pictures from picasa to iPhoto?
    I first tried to subscribe to the RSS feed using iPhoto and then copy the pictures from there to my library, but then the dates of the pictures are set wrong: instead of indicating when the picture was shot, it indicates some other date (I guess it indicates the date when the picture was uploaded to picasa).
    Then I decided to install the software picasa.app. From the webalbum of my friends, I could download the pictures directly to picasa.app. Then I exported them to the desktop, and from there imported them to iPhoto. The dates where set correctly, but I lost all the titles and comments of the pictures.
    Do you have any method to download the pictures while keeping both the dates and the titles correctly?
    Thanx!

    There is a direct option in Organizer which lets you import from iPhoto. This is under Import dropdown menu in left panel.
    If you are importing from iPhoto'09, your Tags, Albums Events, captions, star rating would also get imported apart from your media. This works differently for iPhoto'011 where you can get only the media to the Organizer,
    Just a couple of things to know:
    1. If in iPhoto preferences, you have chosen to create copies of your photos in iPhoto library and your library hence refers to the media store inside the library package, then on importing from iPhoto, Organizer would create copies of all those media under your pictures folder. That means, it would not corrupt your iPhoto package or modify it in any way.
    2. However, if in iPhoto, you are organizing by using references to original location on your Hard drive i.e. you are not creating copies of media in iPhoto library then on importing from iPhoto to Organizer, the Organizer would also use the same references and would not create copies of the media.
    Hope that helps!
    ~V

  • What is the best way to create CRUD datagrids

    What is the best way to create CRUD datagrids that tell CF
    components to update sql tables. I find that I'm having to vreate
    all these columns with custom properites and its a bit of a chore:
    <mx:DataGridColumn id = "NatWest" dataField="NatWest"
    headerText="NatWest" editable="false"
    wordWrap="true"
    textAlign="right"
    headerStyleName="centered"
    labelFunction="price_labelFuncNatWest"
    sortCompareFunction="price_sortCompareFunc">
    I don't really want to use any wizards as I want control over
    my code.

    Hi Saythj,
    When mentioning "a database schema from XML", do you mean the
    XML Schema Collections? If that is what you mean, when trying to import XML files of the same schema type, you may take the below approach.
    Create an XML Schema Collection basing on your complex XML, you can find
    many generating tools online to do that.
    Create a Table with the above created schema typed XML column as below.
    CREATE TABLE youTable( Col1 int, Col2 xml (yourXMLSchemaCollection))
    Load your XML files and try to insert the xml content into the table above from C# or some other approaches. The XMLs that can't pass the validation fail inserting into that table.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

Maybe you are looking for

  • I just updated my itunes and now it won't open.

    I've been having multiple problems with my computer, every time it asks me to update I do. But when i updated my itunes about a week ago while it was re importing all my files it closes and says : The application iTunes quit unexpectedly. The problem

  • Requisition Change History - not showing all records from CDHDR/CDPOS

    Hello, When viewing the Item Changes for a requisition in ME53N, I don't always see all the records that are contained in tables CDHDR / CDPOS. The missing records are related to release strategies. Does anyone have any ideas why this happens? Thank

  • How to stop email notifications from this site??

    I signed up here a while ago because I needed some help with software on my macbook. As it happens, ever since, I´ve been receiving approximatly one hundred email a day from this forum, general replies to peoples questions here. I have NOT signed up

  • Quick Insert Order Question

    Hey. Something just occurred to me . . . I'm not sure if the order of the inserts is top first or top last! In other words, what is the order of the signal chain? The uppermost insert is the FIRST and you add insert links to that chain stringing unde

  • Event to trigger Process Chain

    Hello Experts, I need your suggestions to write an event to trigger a process chains after user put text file to server, but the PC is not run. here the step what I have done. a. define an event SM62 "ZEV_PC_START" b. create abap code to check the fi