Execution speed onboard programs

Hi all
I am tying store the value of analog input channels of PCI-7352 on buffer, from onboard program.
The program run fine, but I don´t know how measure the total acquisition time in the program.
In an example in LabView ( adc-gpbuffer.vi ), use 'flex_load_delay' function to establish an interval in
the acquisition. But the real interval between readings not is calculated.
Another question, How I can know the execution speed of onboard program ?.  The documentation does not
show information.
         Thank´s
         Javier
Attachments:
adc-gpbuffer.vi ‏165 KB

Javier,
there is no easy way to measure the execution timing of onboard programs. One thing that you could do is to toggle a digital line in your onboard program and measure the timing with an oscilloscope.
Please be aware that the timing of onboard programs doesn't work deterministicallly as onboard programs don't run with time critical priority on the board's CPU so you will probably see a fair amount of jitter.
The main purpose of the analog inputs on the 7352 is analog feedback. You can use them for single point measurements, too but if you need to acquire data with an accurate timing you better should use an additional M-Series board like the PCI-6220 which provide a much better measurement and timing accuracy and as true measurement devices they provide a whole set of additional useful features.
Best regards,
Jochen Klier
National Instruments Germany

Similar Messages

  • EXECUTION SPEED OF FINISHED PROGRAM

    Thanks Guys, You comments are really encouraging.
    I agree Java is great!
    My question really is put better this way:
    The Execution speed of finished Java programs is slow and often does require much memory? Why is this and what are the solutions?
    Thanks again

    The Execution speed of finished Java programs is slow and often does require much memory? Why is
    this and what are the solutions?Well, the solution is simple then: leave those Java programs unfinished; classic composers did the
    same and they got famous for it ... Seriously though, your question is too vague; what is 'slow' and
    what is 'much memory'? Before the application was 'finished' did you do any (unit) tests? It can't be
    as if suddenly you go "my golly, it's slow and big now it's finished; lets complain". Care to elaborate?
    kind regards,
    Jos (fast, small and so soft for your hands ;-)

  • How do I associate timing with multiple AI loops that is independan​t of loop execution speed

    I am using Labview 7.1 and I am performing AI of
    voltage on different channels of the same multifunction DAQ.  I am
    using while loops to aquire the data.  I am writing the data to
    spreadsheet file with an associated time as a 2D array.  Currently I am
    using the 'elapsed time' interactive subVI to get the time in seconds
    (attempting to use the 'Get Date/Time in seconds' and converting it to
    DBL results in time values that do not change. My thoughts are that
    maybe the number of seconds is too large to display single second
    precision with a DBL floating point number). When I run AI on two
    multiple loops they execute at different rates and thus the time values
    from "elapsed time" are accumulated at different rates. I have tried
    using timed loops to control timing, but if one loop executes at a rate
    slower than the timing of the loop the 'elapsed time' still accumulates
    at different rates.  I need to be able to associate both analog inputs
    to the same time
    value in the spreadsheet value and I would like to find a way to
    associate a time with each data point that is independant of loop
    execution speed (although I would still like to control execution speed
    of the loops. I am pretty new to Labview and programming in general,
    any help would be greatly appreciated.

    If you want to read more than one AI at the same time, you should use a trigger.  You would need to set up the AI Trigger to an external source.  Then you would have to use a function generator or digital out to create a clock.  The clock would be wired to the AI external trigger.  When the clock goes high (or low depending on configuration), both AIs would read.  That is the method I use when needing to sync multiple AI inputs.
    - tbob
    Inventor of the WORM Global

  • Execution Speed of Aurora JRE

    We are experiencing some problems with the execution speed of the aurora JRE. The documentation states that the Aurora JRE is compiled to native code and should run 2 - 10 times faster than a normal JRE. We are atempting to do some memory sorts using the Array class which is taking 10 times longer in the Oracle instance than on a client.
    Is this a known performance bottleneck, are there any "tweaks" available?
    Thanks
    Julian

    Hello Ravi,
    Does your statement about core java classes being natively compiled also apply to the JVM in OAS / iAS?
    I remember reading in a white paper that, in iAS, java code would be translated into C code for native execution. Does this apply to user code or only core java classes ?
    (by the way, It seems impossible to download OAS 4.0.8.2 from OTN, maybe it would help if it was divided into several smaller files...)
    Thanks, Remi DEH
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Oracle Support Analyst (Ravi):
    In the current JServer release, Java code you load to the server is
    interpreted. The underlying core classes upon which your code relies (java.lang.*) are natively compiled. Until the native compiler is available for user programs,
    the net speed benefit of native compilation to your executing program is dependent upon how much native code is traversed, as opposed to interpreted code. The
    more Java code from core classes and Oracle-provided class libraries you use, the more benefit you will see from native compilation.
    In 8.1.7 i.e 8i Release 3 we support natively compiled code for the user programs.
    <HR></BLOCKQUOTE>
    null

  • VI execution speed depending on mouse movement

    Hi,
    I have a large application that sometimes became very very slow. When It happens the only thing that I was able to notice is that moving mouse, execution speed of vi come back normal. I checked all the opened reference but I didn't find any not closed reference.
    Any tip will be helpfull..
    Golzio

    can you give us any other information or post an example of the program. Does it use an event structure, data acquisition, are you performing file i/o? If you can give us an example it would be most helpful. Thanks
    BJD1613
    Lead Test Tools Development Engineer
    Philips Respironics
    Certified LV Architect / Instructor

  • Execution speed and Print Statements

    I use so many "System.out.println" statements in my java program.
    Will it reduce the execution speed of the application?

    Everything that does something will make the application slower.
    You should instead ask yourself if you need the print statements, and if the application is fast enough. You can also execute your application in a profiler to find bottle necks.
    Kaj

  • Program for the last execution of a program or a TC

    Hello,
    DO you know a program or a TC (Transaction) to edit the date and the hour of the last execution of a program or a TC.
    Thank you for the help
    Denis Corminboeuf

    Hi Denis,
    I attached below parts of a program I created a couple of years ago to get use statistics on (customer) reports and transactions.
    Maybe you can reuse parts of it for your needs.
    Regards
    Ferdi
    <pre>
    internal tables for use counter
    data: begin of list occurs 5.
            include structure sapwlserv.
    data: end of list.
    data: begin of applicat occurs 0.
            include structure sapwlustcx.
    data: end of applicat.
    data: begin of applica_ occurs 0.
            include structure sapwlustcx.
    data: end of applica_.
    data: begin of applicau occurs 0,
            entry_id like sapwlustcx-entry_id,
            account  like sapwlustcx-account,
            count    like sapwlustcx-count,
        : end of applicau.
    data: wa_applicau like applicau.
    *&      Form  MONI
    form moni.
      data: l_host like  sapwlserv-hostshort.
      m_start = p_usedt.
    get server
      call function 'SAPWL_SERVLIST_GET_LIST'
           tables
                list = list.
      do.
        loop at list.
    loop on server
          check not list-instshort is initial.
          l_host = list-instshort.
    get statistics per month and server
          perform workload using m_start l_host.
        endloop.
        add 31 to m_start.
        if m_start > sy-datum.
          exit.
        endif.
      enddo.
      sort applica_ by entry_id.
      sort applicau by entry_id count descending.
    endform.                               " MONI
    *&      Form  WORKLOAD
    form workload using    p_start like sy-datum
                             p_host  like  sapwlserv-hostshort.
      refresh: applica_.
    read application statistic from MONI
      call function 'SAPWL_WORKLOAD_GET_STATISTIC'
           exporting
                periodtype                 = 'M'
                hostid                     = p_host
                startdate                  = p_start
                only_application_statistic = 'X'
           tables
                application_statistic      = applica_
           exceptions
                unknown_periodtype         = 1
                no_data_found              = 2
                others                     = 3.
      sort applica_ by entry_id account.
      loop at applica_  where entry_id(1) ge 'Y'.             "#EC PORTABLE
        clear wa_applicau-entry_id.
        wa_applicau-entry_id(25) = applica_-entry_id.
        wa_applicau-account      = applica_-account.
        wa_applicau-count        = applica_-count.
        collect wa_applicau into applicau.
      endloop.
      sort applicau by entry_id count descending.
      applica_-ttype    = space.
      applica_-account  = space.
      modify applica_ transporting ttype account
             where ttype ne space.
    collect only enhancements statistic
      if p_temp = 'X'.
        loop at applica_.
          applica_-entry_id+25(48) = space.
          collect applica_ into applicat.
        endloop.
      else.
        loop at applica_ where entry_id(1) ge 'Y'.            "#EC PORTABLE
          applica_-entry_id+25(48) = space.
          collect applica_ into applicat.
        endloop.
      endif.
    endform.                               " WORKLOAD
    </pre>

  • Onboard program will not load

    The two sub.vi's attached have been running happily under Labview 6.1 and NI Motion 5.1.1 for seven years.  We recently updated to Labview 8.5 and NI Motion 7.6.  When I try to run Init_Board_Program.vi I get an error -70125 at "StopProgram" on program 1.  The purpose of Program 1 is to provide a watchdog for Program 2 to Insure its position remains within a boundary passed to it.  Program 2 takes a set of profile data points and runs a motor through them.  In the old system, program 1 ran continuously and program two ran only when data was loaded.  While both programs APPEAR to be in memory, program 1 is not running.   What change do I need to make to get these funcitoning again?
    Attachments:
    Init_Board_Programs.vi ‏89 KB
    Data_to_Program.vi ‏35 KB

    Nate,
    Many things have changed!!! 
    All of them, I might point out, are due to bugs in this Labview.  For example the update rate is now 188 microsec as opposed to 125.  The resolver is 1/4 as sensitive as it used to be.  The soft switches no longer decelerate the motor, they allow it to keep right on going.  The kill and decelerate stop commands no longer remove the old target position, so when you start up after an emergency stop the motor continues in the very same dangerious direction it was originally moving...is that enough or shall  I continue?
    But if your refering to that piece of code, No, its the same as it was.  I've taken out the "stopprogram.vi", I've put both programs in separate .vi's, and ONCE I've managed to load both on board at the same time without an error.  Once the stop program .vi is removed the error that now appears ONLY IN MAX i -70040 "The current device
    is reserved for OnBoard Programs".  On the one occasion that I got both in cleanly the motor ran to the home position, about 37.80 deg and stopped....it  should have stopped at 60 degrees where it was sent.
    If I do get errors, I can't run the program with the start.vi, but on one other occasion I've gone into MAX and told the program to run.  That time it went to home and began to osscilate wildly.
    Jim Fee

  • "no acess to service settings after delete of speed up program"

    on my older laptop I by error downloaded a speed up program that was not what it seemed so I deleted this, but it has changed my settings on all of main service settings to disabled and there is no way to start fixing as there is no way to get onto Mozilla help, also tried to start at restore point but to no avail.

    Hi again edmeister,after pondering onthe proble whilst doing some wood cutting I decided to try and force the start programs into enabled setting , I was supprised to find that after the break my mind seems to work better than plowing on into the early hours in a futile search for solution. When the system settings were changed the start up in safe mode was the way into the reset of all program and other add-on's etc. Touching a huge piece of wood all seems to be well,thanks again for your help and keep up the good work, cheers Verderer 8-)

  • Why is the difference in execution speed of the function "SetCtrlVa​l" between constant and changing values so small ?

    In my large application (1 MB exe-file) I am continuously updating a lot of numeric controls with new values. Most of them do not really change their value. Within my search of improving the performance of my application I noticed, that there is only a small difference of the execution speed between a call of "SetCtrlValue" with constant values and calls with changing values. It runs much faster (25 times on my PC), if I get the actual control value with "GetCtrlVal", compare it with my new value an do a call to "SetCtrlVal" only if the current value and the new value are different.
    My questions to CVI-developers is:
    Isn't it possib
    le to do this compare within the function "SetCtrlVal"
    My question to all CVI-users is:
    Does anyone have similar tips to improve the performance of CVI applications ?
    I developed a small test application for this problem, which I can mail to interested users.

    What takes the extra time is the redraw of the control. When you call SetCtrlVal we ALWAYS redraw the control. We wouldn't want to build in functionality to check if the value was the same because that would add additional time to the SetCtrlVal in every case. If you want to do it outside of the loop you can as you have done above. You have a few options. First, keep a previous value variable for the controls that you can use to determine whether to set the control value. I.E.
    int oldVal = 0;
    int newVal = 0;
    if(newVal!=oldVal) {
    SetCtrlVal(..., newVal);
    oldVal = newVal;
    Also, if you set the value of a control through SetCtrlAttribute instead, there is no built in redraw of the control (which is what takes all the time). Using SetCtrlAttribute
    to set the value is very fast, but remember there isn't a built in redraw on the screen to display the new number.
    Best Regards,
    Chris Matthews
    Measurement Studio Support Manager

  • Is it possible to make a move in contouring mode with onboard program

    I use Labview 7.1.
    I have a motion board 7344.
    Is it possible to make a move in contouring mode (as in the attached vi) with onboard program and how do that?
    Attachments:
    Onboard_program.vi ‏79 KB

    It's not possible to use the contouring mode in an onboard program like you did it in your example. The reason is that while the program is downloaded the write buffer.flx is NOT executed. Thus it can't download the buffer data stored in your front panel arrays. When you start the onboard program later it doesn't have access to your buffer data on the front panel.
    In fact I don't see a real advantage why you would like to run the write buffer.flx in an onboard program. You could configure and download the buffer on the host and then use it in an onboard program.
    Best regards,
    Jochen Klier
    NI-Germany

  • The system variables in java, NEEDED ONLY at CLI execution of java programs

    The system variables in java, NEEDED ONLY at CLI execution of java programs, and NOT needed at all[essentially] if I install bundle(14+6.7)?
    if I install bundle(14+6.7) to run-test a web app with netbeans 6.7 what I must press, then opens the default browser? I have to be online,...? How I test browse my project?

    Probably a complete tutorial on all possible environment variables in addition to a tutorial on netbeans configuration.

  • Execution speed improvements of FGV over locals

    This my first post.  I am new to LabVIEW and am currently writing my first significant application.  I am actually modifying an existing application, but am adding additional functionality.
    I have read this VI Execution Speed article but still have questions http://zone.ni.com/reference/en-XX/help/371361H-01/lvconcepts/vi_execution_speed/
    As an example, I am populating an xy plot with several sets of data, such as saved data points and a curve fit.  I am currently using a case structure to decide when to write various elements.  As an example, I only write the curve fit one time and it remains static as other pieces of data are added to the graph. In an attempt to make things faster I did not want to redo and redraw the fit each time.  I am using locals within the case to populate the graph.  In the default case nothing if written to these locals (and I assume the graph is not redrawn)?
    I now realize that instead using a case in which nothing is written, I could use a feedback node (to write the previous case). The in addition, in place of using a local, I could use a Functional Global Variable.
    Would it be better to have several cases which write locals to populate the plot and one case which writes nothing  OR Have the several cases write to a FGV and then a default case which writes the last data to the FGV via a feedback node?
    The first seems like less load as nothing is written in the default case, but the other cases do write to a local which has a front panel object that I don't need or want.
    Iis there any benefit to hiding unused front panel objects?
    Is there a way to create a local without front panel object?
    Finally, with a tabbed UI, are objects on the non active tabs being redrawn and slowing the process?

    Good questions!
    Starting from the bottom:
    Iis there any benefit to hiding unused front panel objects?
    Is there a way to create a local without front panel object?
    No and No. Local variables are generally a poor way to store and move data. For the reasons you cited (FP object you do not want or need, hidden FP objects) and that they force a copy of the data and may cause a thread switch to the UI thread.
    Finally, with a tabbed UI, are objects on the non active tabs being redrawn and slowing the process?
    It depends. Newer versions of LV are generally smart enough that non-visible indicators are not redrawn. This may not have been true in older versions, although I do not know when the changes were made.
    You certainly do not need to redo the fit if the data has not changed. I think the entire graph gets redrawn when any new data is written.
    Search for Ben's extremely informative Nugget on Action Engines (AE). An Action Engine is a FGV with added capabilities. It may be a very good option for what you are trying to do. It could store all the data sets, update the graphs, and make the data available where it may be needed without extra copies. With the AE you could easily acquire and store data at one rate and update the graphs at a (slower) rate appropriate to the users eyes and brains. Updating graphs more than ~10 times per second is a waste of resources because the user cannot respond any faster than that. Also you could write a subset or reduced data set to the graph if the amount of data is larger than the number of pixels in the plot.
    Lynn

  • Return vector for points done of check buffer status in onboard program

    Background
    I am trying to develop a trigger application based on the current position of a contour profile.
    I can not use breakpoints as the application is using hydraulic cylinders with analog feedback
    for the primary position. In order to make sure the trigger happens relative to the motion regardless
    of host load I want to run the application as an onboard program.
    My idea is to read the buffer status points done and generate a pulse out as a trigger when the
    points done is greater than the programmed trigger point. For example if I want to trigger on the 42
    point of a 100 point profile, I would read points done of the main contour buffer. When points done
    is greater than or equal to 42, I would generate a short pulse as a trigger.
    Question
    My problem is, I cannot find the order that the check buffer status VI returns the data to an onboard program
    return vector. As I understand it, I need 3 variables to hold the returned data. One each for State, Backlog, and
    Points Done. If I set the return vector to 10, does State get stored in 10, Backlog in 11, and Points done in 12, or
    is there a different order?
    If you could provide the return vector mapping order for all the motion VIs, it would be greatly appreciated.

    Hello,
    This is a very good question. I checked in the help for the LabVIEW VI, and it does not explicitly state the answer. The VI calls the FlexMotion function "flx_check_buffer_rtn". In the "NI-Motion Function Help" (Start>>Programs>>National Instruments>>NI Motion>>Documentation), the information for the functions states that it "...returns data in the following order: backlog, bufferState, and pointsDone." It also tells you the size of each of the elements. I will be filing a report so that the LabVIEW documentation includes this information in the future. I hope this helps. Take care!
    Regards,
    Aaron B.
    National Instruments

  • Can I be directed to a SIMPLE example of one value being passed FROM Labview TO an Onboard program to be used as a "Var Vector" in a sub.vi in the onboard program?

    I can find all kinds of examples of data FROM OnBoard Programs to the host but not the other way round. Specifically how do I get the variable into a memory location that the Board will read?

    Thank you for contacting National Instruments. There are a few LabVIEW examples that ship with NI-Motion that use the Load Constant to Variable VI to store data from your application to the onboard memory of the motion controller device. If you open NI Example Finder (click on Find Examples.. under the Help menu) and choose to browse by Directory Structure, then you can navigate to the Motion >> FlexMotion >> Onboard folder. The "Sequence of One-Axis Moves" and "Repeated Move in a FOR Loop" examples both store information in variables on the motion controller, whose data is later used in the onboard program. From your post, this is what it sounds like you are interested in doing.
    Also, if you are new to onboard programming and want to look over some more informa
    tion on developing those applications then I would recommend starting with Chapter 15 of the NI-Motion User Manual, where it discusses onboard programming. You can also reference the following website and the links on it:
    On-board Programming in FlexMotion
    http://zone.ni.com/devzone/conceptd.nsf/webmain/F03A6DE53C744C5886256857005ECDBE?opendocument
    If this does not answer your question or if I miss understand your request then please let us know.
    Regards,
    Michael
    Applications Engineer
    National Instruments

Maybe you are looking for