Help for RT PC timed loop in us?

I have created realtime target  quadcore PC  and created a pulse pattern(500kHz) using DIO pin0.1 and both counters. I want to repeat the pattern or send manny patterns after 512us. I am using time loop. It is not providing more than 28ms however it is showinh 1Mhz clock which is not present in not real time loops.Please help me out to have the time loop run at 512us interval?
Yours sincerely 

Hello Ali,
I understand your frustation, and please accept my apologies for any inconvenience. I checked the domentation and according to this document:
http://digital.ni.com/public.nsf/allkb/0C0A6EE528F​85A6486256F6700061790?OpenDocument
The Desktop PC´s should be able to use the MHz clock source. However remember that if you are acquiring data, the sampling rate does not depend on how fast the timed loop iterates, as the DAQ board has it own clock. The timed loop just determine when you call the DAQmx read function to pull out the data that the DAQ board has out in the memory buffer. My advice at point however is that you create an Service Ticket so we can assist better, or if you want to share your code with me I can test it in one of our PXI devices to see if the issue is with your code or your hardware, in any case we would like to help you, as our final goal is that our customer are succesful while developing their projects
Regards
Mart G

Similar Messages

  • I need some help for an explanation. Loop for 1 minute.

              int minute=1;
              long currentTime=System.currentTimeMillis();          
              long stoppingTime = currentTime + (minute * 60 * 1000);
              while (currentTime<stoppingTime) {
                   // do x;
                   currentTime=System.currentTimeMillis();
              }I want to have the loop to run for 1 minute. It does not seem to work.
    What did I miss? I need some help for an explanation.

    Ran:
    class PrintTimeAsProcess {
      public static void main(String[] argv)  throws Exception {
        int minute=1;
        long currentTime=System.currentTimeMillis();
        long stoppingTime = currentTime + (minute * 15 * 1000);
        System.out.println("START Time: "+currentTime);
        while (currentTime<stoppingTime) {
          currentTime=System.currentTimeMillis();
        System.out.println("END Time: "+currentTime);
    }Got:
    START Time: 1149278202718
    END Time: 1149278217718
    1149278217718
    -1149278202718
    15000

  • Need help for BPM Process Task - Looping

    Hi Folks,
        I need some info regarding Task Looping in a BPM Process.
    Is there any code sample which mentions how to perform task looping and setting the context appropriately.
    Thanks,
    Brian.

    Hi Brian,
    Please find the below link for Multiple Looping
    http://help.sap.com/saphelp_nwce72/helpdata/en/3d/786ec2dd1243c28aeffa4c1c70df25/content.htm
    Regards
    Srikanth

  • Need help for deadline with timing issues

    Hello everyone,
    (I'm still using the '08 versions of iLife)
    I have to meet a deadline within a week, and am having a problem with timing. I have a group f 32 slides, which I want to sync with an existing narrative soundtrack. I've attempted this in Keynote, GarageBand, and iMovie, with identical results...
    When I preview the presentation in any of those apps, it all looks fine. But when I save it as a movie, and play it, the images do not change at the times I had set for them. In QuickTime, if I hit "pause", and then "play", the image jumps to the correct one, but during normal playback, it seems to "hang" on certain images, while the soundtrack continues to play smoothly. I've got to meet my deadline with this project. Can anyone help?
    Thanks in advance.

    Hi Namrata,
    Requirement is very clear, you need to handle it in different PCR's need to be called in single PCR.
    ex. ZSS1 in call ZSS2 and ZSS3.
    Create a Constant in T511k and maintain dates of your payroll periods.
    And then write as below:
    AMT=1
    * <then call new calculation PCR>
    < <then call Old calculation PCR>
    Thank you,
    Sreenvaas.

  • Help for creating a simple loop.....

    Hi i have 2 internal tables
    itab OCCURS 0 ,
           posnv LIKE vbfa-posnv,
           vbeln LIKE vbfa-vbeln,
           vbtyp_n LIKE vbfa-vbtyp_n,
           vbelv LIKE vbfa-vbelv,
      flag TYPE i,
           END OF itab.
    and
    itab1 OCCURS 0,
           vbelv LIKE vbfa-vbelv,
           flag TYPE i,
           END OF itab1.
    they are declared according to the fields in the table vbfa
    and i want to set the itab1-flag to 1 if there's a situation when a record in itab contains the following values
    itab - vbelv = itab1-vbelv
    and
    itab-vbtyp_n='M'
    so i have used the following code
    LOOP AT itab.
        LOOP AT itab1.
          IF itab-vbelv = itab1-vbelv AND itab-vbtyp_n = 'M'.
            itab1-flag = 1.
          ENDIF.
        ENDLOOP.
      ENDLOOP.
    but its not working. Please help me

    Hi,
    you have to change the loop as shown here........
    loop at itab1.
    loop at itab where vbeln = itab1-vbeln.
    IF itab-vbelv = itab1-vbelv AND itab-vbtyp_n = 'M'.
    itab1-flag = 1.
    ENDIF.
    endloop
    MODIFY ITAB1 TRANSPORTING FLAG.
    endloop.
    Thanks and Regards,
    Kunjal Patel

  • Restarting counter in Timed Loop

    I have a timed loop inside a state machine, used to start/stop a data acquisition sequence.
    It works fine, but I'm monitoring the "i" count and Actual End [i-1] values and after the start/stop/start sequence
    these values continue to grow and don't get reset to zero.  I would expect a While Loop to reset the "i"
    variable every time is is called, but I don't see any option for resetting the time looped.
    I can get around it, but I would expect a reset method for this loop, so I'm just wondering if I'm missing something.
    Maybe I need to use "Create Timing Source" instead of the setting it iin the dialog box?
    Labview 2010f1 on Windows Vista SP2 PC

    This might help. Here is a part of the png file you posted. I put in "Structure Name>" to point to the Structure Name input. Notice that the name "bob" is listed as the Structure Name. You must be on Win7 which uses different fonts than XP - that's probably why the name is only half visible.
    Note that the Clock name is connected to the (timing) Source Name input.
    I'm attaching an updated version of the file with the Timing Loop name wired directly.
    Thanks for posting your timed loop interations3 program in 2009. When I run this code, the Iteration Count DOES reset when the Timed Loop is restarted.
    steve
    Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
    question. Give "Kudos" to replies that help.
    Attachments:
    New timed loop interations.vi ‏42 KB

  • Timed loop and CPU usage

    Platform is WIN_XP Pro and machine is a P4 at 2.5Ghz with 512 Mb ram.
    LV7.1 + PCI 6229
    I am using  50ms Timed loop for running a state machine inside it
    and also a  whole lot of other things like reading / writing
    DAQMx  functions;  file I/O functions and such. As the
    project involves a  main and sub-panlel set up local variables
    could not be elimnated fully and there should be something like 150 of
    them. But not all are accessed always - maybe about 15 of them at any
    given time depending on the SM staus.
    Problem :
    Once started the "Finished late"  indication  is off and
    the  actual timing  alternates between 49 to 52 ms. The CPU
    usage is around 25%.
    But as time goes by,  the system gets unstable : After 15 minutes
    or so, the Finished Late indication is always ON and the CPU usage is
    gradually tending towards or exceeds 100%. 
    Obviously the machine control timing now gets affected and things slow
    down badly. Closing the application ands restarting repeats the above
    cycle.
    I am at a loss  to understand what is happening ?  WIll
    breaking down the single Timed Loop to multiple ones help  ? WIll
    that be an efficient way of parallel threading ?
    I can post the code but its quite large and will do it as a last resort.
    thanks
    Raghunathan
    Raghunathan
    LV2012 to Automate Hydraulic Test rigs.

    Hello,
    It sounds like an interesting problem.  It would be worth some experimentation to figure out what's going wrong - attempting to decouple major "pieces" of the code would be helpful.  For example, you could try breaking your code into multiple loops if that makes sense in your architecture, but perhaps you could even eliminate all but one of the loops to begin with, and see if you can correlate the problem to the code in just one of your loops.
    Another concern is that you mention using many local variables.  Variable read operations cause new buffer allocations, so if you're passing arrays around that way, you could be hitting a problem of forcing your machine to perform many allocations and deallocations of memory.  As arrays grow, this can be a bigger and bigger problem.  You can use other techniques for passing data around your block diagram, such as dataflow if possible (just simple wires), or queues where dataflow can't dicatate program flow completely.
    Hopefully looking into your code with the above considerations will lead you in the right direction.  In your case, removing code so that you can identify which elements are causing the problem should help significantly.
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • Need urgent help with HSDIO hardware timing

    Hi everyone,
    I need urgent help regarding HSDIO hardware timing. I've been working in a project which generating serial ramp using HSDIO pxie device. 
    I'm using clock rate 40MHz and generating 14 bit of boolean for each step of ramp. And I have to generate simply 256 steps ramp.
    Which means, 256 (steps) x 14 (boolean array) x 25 ns (period of 1 boolean value) = 89,6 ns.
    What I'm doing right now is with using index of FOR loop as my input data (converting the index into 14bit boolean), then write into pxie device in every iteration,
    which means, my data is getting into output in every 1ms time, right? (I'm using windows)
    And I want to be able to generate faster than that. 
    How can I prewrite my 256 steps ramp, then write them all at once into pxie device. I'm really stuck here.
    In the picture can you see how I do the write into device in every iteration of FOR Loop.
    Regards,
    Yan.

    hi, thanks for responding.
    with using example of dynamic generation with script, I can manage to generate the ramp with controllable delay (generate the whole waveform, including delay with script command, then write to the card).
    But I still have 1 question, I can test the output of the generation using oscilloscope and cant see the start delay (I'm writing delay at the start, before generating the ramp). My signal generated at 0 sec.
    How can I check this start delay? is there any good example delivered with Labview to check this generation? Somehow I cant use the "dynamic generation and acquisition" example to see my generation (cant figure out how to capture the generated signal).
    regards,
    Yan.

  • What is the best/most effective way to dynamicall​y build a timed loop in LabView?

    I am relatively new to labview (not to code in general) and am looking for the "LabVIEW" way to dynamically build a timed loop. This is what I am trying to accomplish:
    I have several heaters controlled through labview using Labview's PID toolkit. This works great. I have no issues with DAQ in general. However, throughout an experiment, I want to change the set point of each heater. I could set this up fairly easily using either a timed loop or the wait vi if I knew exactly how many different set points there would be.
    If possible, I would like to be able to read in a config file that includes the different times and set points for all heaters and dynamically create a loop that can handle this. I have tried using the Elapsed Time vi with an array of time targets; however that didn't seem to work.
    Has anyone been able to do this? Does anyone know where I could learn about using LabView in this manner? All help is appreciated.

    DHagan wrote:
    I am relatively new to labview (not to code in general) and am looking for the "LabVIEW" way to dynamically build a timed loop. This is what I am trying to accomplish: I have several heaters controlled through labview using Labview's PID toolkit. This works great. I have no issues with DAQ in general. However, throughout an experiment, I want to change the set point of each heater. I could set this up fairly easily using either a timed loop or the wait vi if I knew exactly how many different set points there would be. If possible, I would like to be able to read in a config file that includes the different times and set points for all heaters and dynamically create a loop that can handle this. I have tried using the Elapsed Time vi with an array of time targets; however that didn't seem to work. Has anyone been able to do this? Does anyone know where I could learn about using LabView in this manner? All help is appreciated.
    Write a tab-separated spreadsheet file makes it easy to use the write/read from spreadsheet files. Assuming you have a 2D-array of your times and set points it's just a question of setting up a for-loop going through the array row-by-row and extract the elements (expanded index array) to set your points and wait time.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • Why do we lose counts through a timed loop?

    I have written a program to count the rising edges of a square wave produced by a function generator using the DAQmx functions. The counter is read in a time loop with a period of 1 second, so we take a sample once every second. It appears that the program is working correctly accept for the fact the the counts are continuously 2% lower than they should be. We are guessing that this is due to the fact that the timed loop really isn't taking a full second to complete each iteration. Any suggestions on how to fix these timing errors? The counters are read from the NI 6608 Device if that is of any help.

    Please post images of your code so that we can be off assistance.
    Thank you,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Timing loop speed

    Hello,
    Is there a limit to how fast a timed loop can run with an accurate timestamp? I would like to sample at *exactly* every 200 msec, however my output file indicates that it is ~ 200 +/- 10. Is there a better way to create my timestamp? BTW - the Init.vi notes the time in seconds since 1/1/2000 and all subsequent time is relative to the start time. THis is a desired output format that I cannot change. Thanks.
    Attachments:
    InitFile.vi ‏20 KB
    CNAP Daq.vi ‏101 KB

    Why are you using a timed loop?
    In order to sample at precisely 200msec intervals, I suggest you use hardware timing and NOT software timing.  The onboard clocks on the DAQ boards are much, much more accurate than anything you can do in software, timing-wise.
    What I would do is get rid of the timed loop, use hardware timing for the DAQ task, and collect the data as a waveform.  The waveform datatype contains timing information.  Look at some of the examples that ship with LabVIEW.  "Find Examples"..."Hardware input and output"..."DAQmx"..."Analog Measurements".
    Your timestamp is only accurate to ~16msec because it obtains the time from the Windows clock, and that's how accurate the Windows clock is.  That's the best it's ever going to do, so if you need better than that, use hardware timing for your DAQ.
    Hope that helps a bit...
    d

  • Why i get different value when subtractin​g two elements of different arrays then the actual value in a timed loop

    Hi Everyone
    I have a probem in substracting the two elements of two different  1-D arrays. The problem is, I am taking out data from a CCD camera which gives me data in form of 2-D array. So i select 1-D array out of it. Now this CCD output is in a timed loop, hence i am getting data in each loop. I select a perticular array output of the CCD and this is then passed to shift register and in all the loops later on, one of the element of the output array of the CCD is substracted from the same indexed element of the selected array. For reference i have pasted the snap shot of the block diagram. In this snap shot you see three probes. The value at the prob 1 is 232, at probe 2 is 255 and at 3 is 4294967273, where as actually i sould have a value of -23 since i am substacting prob 1 and probe 2 values. Since the value of probe 2 will always remain at 255 as i have fixed it by choosing an array form CCD and i checked the value of probe 1 which never goes above 255 so why do i get this false value here.
    Can you please help me in problem.
    Regards
    Chauhan
    Attachments:
    clip_image0011.gif ‏15 KB

    Your data is U32 (unsigned integer) which does not have negative values. According to unsigned integer math, "negative" results will wrap.
    You need to work in a datatype that is appropriate for what you want to do. How many significant bits do you have in the raw data?
    Message Edited by altenbach on 03-17-2008 11:15 AM
    LabVIEW Champion . Do more with less code and in less time .

  • Missed iterations of TTL triggered timed loop

    Hello everyone,
    I have a camera control VI that waits for TTL information from the camera shutter and uses it as a timing source for a timed loop. In this timed loop the camera is readout and analyzed. The program should react as soon a possible to a new image and therefore I set the timed loop to 'Discard missed items'  so that it doesnt try to catch up (the events im trying to detect are quite rare and last several frames). 
    The problem is this: When I set the camera for a certain numebr of frames (for example 10.000 frames) sometimes due to the discarded frames the loop iteration number never reaches the expected last frame number and doesnt exit (it stays at 9.998 for instance). I noticed I can prevent this by deselecting 'maintain original phase' . However it is unclear to me what exactly happens with these settings in a TTL triggered situation like this. 
    Is it the case that the loop skips the new data but starts the next loop at the correct iteration number (+1)? Or is something else happening?
    Im thankfull for any help!
    Solved!
    Go to Solution.

    Dear j.win,
    If you deselect "Maintain Original Phase", actually you will never discard any iteration, whatever the value of "Discard missed items". Instead, the loop will try to catch up with the late iterations.
    Using an external timing source (your TTL for example) instead of an internal timing source does not change anything. You can use the "Period" (dt) input of the Timed Loop to specify when the loop is supposed to iterate (the unit is the "ticks" in the case of an external timing source). A value of "1" means that the Loop try to iterate at every ticks of the external timing source. If for some reason one iteration lasts longer than that, you will have a "late iteration". Also with a value of "1", it is not possible to modify the "phase", then the "Maintain Original Phase" parameter will just defined wether or not you skip the iteration. If "Maintain Original Phase" is false, the loop will execute immediatly after a late iteration to still execute it, but a bit latter. If the "Maintain Original Phase" is true, the loop will execute immediatly after a late iteraion if the "Discard missed item" is false otherwise the loop will skip the iteration.
    Is it clearer now?
    Regards,
    Cédric | NI Belgium

  • Producer consummer loop and timing loop

    Hi,
    I have to acquire 32 signals and record each signals. I would like to acquire my signals at a sample rate of 100kHz. But I tried with a different sample read and I have always an error of overwritten.
    In my producer loop I read and display all signals and in my consumer loop I record and resample my signal.
    But I thought It was maybe I haven t a timing loop in my producer and consumer loop and it slow my read in the buffer.
    So do you think my error due to I haven t timing loop? And if it s yes, where do I put my timing ? in the consumer or in the producer loop.
    Thank you very much for your response
    Romaric GIBERT

    Why did you start a new message thread?
    You were already being helped here.

  • Run once inside timed loop

    I have a timed loop that monitors equipment. Whenever there is a fault I have it send a notification email. My problem is how to stop it from sending email every single time the time loop is executed. I tried placing the send email inside a for loop but quickly realized that the entire loop itself is reiterted. Any help is much appreiciated.
    Solved!
    Go to Solution.

    Hi icemaker
    I'm not really sure what you mean. Wouldn't a case structure be a solution?
    Could you post some code so we can see what you are doing?
    Best Regards
    David
    NISW
    Message Edited by Davidek on 10-02-2009 09:58 AM
    Message Edited by Davidek on 10-02-2009 10:00 AM

Maybe you are looking for

  • BRTOOLS error while checking tabespace

    Hi, I am facing issue with brtools as 1. loged in using orasid and entered to BRTOOLS 2. selected option 2 for space management 3. selected option for 5  alter data file 4. selected option c for continue then i am getting below error BR0280I BRTOOLS

  • How to make a textfield in inDesign for DP?

    How can I make a textfield for answering questions in an inDesign brochure for Digital Publishing. I tried it with a HTML field, but the textfield is emty again when I went to another article/page and back. But I want the text to stay in the field, e

  • BW 7.0 & ECC 6.0

    Hi, Can any one provide me the material what are the new features in BW 7.0 and new features of R/3 (ECC 6.0) to my mail id [email protected] Thanks Priya

  • Use flash charts from multiple base URLs

    My APEX apps are hosted by a shared service provider who uses a front end proxy. Following the instructions in this forum, I was able to get flash charts to work by substituting my client URL for #HOST#. Example, Change: <embed src="#IMAGE_PREFIX#fla

  • InputComboboxListOfValues - Code instead of Description is displayed after selection

    Jdeveloper version 11.1.1.6 The table CNTRYMAST has the fields "CountryCode & CountryName", while the data tables has the field "CountryCode". I want to create a LOV for selecting countries in a form for the data tables. When I use selectOneChoice co