Better method than using a large number of shift registers?

I'm trying to work with example code provided free by stanford research systems (http://www.srsys.com/downloads/soft.htm).
Their example software alows the user to run an analog scan across 100 masses (the x axis) which progressively produces a graph of all the data. It repeats scanning (and updating the graph)until the user hits stop.
My goal is to find a way to make the program display the graph of the last scan while it is displaying the current scan (this way it is possible to compare the graphs and see how they change). But as best I can tell the data is generated and plotted in a while loop piece by piece so the best thing my labview inept mind has managed so far is using a large nu
mber of shift registers and graphing the points as they generated along with points that were generated 10 cycles ago in a different color.
So I hope to either find a good way to use shift registers to get values from over 100 cycles ago (which doesn't really seem to work unless i just make space for over 100 little arrows in my loop) or to find a better approach to the whole mess.
The example does not seem to use XY plot and to tell the truth I don't know exactly what its using to plot.
Can anyone offer any guidance or at least understand my question enough to point me in the right direction.
I'm including the stock example and my adaptation to it but if you need to use the included sub vi's the package is on that SRS webpage I listed above (look under RGA).
I suppose this may all be too much to ask but I can dream can't I?
Attachments:
original.vi ‏87 KB
changed.vi ‏92 KB

I certainly agree that the DAQ programming is the part leaving me most confused. I'll attach the package that I am trying to modify, the trouble is there are so many sub vis involved in actually acquiring the data that I am not entirely sure what format the data comes out in.
Perhaps to someone more skilled than I am with lab view the inner workings of this package would be clearer. If you are up for it then look at SRSRGAa simple analog.vi in SRSRGA61.lib and you can see what I'm working with.
I'll also attach my attempt to modify the code to make it work like altenbachs example... however somehow it would seem my timing/synchronization is off. Hope some of this makes sense, I'll see what luck I can have with get w
aveform components, I suppose I have been approaching this so far as if my DAQ was just giving me data points as opposed to a waveform.
Attachments:
rga_lv_61.zip ‏2132 KB
graph_app.1.vi ‏101 KB

Similar Messages

  • I want to transfer my iPhoto from my old MacBook Pro to my new MacBook Pro. I have a firewire or I could also do it from my TimeCapsule. Would one be a better method than the other?

    I want to transfer my iPhoto from my old MacBook Pro to my new MacBook Pro. I have a firewire or I could also do it from my TimeCapsule. Would one be a better method than the other?

    Hi brotherbrown,
    A direct FireWire transfer (especially if it's 800 to 800) is going to be the fastest method. TimeCapsule would work, if you connect to it via Ethernet, via wireless it would be quite slow (especially if you have a large library).

  • Calculate maximum value of subarray while creating it using a case structure and shift registers

    I have two 1D arrays that contain cyclical information (kind of like a sine wave).  One that contains information on position in degrees and another that contains torque.  I would like to calculate the maximum torque value each time the position is within a certain range (e.g. from 30-80 degrees).  The ranges are repeated - that's why it is cyclical.   I use the "in range" function, a case structure and shift registers to build a new array with values that fall within the range I specify - this was the easy part (see VI attached).  I'm struggling with a way to calculate a maximum value for each subarray formed when values are "in range".   Your help is much appreciated.
    Solved!
    Go to Solution.
    Attachments:
    Simple Calculate between anatomical position range.vi ‏16 KB

    It's not really noise - it's more inconsistency.  So a position output can run: 20, 30, 40, 50, 60 etc.  OR, it could run: 21, 24, 32, 41, 44, 51, 59 etc. But, it is always cyclical. 
    Attached you will find a .csv file with the data arrays - I'm using POS (ANAT) degrees column (column D if you open in excel).  There you also see torque in ft-lbs along with some other information.
    Attachments:
    025C.csv ‏224 KB

  • Better method than switch?

    I have the following code.
    public Animalinfo(int animalInfo){
            switch (animalInfo) {
                case 1:File inputFile1 = new File("monkey.txt"); FileInputAnimal monkey = new FileInputAnimal(inputFile1);break ;
                case 2:File inputFile2 = new File("rooster.txt"); FileInputAnimal rooster = new FileInputAnimal(inputFile2);break ;
                case 3:File inputFile3 = new File("dog.txt"); FileInputAnimal dog = new FileInputAnimal(inputFile3);break ;
                case 4:File inputFile4 = new File("boar.txt"); FileInputAnimal boar = new FileInputAnimal(inputFile4);break ;
                case 5:File inputFile5 = new File("rat.txt"); FileInputAnimal rat = new FileInputAnimal(inputFile5);break ;
                case 6:File inputFile6 = new File("ox.txt"); FileInputAnimal ox = new FileInputAnimal(inputFile6);break ;
                case 7:File inputFile7 = new File("tiger.txt"); FileInputAnimal tiger = new FileInputAnimal(inputFile7);break ;
                case 8:File inputFile8 = new File("rabbit.txt"); FileInputAnimal rabbit = new FileInputAnimal(inputFile8);break ;
                case 9:File inputFile9 = new File("dragon.txt"); FileInputAnimal dragon = new FileInputAnimal(inputFile9);break ;
                case 10:File inputFile10 = new File("snake.txt"); FileInputAnimal snake = new FileInputAnimal(inputFile10);break ;
                case 11:File inputFile11 = new File("horse.txt"); FileInputAnimal horse = new FileInputAnimal(inputFile11);break ;
                case 12:File inputFile12 = new File("sheep.txt"); FileInputAnimal sheep = new FileInputAnimal(inputFile12);break ;
    //where fileinputanimal prints the text file in the window
            }It works and i can't see much else to addto it. But i was just wondering if anyone had other possible improvements on it, like a way of not adding a number to the end of each File inputFilex. Also, is there an alternate method to switce. I can't think of any myself, but that means i'll have to start working on a switch like above but containing around 500 cases in it this time.
    Any suggestions appreciated.

    Sazazezer_Mililipili wrote:
    Jeez, so much help in fifteen minutes alone. I feel bad for taking a day to respond.
    The animalInfo int comes from the user input. The user types in their date of birth. It then converts to a float so i can do 'year % 12', Okay, that makes sense. But an int would be better.
    Now...to learn about maps.Nah, since it's always going to be 0-11, and it's the numerical value that has significance, not some arbitrary "key", it's simpler to just stick with the switch statement. Do pay attention to the simplifications I gave you though, and rather than having the constructor do anything besides initialize the state of an object, after construction, call a print or display or whatever method.
    EDIT: Or, possibly better, go with the other poster's suggestion of an array of Strings, whose values are the file names.
    Edited by: jverd on Sep 25, 2008 2:15 PM

  • CLR Procedure and returning large number of rows

    I have a CLR stored procedure coded in C# that retrieves data from a web service, and returns that data using SendResultsStart/SendResultsRow/SendResultsEnd. This all works fine, except when the data from the web service is tens or even thousands of records.
    The code itself takes about 3 minutes on average to do all it's work with around 50000-60000 records, but the procedure does not return in SSMS for about another 10-15 minutes, during which time the CPU and memory usage go up significantly.
    To rule out any of the CLR code as the culprit, I created a very simple CLR procedure that just loops to return 100000 records with int and nvarchar(256) fields with the current count, and "ABC" followed by the count.  Here is the code:
    [Microsoft.SqlServer.Server.SqlProcedure]
    public static void ABC()
    System.Diagnostics.Stopwatch ExecuteTimer = System.Diagnostics.Stopwatch.StartNew();
    SqlMetaData[] ResultMetaData = new SqlMetaData[2];
    ResultMetaData[0] = new SqlMetaData("count", SqlDbType.Int);
    ResultMetaData[1] = new SqlMetaData("text", SqlDbType.NVarChar, 256);
    SqlContext.Pipe.SendResultsStart(new SqlDataRecord(ResultMetaData));
    for (int x = 0; x < 100000; x++)
    SqlDataRecord ResultItem = new SqlDataRecord(ResultMetaData);
    ResultItem.SetValue(0, x);
    ResultItem.SetValue(1, "ABC" + x.ToString());
    SqlContext.Pipe.SendResultsRow(ResultItem);
    SqlContext.Pipe.SendResultsEnd();
    TimeSpan ExecTime = ExecuteTimer.Elapsed;
    SqlContext.Pipe.Send("Elapsed Time: " + ExecTime.Minutes.ToString() + ":" + ExecTime.Seconds.ToString() + "." + ExecTime.Milliseconds.ToString());
    I then executed procedure ABC in SSMS, and it took 21 minutes to return.  All of the data rows were visible after just a couple of seconds, but the query continued to run as the CPU and memory went up again.
    Is this really how long it should take to return 100000 rows, or am I missing something?  Is there a better approach than using SendResultsStart/SendResultsRow/SendResultsEnd?
    I've googled this to death and haven't found anything that helped or even explained why this is.
    I would greatly appreciate any suggestions or alternate methods to achieve this faster.
    Thanks!
    Alex

    When you create a new object, space on the garbage-collected heap is allocated for that object, and the address will be stored in a reference. Some time later, there will no longer be any references that hold the address of the allocated object. It doesn't
    matter whether the reference count went to 0 because the reference was set to null or because the reference was on the stack and is no longer in lexical scope, the end result is the same: the garbage collector will, at some point in time, have to perform the
    book-keeping operations necessary to identify that the space allocated for that now-unreferenced object can be re-used. When, on the other hand, you only create a single SqlDataRecord object and hold onto the reference, all of the book-keeping operations
    associated with creating 100,000 objects are eliminated. This is why the documentation for the SqlDataReader class advises that:
    When writing common language runtime (CLR) applications, you should re-use existing
    SqlDataRecord objects instead of creating new ones every time. Creating many new
    SqlDataRecord objects could severely deplete memory and adversely affect performance.

  • Best Method To Use a RunTime Menu

    Hi
    I´m using a menu in my LabView Apllication, and I saw today that it takes considerable ressources. I enclose a vi in order to explain better what I mean. with my menu activated, my program loop runs about 5 times per sec, and about 170 without. Do you have better methods to use a RunTime Menu ?
    Thanks in advance for your help
    Nicolas Minary

    Sorry, I forgot the vi...
    Attachments:
    menu.zip ‏11 KB

  • How can I trash a large number of Emails quickly from my iPod touch rather than using the one-at-a-time Edit method?

    How can I trash a large number of Emails quickly from my iPod touch rather than using the one-at-a-time Edit method?

    Once you tap on edit, you can select multiple emails, the tap archive.

  • Submit submit a large number of task to a thread pool (more than 10,000)

    i want to submit a large number of task to a thread pool (more than 10,000).
    Since a thread pool take runnable as input i have to create as many objects of Runnable as the number of task, but since the number of task is very large it causes the memory overflow and my application crashes.
    Can you suggest me some way to overcome this problem?

    Ravi_Gupta wrote:
    I have to serve them infinitely depending upon the choice of the user.
    Take a look at my code (code of MyCustomRunnable is already posted)
    public void start(Vector<String> addresses)
    searching = true;What is this for? Is it a kind of comment?
    >
    Vector<MyCustomRunnable> runnables = new Vector<MyCustomRunnable>(1,1);
    for (String address : addresses)
    try
    runnables.addElement(new MyCustomRunnable(address));
    catch (IOException ex)
    ex.printStackTrace();
    }Why does MyCustomRunnable throw an IOException? Why is using up resources when it hasn't started. Why build this vector at all?
    >
    //ThreadPoolExecutor pool = new ThreadPoolExecutor(100,100,50000L,TimeUnit.MILLISECONDS,new LinkedBlockingQueue());
    ExecutorService pool = Executors.newFixedThreadPool(100);You have 100 CPUs wow! I can only assume your operations are blocking on a Socket connection most of the time.
    >
    boolean interrupted = false;
    Vector<Future<String>> futures = new Vector<Future<String>>(1,1);You don't save much by reusing your vector here.
    for(int i=1; !interrupted; i++)You are looping here until the thread is interrupted, why are you doing this? Are you trying to generate loading on a remote server?
    System.out.println("Cycle: " + i);
    for(MyCustomRunnable runnable : runnables)Change the name of you Runnable as it clearly does much more than that. Typically a Runnable is executed once and does not create resources in its constructor nor have a cleanup method.
    futures.addElement((Future<String>) pool.submit(runnable));Again, it unclear why you would use a vector rather than a list here.
    >
    for(Future<String> future : futures)
    try
    future.get();
    catch (InterruptedException ex)
    interrupted = true;If you want this to break the loop put the try/catch outside the loop.
    ex.printStackTrace();
    catch (ExecutionException ex)
    ex.printStackTrace();If you are generating a load test you may want to record this kind of failure. e.g. count them.
    futures.clear();
    try
    Thread.sleep(60000);Why do you sleep even if you have been interrupted? For better timing, you should sleep, before check if you futures have finished.
    catch(InterruptedException e)
    searching = false;again does nothing.
    System.out.println("Thread pool terminated..................");
    //return;remove this comment. its dangerous.
    break;why do you have two way of breaking the loop. why not interrupted = true here.
    searching = false;
    System.out.println("Shut downing pool");
    pool.shutdownNow();
    try
    for(MyCustomRunnable runnable : runnables)
    runnable.close(); //release resources associated with it.
    catch(IOException e)put the try/catch inside the loop. You may want to ignore the exception but if one fails, the rest of the resources won't get cleaned up.
    The above code serve the task infinitely untill it is terminated by user.
    i had created a large number of runnables and future objects and they remain in memory until
    user terminates the operation might be the cause of the memory overflow.It could be the size of the resources each runnable holds. Have you tried increasing your maximum memory? e.g. -Xmx512m

  • How can we say if Join better than using Sub Queries ??

    Hi all,
    I am trying to understand the rationale behind "Is _Inner Join_ better than using _Sub Query_ ?" for this scenario ...
    I have these tables --
    Table1 { *t1_Col_1* (PrimaryKey), t1_Col_2, t1_Col_3, t1_Col_4 }
    -- Number of rows = ~4Million , t1_Col_3 has say 60% entries non-zero -----> (Condition 4)
    Table2 { *t2_Col_1* (PK), t2_Col_2, t2_Col_3 }
    -- Number of rows = ~150Million, t2_Col_2 maps to t1_Col_1 -----> (Condition 1). This means for every distinct value of t1_Col_1 (its PK) we'll have multiple rows in Table2.
    Table3 { *t3_Col_1* (PK), t3_Col_2, t3_Col_3 }
    -- Number of rows = ~50K, t3_Col_1 maps to t1_Col_2 -----> (Condition 2)
    Table4 { *t4_Col_1* (PK), t4_Col_2, t4_Col_3 }
    -- Number of rows = ~1K, t4_Col_2 maps to t3_Col_2 -----> (Condition 3)
    Now here are the 2 queries: -
    Query using direct join --
    SELECT t1_Col_1, t2_Col_1, t3_Col_1, t4_Col_2
    FROM Table1, Table2, Table3, Table4
    WHERE t1_Col_1=t2_Col_2 -- Condition 1
    AND t1_Col_2=t3_Col_1 -- Condition 2
    AND t3_Col_2=t4_Col_1 -- Condition 3
    AND t1_Col_3 != 0
    Query using SubQuery --
    SELECT t1_Col_1, t2_Col_1, t3_Col_1, t4_Col_2
    FROM Table2,
    (SELECT t1_Col_1, t3_Col_1, t4_Col_2
    FROM Table1,Table3, Table4
    WHERE
    AND t1_Col_2=t3_Col_1 -- Condition 2
    AND t3_Col_2=t4_Col_1 -- Condition 3
    AND t1_Col_3!= 0
    WHERE t1_Col_1=t2_Col_2 -- Condition 1
    Now the golden question is - How can I document with evidence that Type-1 is better than Type-2 or the other way ? I think the 3 things in comparison are: -
    - Number of rows accessed (Type-1 better ?)
    - Memory/Bytes used (Again Type-1 better ?)
    - Cost ( ?? )
    (PS - testing on both MySQL, Oracle10g)
    Thanks,
    A

    So, is it right to conclude that Optimizer uses the optimal path and then processes the query resulting in nearly the same query execution time ?If the optimizer transforms two queries so that they end up the same, then they will run in the same time. Of course, sometimes it cannot do so because of the the way the data is defined (nulls are often a factor; constraints can help it) or the way the query is written, and sometimes it misses a possible optimization due to inaccurate statistics or other information not available to it, or limitations of the optimizer itself.
    Is this the right place to ask for MySQL optimization ?Probably not.

  • I have an iPad 2 with iOS 5.1 and iBooks version 2.1.1. I have 64GB of storage, 80% is used. iBooks is using 250MB of storage. I have a large number of PDF files in my iBooks library. At this time I can not add another book or PDF file to my library.

    I have an iPad 2 with iOS 5.1 and iBooks version 2.1.1. I have 64GB of storage, 80% is used. iBooks is using 250MB of storage. I have a large number of PDF files in my iBooks library. At this time I can not add another book or PDF file to my library.  When I try to move a PDF file to iBooks the system works for a while...sometimes the file appears and than disappears....sometimes the file never appears. Is ther some limit to the number of books or total storage used in IBooks?  Thanks....

    Hi jybravo70, 
    Welcome to the Apple Support Communities!
    It sounds like you may be experiencing issues on your non iOS 8 devices because iOS 8 is required to set up or join a Family Sharing group.
    The following information is located in the print at the bottom of the article. 
    Apple - iCloud - Family Sharing
    Family Sharing requires a personal Apple ID signed in to iCloud and iTunes. Music, movies, TV shows, and books can be downloaded on up to 10 devices per account, five of which can be computers. iOS 8 and OS X Yosemite are required to set up or join a Family Sharing group and are recommended for full functionality. Not all content is eligible for Family Sharing.
    Have a great day, 
    Joe

  • Trouble copying a large number of objects using Acrobat X

    Acrobat X is many times slower than Acrobat 9 when copying a large number of objects in a PDF.  What used to take one second in Acrobat 9, now takes upwards of 45 seconds or longer in Acrobat X and often causes the application to crash.  I am using 10.2.1 on OS X 10.6.8.  Has anyone else experienced this performace difference or have any solutions?  Any thoughts on the subject would be much appreciated.  Thanks.

    Since you do not want to crop your images to a square 1:1 aspect ratio changing the canvas to be square will not make your images square they will retain their Aspect Ratio and  image size will be changer to fit within your 1020 px square. There will be a border or borders on a side or two borders on opposite sides.   You do not need a script because Photoshop ships with a Plug-in script to be used in Actions.   What is good about Plugins is the support Actions.  When you record the action the plug-in during action recording records the setting you use in its dialog into  the actions step.  When the Action is played the Plug-in use the recorded setting an bypasses displaying its dialog. So the Action can be Batch.  The Action you would record would have two  Steps.   Step 1  menu File>Automate>Fit Image... in the Fit Image dialog enter 1020 in the width and height  fields.  Step 2 Canvas size enter 1020 pixels in width and height  not relative leave the anchor point centered it you want even borders on two sides set color to white in the canvas size dialog. You can batch the action.
    The above script will also work. Its squares the document then re-sizes to 1020x1020  the action re-sizes the image to fit with in an area 1020 x 1020 then add any missing canvas. The script like the action only process one image so it would also need to be batched. Record the script into and action and batch the action. As the author wrote. The script re size canvas did not specify an anchor point so the default center anchor point is uses  like the action canvas will be added to two sides.

  • To enter/clear Large number of documents (more than 1000) in f-30/f-32

    Hi,
    We are using F-30/F-32 for clearing customer. But in this transaction we can enter only 16 documents at a time. Then after pressing enter again further 16 documents can be entered. Suppose we want to clear say 4000 documents then we have to keep on doing this large number of times.
    Is it possible to enter all the documents (say more than 1000) at one go in this transaction?
    Shripad

    Hi Shripad,
    In F-32 in additional selections by selecting the document number you can give at a time 13 document numbers.  You can as well think of giving From document number to To document number. 
    Aravind Boddupalli

  • Problem in compilation with very large number of method parameters

    I have java file which I created using WSDL2Java. Since the actual WSDL has a complex type with a large number of elements(around 600) in it, Consequently the resulting java file(from WSDL2Java) has a method that takes 600 parameters of various types. When I try to compile it using javac at command prompt, it says "Too many parameters" and doesn't compile. The same is compiling successfully using JBuilder X . The only way I could compile successfully at command prompt is by reducing the number of parameters to around 250 but unfortunately that it's not a workable solution. Does Sun specify any upper bound on number of parameters that can be passed to a method?

    ... a method that takes 600 parameters ...Not compatible with the spec, see Method Descriptors.
    When I try to compile it using javac at
    command prompt, it says "Too many parameters" and
    doesn't compile.As it should.
    The same is compiling successfully using JBuilder X .If JBuilder produces a class file, that class file may very well be invalid.
    The only way I could compile
    successfully at command prompt is by reducing the
    number of parameters to around 250Which is what the spec says.
    but unfortunately that it's not a workable solution.Pass an array of objects - an array is just one object.
    Does Sun specify
    any upper bound on number of parameters that can be
    passed to a method?Yes.

  • I want to change the sharing and permissions of a large number of photos. How can I do this in bulk rather than one at a time?

    I want to change the sharing and permissions of a large number of photos. How can I do this in bulk rather than one at a time?

    Does this involve iPhoto in some way?

  • Can I install the online version rather than using my dvd? it successfully installed (up to a point) that way, it just wont accept my serial number for some reason. my dvd isnt working properly.

    Can I install the online version rather than using my dvd? it successfully installed (up to a point) that way, it just wont accept my serial number for some reason. my dvd isnt working properly.

    If it gets far enough to reject your serial number, it won't help to download it. It must have installed ok.
    What is the message you get (DON'T tell us the serial number!!)?
    Does it mention a "qualifying product" by any chance?

Maybe you are looking for

  • Report for Storage location wise Stock with value..?

    Hi guru's Can anybody explain me what is T.code i want to use to get a report for STORAGE LOCATION STOCK  with VALUE..? Urgent reply me  .. Thanks sap-mm

  • IE 10 and 11 error install failure ERROR: "Neutral package installation failed"

    This is a 2008 R2 physical server with all available patches installed and SFC recently run. 00:00.000: ==================================================================== 00:00.000: Started: 2014/01/16 (Y/M/D) 11:52:19.750 (local) 00:00.000: Time F

  • Workflow Hanging in between the Tasks

    Hi all, We are having problem with the workflow which are hanging in between the tasks. Yes, it is in between the tasks. the workflow structure have a fork with 4 braches, 3 out of 4 need to complete before the rest of workflow can contiune. one bran

  • I want all my emails to come to my in box, how do I set this up?

    I don't want emails to go to a junk folder. I can't delete the junk folder but can i somehow get mail into my inbox? I have missed important email because it was sitting unread in a folder that I never open. What an idiotic default!!

  • Download file servlet

    Hi, I have a servlet that downloads files. I was able to set the default download filename with the following code: response.setHeader("Content-Disposition", "attachment; filename="+downloadName); Is it posible to specify the default directory to sav