AI Read is executing only once in a while loop instead of continuously scanning the channels

The ultimate goal is to sample 15 channels (1 at 20kHz, 9 at 1000Hz, and 5 at 100Hz). Since only one scan rate is possible, I would like to reduce the data (for both displaying and saving purposes). The decimate function does not seem to work correctly.
Attached is the current subroutine used to 'decimate' the data. It seems to work on the first loop iteration, as seen by the data block with correct time stamps and data values, but with each additional iteration, all values are zero. Why is only one scan being used in the displaying of data?
Attachments:
Acquire_N_ScansNM4.llb ‏76 KB

When you call AI Clear, the DAQ session is over. You will not get any new data by calling AI Read after an AI Clear. Move your AI Clear to the right of your while loop such that it runs after the while loop completes. Don't forget to wire an error cluster or DAQ session ID to AI Clear from inside the while loop to create the data dependency. Also, consider adding a shift register for the error cluster and some way to exit the loop on an error.
Remember that Alliance Members are here to help. We do this stuff every day.
Daniel L. Press
PrimeTest Corp.
www.primetest.com

Similar Messages

  • I am having an issue where whenever I am at the document list and do edit, to copy or delete a document the iPad locks up. Happens for both pages and numbers. Also happens on my iPhone, but only once in a while. Help.

    I am having an issue with both Pages and Numbers on my iPad. Whenever I am at the document list page and use "edit" to make a copy of a document or delete it, the iPad locks up. Happens almost every time. Also happens on my iPhone but only once in a while. Thought of completely redoing the iPad, but if it happens on the phone as well, won't help. ???

        Hello APVzW, we absolutely want the best path to resolution. My apologies for multiple attempts of replacing the device. We'd like to verify the order information and see if we can locate the tracking number. Please send a direct message with the order number so we can dive deeper. Here's steps to send a direct message: http://vz.to/1b8XnPy We look forward to hearing from you soon.
    WiltonA_VZW
    VZW Support
    Follow us on twitter @VZWSupport

  • How can I create a one time cron schedule that would execute only once in C#?

    I have used cron schedule in C# to create an application that should trigger a job only once. This code piece is throwing an exception, An unhandled exception of type 'Quartz.SchedulerException' occurred in Quartz.dll
    Below is my code:
    class Program
    static void Main(string[] args)
    Test();
    public static void Test()
    ISchedulerFactory schedulerFactory = new StdSchedulerFactory();
    IScheduler scheduler = schedulerFactory.GetScheduler();
    IJobDetail jobDetail = JobBuilder.Create<SatellitePaymentGenerationJob>()
    .WithIdentity("TestJob")
    .Build();
    Console.WriteLine(DateBuilder.DateOf(16, 30, 00, 24, 2, 2015));
    //ITrigger trigger = TriggerBuilder.Create()
    // .ForJob(jobDetail)
    // .WithCronSchedule("0 0 12 20 4 ? *")
    // .WithIdentity("TestTrigger")
    // .StartNow()
    // .Build();
    ITrigger trigger = TriggerBuilder.Create()
    .WithDescription("Once")
    .WithSimpleSchedule(x => x.RepeatForever().WithRepeatCount(1))
    .StartAt(DateBuilder.DateOf(12, 43, 00, 26, 2, 2015))
    .Build();
    scheduler.ScheduleJob(jobDetail, trigger);
    scheduler.Start();
    internal class SatellitePaymentGenerationJob : IJob
    public void Execute(IJobExecutionContext context)
    Console.WriteLine("test");
    I believe that the way I have done scheduling to be execute only once is causing the issue. Please advice.
    mayooran99

    Hi mayooran99,
    From the additional information: Repeat Interval cannot be zero. The screenshot
    as below.
    You should specify a repeat interval in seconds. 
    Please try the following code
    ITrigger triggers = TriggerBuilder.Create()
    .WithDescription("Once")
    .WithSimpleSchedule(x => x
    .WithIntervalInSeconds(20)
    .RepeatForever())
    .StartAt(DateBuilder.DateOf(12, 43, 00, 26, 2, 2015))
    .Build();
    Have a nice day!
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to execute only once the *copy* about LRF1 tcode ?

    Hi Experts !
    I duplicated the LRF1 tcode by ZLRF1 tcode with the main program SAPLZLRFMON (please see below).
    I have an issue with the execution about the ZRLF1 tcode, normally the LRF1 tcode can be execute only once under the same warehouse number, but my transaction ZLRF1 can be execute by more than one user at a time. I debug the execution about the ZLRF1 with a breakpoint set into LZLRFMONF01 include (include test connection) but the system excute the transaction without regard to the breakpoint set into LZLRFMONF01. Did I forget anything ?
    thanks in advance for your help.
      System-defined Include-files.                                 *
      INCLUDE LZLRFMONTOP.                        " Global Data
      INCLUDE LZLRFMONUXX.                        " Function Modules
      User-defined Include-files (if necessary).                    *
    *Class implementations
    INCLUDE LZLRFMONCL2.
    *INCLUDE LLRFMONCL2.
    INCLUDE LZLRFMONCL3.
    *INCLUDE LLRFMONCL3.
    INCLUDE LZLRFMONCL4.
    *INCLUDE LLRFMONCL4.
    INCLUDE LZLRFMONCL5.
    *INCLUDE LLRFMONCL5.
    INCLUDE LZLRFMONCL6.
    *INCLUDE LLRFMONCL6.
    INCLUDE LZLRFMONCL7.
    *INCLUDE LLRFMONCL7.
    INCLUDE LZLRFMONCL8.
    *INCLUDE LLRFMONCL8.
    INCLUDE LZLRFMONCL9.
    *INCLUDE LLRFMONCL9.
    INCLUDE LZLRFMONCLA.
    *INCLUDE LLRFMONCLA.
    *PBO-Modules
    INCLUDE LZLRFMONO01.
    *INCLUDE LLRFMONO01.
    INCLUDE LZLRFMONO03.
    *INCLUDE LLRFMONO03.
    *PAI-Modules
    INCLUDE LZLRFMONI01.
    *INCLUDE LLRFMONI01.
    INCLUDE LZLRFMONI03.
    *INCLUDE LLRFMONI03.
    INCLUDE LZLRFMONF01.
    *INCLUDE LLRFMONF01.
    INCLUDE LZLRFMONF02.
    *INCLUDE LLRFMONF02.

    CHRISTIAN MEYER wrote:>
    >  Did I forget anything ?
    Yes - Standard SAP programs quite often check the program name and transaction code being executed. If you look at program SAPLLRFMON, you'll see that it uses both the program name and transaction code (LRF1) in a number of places. You have to go through your copy, looking for these places and add the logic for your trasnaction code an program names.
    Rob

  • Strategy plan with package to be executed only once

    Hi All,
    Created a time based maintenance plan with strategy. Included 4 maintenance packages in the strategy. One of the maintenance package should be executed only once upon scheduling the maint. plan and should be due on the date on scheduling.
    What scheduling parameters are to be maintained?
    Regards,
    Abhijit

    Hi Abhijeet,
                      The Functionality of Offset is actually different.
    Suppose you procure a new Equipment, you have erected and comissioned, but the use will anly after 3 months as the predessing and subsequent Equipment needs some time for the Erection and comissioning, in this case, you maintenance plans should start after 3 months only,
    for this reason the Offsetting Field is used.
    that is if you maintain the offseting of 3 months then the cycle will start after 3 months.
    it means that if today is 20th December and you have a cycle frequency of 1 month and you give the offseting for 3 months then your plan will be only activated from 20th march,and the first order will be generated 1 month(cycle period) after that.
    that is 20th April.
    Hope it further clarifies your doubt.
    Regards,
    Yawar Khan

  • My ipod touch wont charge and it will only heat up and it charges only once in a while and after that the batery drains very fast even when i put it on airplane mode and close the apps once im done with them please help

    When i plug in my ipod to the comp it wont charge even if i keep it plugged in for an hour but it heats up like crazy i have also got the temperature warning once , it charges only once in a while and and my ipod nano works fine when i plug it into my comp so please help

    Try here:
    iPod touch: Hardware troubleshooting
    However, from yur symptoms Isuspect a hardware probblem like a dead battery.  An appointment at the Genius Bar of an Apple store might be in order.

  • Can we execute a query in resultset while loop

    can we execute a query in resultset while loop
    for ex:
    rs=st.executeQuery("SQL");
    while(rs.next())
    rs1=st.executequery("SQL1");
    while(rs1.next())
    }

    If you do this, you lose "rs". Create a second
    Statement object for the other query.This is right. We have done it many times, It is not the issue as long as you use different statement with in the body of the loop

  • How to get a case structure to execute only once in a loop

    I have a while loop that is monitoring temperature. Once the temperature meets or exceeds a given setpoint I want to start a timer. At this point I don't want to monitor the temperature anymore. That is, if the temperature should drop below the setpoint, I don't want to execute the case structure again when the temperture meets or exceeds the setpoint(the temp may oscillate about the setpoint for a given period of time). In any event, I need the case structure to execute only one time, not every iteration of the loop.

    You can put a local Boolean variable "Flag" inside that case structure and
    set "Flag" to False. Outside the case structure, use an "AND" function
    output to control the case structure. The "AND" function has two inputs. One
    goes to the comparison results between real temp and setpoint. The other
    inputs connects to the "Flag" variable. In this way, once you entered that
    case structure, the "Flag" will be turned to False, and then in next
    iteration, you won't get into the case again because the "AND" function will
    be False as your "Flag" is False now.
    Hope this helps.
    Rentian
    1. Inside the case structure, put a
    "BB Herman" wrote in message
    news:[email protected]..
    >I have a while loop that is monitori
    ng temperature. Once the
    > temperature meets or exceeds a given setpoint I want to start a timer.
    > At this point I don't want to monitor the temperature anymore. That
    > is, if the temperature should drop below the setpoint, I don't want to
    > execute the case structure again when the temperture meets or exceeds
    > the setpoint(the temp may oscillate about the setpoint for a given
    > period of time). In any event, I need the case structure to execute
    > only one time, not every iteration of the loop.

  • Transition executed only once in a TableRow

    h1. SCENARIO
    h3. Model
    /* Model is a Person containing a flag active */
    class Person {
       private Boolean active = false;
       /* more fields and methods */
    h3. View
    /* The View is implemented in FXML */
    class View extends TableView<Person> {  }-----
    h3. Service backend
    class Service implements Observable {
       public void run(){
          Person person = new Person();
          person.setActive( Math.random() > 0.5 ? true : false );
          setChanged();
          notifyObservers(person);
    h3. AS IS ViewController
    /* ViewController observes the service which sends back Person with a randomly changed flag [true or false] */
    class ViewController implements Observer {
    TableView table;
    public void initialize(URL url, ResourceBundle rb){
    /* some code before */
    /* Implemented with datafx library */
    table.setRowFactory(new Callback<TableView<Person>, TableRow<Person>>() {
                @Override
                public TableRow<Person> call(TableView<Person> p) {
                    final CSSTableRow rowCell = new CSSTableRow() {
                        @Override
                        public void getCssState(List s) {
                            super.getCssState(s);
                            if(getItem() == null || s == null){
                                return;
                            if ( !((Person) getItem()).isActive() ) {
                                s.add("active");
                                FadeTransition fadeTransition = FadeTransitionBuilder.create()
                                        .duration(Duration.seconds(2))
                                        .node(this)
                                        .fromValue(0.1)
                                        .toValue(1)
                                        .build();
                                fadeTransition.play();
                    rowCell.getStyleClass().add("table-row");
                    return rowCell;
    /* some code after */
    }h4. Main Problem in AS-IS:
    <font color="green" face="courier" size="3"> The animation animates for every event occurs in the table (click on a row, hover on a row and so on) </font>
    h3. WANNA BE ViewController
    <font color="blue" face="courier" size="3">
    <li>Apply the transition when the service sends the updated Person.</li>
    <li>Apply the transition to the row which this person belongs to.</li>
    </font>
    class ViewController implements Observer {
        public void update(Observable obj, Object message) {
            if (message instanceof Person) {
                Person p = (Person) message;
    /* ----> 1. Find the row of this current person sent by service */
    /* ----> 2. Apply the transition only once in the row found */
    }Edited by: valerio.massa on 29-ago-2012 2.51

    I just dont want to raise the animation via rowfactory, is that possible?
    I would like to find a "better" (stylish) way to launch the animation (for example in the update(){} method, which is better theoretically speaking)

  • Read config file only once for beans

    I want to read onfiguration file Myconfig.cfg with many global values (server IP, port, database URL, pages, etc) I'm using a bean but every time a JSP or servlet create an instance of that bean all the data has to be read form disk...
    I know that if I put the code for reading the file in the init() method in a servlet it is called only once, but how do I read those values from another servlet or JSP, ???
    What is the best solution...

    You can put initiation parameters in your web.xml file and write a servlet that is called on startup. Once the values are read you can put them into the application scope. (i.e. application.setAttribute("jdbcUrl", jdbcUr); )
    Then in your JSP pages you can take them out by using the application.getAttribute("jdbcUrl"); method.

  • How to make variableExpresion to be executed only once

    Hi Sir/Friend
    i have required to generate jasper report here i want to assign value to a variable only once... and the same variable is using for further expression how it can be done plz help me i m not getting this plz....
    with regards
    kotresh

    Thank you for replying!
    So which tone is used by calendar alarm that I should change? I see ringing tone, video call tone, message alert tone, email alert, keyboard tone.
    Actually I never let my cell phone ring, so I already set the ringing type as "silent".

  • DBMS_JOB executes only once

    Hi,
    I submit a job to the job queue using the following syntax:
    declare
    jobno number;
    begin
    dbms_job.submit(job=>jobno,
    what=>'begin call_job; end;',
    next_date=>SYSDATE,
    interval=>'SYSDATE+1/1440');
    end;
    The CALL_JOB procedure just has a simple insert statement which inserts a row into a table.
    After submitting the job, the job executes at once and inserts a row in the database, but after the first execution, though the values for the LAST_DATE and the NEXT_DATE columns in DBA_JOBS get incremented, no rows are inserted into the table.
    There is no entry in the DBA_JOBS_RUNNING table.
    TIA,
    Ramesh

    What is job_queue_interval set to in the init.ora?
    If it's set to '60', and you job interval is every minute, I'm not sure it will run. Try reducing job_queue_interval to 30 (restart database) or try making your jobs next interval a little longer.
    Just a guess though.

  • PreparedStatement vs Statement - When executing only once

    Are there any performance implications in using PreparedStatement vs
    Statement when you are executing the SQL only once? I am talking about all
    kinds of SQL (Select, Update, Insert and Delete). If PrepatedStatement is
    used, I would expect some overhead in setting values for different columns
    separately and precompliling. Is that overhead significant enough to
    degrade performance? If we execute statement only once, I do not expect to
    any gain on performance.
    I would appreciate any comments.
    Sarat

    It also depends on the database/driver combination,several database can be
    configured to maintain a prepared statement cache at the DB level (I have
    never done it myself, but I know people who has done this. Lately I use
    mostly Oracle, for which I should not be configured an expert :)).
    Also the weblogic's prepared statement cache only caches first so many
    statements. If you have used them all up at the startup you are out of luck.
    I know you already knew that, but may be helpful to the original poster.
    .raja
    "Cameron Purdy" <[email protected]> wrote in message
    news:[email protected]..
    BTW - there is a case where prepped stmts are faster -- when they arecached
    by Weblogic's jdbc wrappers. So my previous answer can be wrong.
    Peace,
    Cameron Purdy
    Tangosol Inc.
    << Tangosol Server: How Weblogic applications are customized >>
    << Download now from http://www.tangosol.com/download.jsp >>
    "sarat" <[email protected]> wrote in message
    news:3b715901$[email protected]..
    Are there any performance implications in using PreparedStatement vs
    Statement when you are executing the SQL only once? I am talking aboutall
    kinds of SQL (Select, Update, Insert and Delete). If PrepatedStatement
    is
    used, I would expect some overhead in setting values for differentcolumns
    separately and precompliling. Is that overhead significant enough to
    degrade performance? If we execute statement only once, I do not expectto
    any gain on performance.
    I would appreciate any comments.
    Sarat

  • 'While Loop' inside a 'Repeater' executes only once

    Hi,
    I am using a 'While Loop' action inside a 'Repeater'. The while loop executes only for Repeater.CurrentItem = 1 and not for the subsequent items. Any clue?
    Regards,
    V M.

    And the 'While_Loop.Break' = "false". Thaks for the tip.
    Regards,
    V M.

  • Reading/processing file -- only once!

    Hi,
    I am working on a requirement that i have to open/read and process files that are continously created in one of the directories. Now i understand that i will have to make sure that the program does not process any file more than once.
    These files are being written into the directory at a very rapid rate, and my program has to read these files and insert the records in these dat files into the database. What would be the best approach to make sure that these files are not read/processed more than once?. Any pointers would be greatly appreciated.

    Hi,
    I am working on a requirement that i have to
    open/read and process files that are continously
    created in one of the directories. Now i understand
    that i will have to make sure that the program does
    not process any file more than once.
    These files are being written into the directory at a
    very rapid rate, and my program has to read these
    files and insert the records in these dat files into
    the database. What would be the best approach to make
    sure that these files are not read/processed more
    than once?. Any pointers would be greatly appreciated.Delete the file when you're done with it? Rename the file when you're done with it? Something like "my filename.processed.extension" or something. If neither of those are an option, you could create a List and add the processed files to the list. Check to see whether or not you have processed a file from the list - if not, then process it. But - if you are dealing with a lot of files, then the latter would be a horrible idea. (It would take up way too much time and resources as you continued to process files).

Maybe you are looking for

  • How do I transfer photos from one flash drive to another?

    I downloaded  original photos to several flash drives before I had enhanced them. I realized I needed to do that before I gave them to my family. In Adobe Photoshop Elements 10 I fixed the photos and now I want to put them on the same flash drives wi

  • My FireFox for Win 8.1 has been updating for 2.5 HOURS. Why is it taking so long.?

    After my win 8.1 laptop came out of sleep mode, Fire Fox told me it was running (where and how I do not know) and I could not access it unless I restarted. I shut down and restarted. FireFox asked me to "update" firefox. It has been updating for 3 HO

  • 3.6.9 shows only blank pages

    I updated from 3.6.3 to 3.6.9 and i can't manage to let firefox work again. It just show blank pages and "loading page.." text on the tab. I made several steps but everything failed: - I have reinstalled from scratch - I have started in "safe mode" -

  • FM Radio Lollipop Update Locked Screen Issue

    Hi All, After updating my Z1 Compact to Lollipop I face the following problem. When I listen to FM Radio with Sony's supplied single-button earphones with the screen locked if I press the button once it turns off the radio app and then if I press it

  • SP-3102 - Unable to make VOIP phone calls after switching router

    I had to change the router from Netgear (g) to Belkin N+ (n). Changed the SPA-3102 config to DHCP, it picked up an IP and showed the 1st 3 LEDs lit, status Registered. So, good news. I am able to receive VOIP phone calls, but not able to make phone c