Timing in Labview

Hello
I am creating an application where I use a 72- hour data set, in order to find the best timeintervall to do a certain operation. However, as people tend to sleep at night, it is not very realistic to just place the operation at the time when it ideally should have been done. Therefore, I want to define a timeintervall when the operation can not be (i.e from 23.00 - 06.00). 
The problem is that when I try to do this (by using timestamp controls from the numeric palett), I also need to specify a date. I don't wont it to only be valid only for a specific day, but for the whole dataset. Is there any workaround/solution to avoid this problem?
Greetings
Kristoffer
Solved!
Go to Solution.

This is quick example. So you don't want to perform the operation between 23 hours to 6 hours (I believe). The attached example will give boolean high/true when the time is between 23 and 6 and false rest of the time. If this is not the thing you wanted then explain a bit more so that it would be easy to understand the exact scenario.
Good luck.
The best solution is the one you find it by yourself

Similar Messages

  • System/subsystem timing in Labview

    Hello,
    I work in development of mechatronic systems, many of which have complex timing requirements for mechanisms that interact with each other.
    I have been representing the timing diagrams in Microsoft Project or Excel to get a visualization of what mechs are moving when,for how long and in what order. This allows me to plan the overall system timing which I then code into State Charts to implement.
    Is there a better way of representing this type of timing diagram or better being able to plan and run the sequences in LabView?
    Many thanks,
    Mark.  

    Hi David,
    Attached a MS Project snippit. Typically I create this for the timing specification and then come back to it when the design is realized to enter the actual timing. I use state charts to logically step through the sequences, adding delays in the transistions to implement the required timing. So there is a gap between my sequence in MS Project and my implemention in state charts. I thought there may be a way of representing the timing for management demonstration (MS Project is great for that) which can then be executed.
    Are there any sequencer design patterns available for Labview?
    Thanks.
    Attachments:
    CycleTime1.JPG ‏81 KB

  • Urgent: question about timing in LabVIEW

    Good Evening ..
    First of all, I'am a labVIEW beginner so be easy on me!
    I want to check if an input has the same value for a certain amount of time, for example, if some input has a voltage above 2 V for 10 seconds, how can I express that using a formula node ? If it's not possible then what should I do ?
    I wrote the following program:
    int i,j ;
    for (i=1;i<=10;i=i+1)
    if ( A>2)
    j=j+1;
    if (A >2 && j==10)
    { B = 1; }
    else B = 0;
    the value has to match the condition for the whole period, I know that my code doesn't gurantee it but that's what I could think about!
    I need to make the steps between i increments seperated by one second, but I don't know how to make LabVIEW understand that!
    I would appreciate it if someone told me how to do so
    Best Regards

    As has been said, you really should check out some of the online tutorials:
    LabVIEW Basics
    LabVIEW 101
    With that said, I think you want to get away from using the DAQ Assistant and use some of the more basic nodes.  You can actually set the sample rate of the DAQ and that will be constant.  So you can then get a sample and compare it.  If the value is in the right range, increment a counter.  If it isn't, reset the counter.  Once the counter reaches a certain amount, you are done.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    High for 10 seconds.png ‏22 KB

  • Generating sound signal and record the timing using labview

    Hi,
    can somebody help me in generating audio o/p from daq 6036 and record the same signal for reference.

    Kanth,
    I think you will find there are lots of topics already on the forums talking about trying to do this.
    Here are a couple of examples:
    Forum: Continuous audio output with varying volume or frequency
    Forum: How do I get audio output from a labview program
    Probably the easiest way is to search the forums for what you are looking for:
    Search Results on forums.ni.com for 'audio' and 'output'
    Finally, here is an example program that may also help you:
    NI-DAQmx: Acquiring Audio and Transferring It to a PC Sound Card
    Otis
    Training and Certification
    Product Support Engineer
    National Instruments

  • Execution timing in LabVIEW

    In my application, I monitor 7 sensor values as either on or off and either update internal variables or turn on actuators accordingly. For some reason, LabVIEW is missing some of the sensor values changing and I think its because i'm using flat sequence structures for some of parts as delays are required in some instances. My question is, with several concurrent processes running at the same time, if i enter a sequence structure, does that preempt the other processes. IE, if i'm in a sequence structure and some condition changes outside of the structure, is my system going to be able to detect it?

    Entering the sequence structure will not prevent operation of code outside of the sequence structure which is independent from and in parallel to the sequence structure.
    I have some questions which may help to isolate the source of your problem.
    1. It appears that the parallel processes in your application are intended to independently monitor your sensors. Is this correct?
    2. What are the hardware resources that you are using?
    3. Is it possible that you're missing data because two portions of the program are trying to utilize the same resources simultaneously?
    I do recommend that you try to steer clear of sequence structures when possible as Lynn suggested. While the flat sequence structure has helped with some of the problems associated with sequence structures it still disrupts the natural LabVIEW dataflow operation.

  • LabVIEW crashes in timed loops

    Hi,
    I'm running LabVIEW 8 on a
    Pentium D, 2 GB RAM, Windows XP sp2 with an ETS target Pentium 4, 256
    MB RAM. I have two timed loops in a sequence, so they do not execute at
    the same time. A similar sequence is on the target allowing me to make
    a state machine between both computers.
    The loops on the host
    simply update the GUI for the user have a large period of 45-ms. This
    makes the CPU usage virtually zero. Also, task manager tells me that
    LabVIEW on the host only uses 200 MB of memory, so I know that the
    computer is not running out of memory.
    When I run the multiple
    VIs, the host will randomly crash. It works about 9 times out of 10
    with no crashes. Windows will tell me that it (is sorry and) has to
    close LabVIEW on the host. The target side continues to run like
    nothing happened. When I click on the link requesting details, I get
    this information from Dr. Watson:
    AppName: labview.exe
    AppVer: 8.0.0.4005
    ModName: lvalarms.dll
    ModVer:8.0.0.6
    Offset: 00001df4
    I
    have narrowed it down and I know that it will only crash in the two GUI
    loops. Does anyone have any ideas about how to approach this problem?
    -J

    Recently, I have had similar problems with timed loops (LV8.0.1/W XP). According to NI's answer, this is linked to hyperthreading. Unfortunately, until now, my question if this incompatibility is a bug or not remains unanswered. Because my application is critical, I have replaced all the timed loops with while loops even if the crash didn't appear during a short test with disabled hyperthreading.
    Hope this solves your problem.
    Here is an extract of the exchange with JR Andrews from NI :
    04/04/06
    The preliminary investigation of the issue indicated that it may be due to hyperthreading (or having dual processors) and that disabling hyperthreading resolved the issue as a potential workaround. If you have the time and ability, I would be interested to know if you were seeing the issue on a hyperthreaded machine and if disabling hyperthreading does in fact resolve the issue for you. I can then pass that information on to the developer to assist them in fixing the issue.
    Regards,
    JR
    JR Andrews | LabVIEW Real-Time & PDA Product Support Engineer | 512-683-2820 
    05/04/06
    Even though your computers only have 1 processor, that processor may be using "Hyperthreading" to make it appear to the OS that there are 2 processors. You can check this by looking that Performance tab in the Windows Task manager or at the number of processors shown in the Device Manager. I've attached a screen shot of my system which is a single P4 processor which is hyperthreaded. Disabling the LV option for "Run with Multiple Thread" would probably not have any effect because to Timed Loops are always their own thread and that setting only applies to non-timed loop LabVIEW code. So I wanted to clarify that double check that your machine indeed does not have hyperthreading. To disable hyperthreading, you can go into the BIOS and you should be able to disable it. You can always go back and enable it again too.

  • Speed limit of Labview

    Hello,
    I would like to know until which treatment speed we can work with Labview. I work with a FPGA at 19200 Hz (T=50us), and I don't know if I can receive and read all the datas I send.
    Thank you

    Hi Ju!
    Go through the attached presentation.
    Hope so this will help you.
    Kaustubh
    VC (Pune)
    INDIA
    Jenilia D'souza
    Attachments:
    Advanced Application Timing with LabVIEW Real-Time1.zip ‏3000 KB

  • SPI bus timing, 1ms repeat acquisition

    I plan to use digital I/O to create a SPI bus to read the output from a sensor.   I need to repeat a 2 byte read at a 1ms interval.  I was hoping to use a USB-8451 for this but I am unaware how I can control the 1ms repeat timing using LabVIEW.  If I only need 100ms of data perhaps I can use the NI845x SPI Write Read.vi to read an array of 200 bytes and then divide the array up into 100 2-byte pieces.  Depending on my sensor, I may need to deselect the Chip Select between the 100 reads to permit the DUT to update its data.
    Alternatively, I have considered the USB-6221,6225,6229,6251,6259,6281 or 6289.  These seem to have better hardware timing features but may be limited to 2047 samples.  I assume that this means 256 bytes which could give me 128 samples from the sensor.
    Thanks for any suggestions you can provide.

    Hey Ryan, 
    A picture of the behavior you are seeing would be helpful. The NI 9411 should only be reading 50 bits every 1 ms.  
    It may not be possible to read 25 bits (do you mean 50 bits? 25 high 25 low) and push it to a queue without encountering an overflow error. If you take a look at the above code the digital input will receive 50 sample clocks every 1 ms. This is equivalent to acquiring 50 points every 1 ms which is an acquisition speed of 50 samples/1 ms=50 kHz. The read loop must keep up with the 50 kHz rate otherwise the buffer will overflow. In the above example I’ve set the read to pull 5000 samples (x) with the assumption that the loop will take less than or equal to .1 seconds (y). This yields a software acquisition speed of 50 kHz (5000 samples/100 ms). If the loop speed is faster than 100ms then the 10 seconds timeout on the DAQmx read will allow for the read to block so the FIFO may be filled.
    The options available for question 2 are below. They may be used separately or in conjunction.
    Move the DAQmx Read for the NI 9411 to its own independent while loop, set the DAQmx Read to acquire 50 samples, do not graph the data, and pass the data to a Queue for processing in a consumer loop. This will increase the loop speed which may allow you to keep up with the 50 kHz acquisition speed. This may not work because the loop speed will need to be 1 ms or less.
    Increase the value of the Samples per Channel control that goes into the DAQmx Timing VI. This will increase the DAQmx Software Buffer size. This buys time until you receive an overflow error because the DAQmx Software Buffer is being filled faster than samples are removed.
    Read in 5000 sample chunks (producer loop), push this to the queue, and perform the analysis in 50 bit chunks (consumer loop). The additional queue created should allow for the acquisition loop to keep up.
    Regards,
    Izzy O.
    Product Support Engineer
    ni.com/support

  • Pxi-4071 shielding cable

    Hi, we use pxi-4071 on pxi-1033 for measurments and we connected shielded cables few meters long. We wrapped foil cables from the kit. After that we connected all the shields to the ground from the power supply. But we still remain interferences about 1nA and DC component 5nA. If anyone faced a similar problem, is it possible that we are too often measured current. Can you advise the shilded cables for multimeter in this case. 

    alyast wrote:
    Yes, we pretty sure in shielding, but we don't know why there is current constant component (5nA), while declared sensitivity - 0.1nA. Probably some bug with timing in LabView or something? I don't know what could be a reason for this behavior, and therefore ask noob questions.
    Why would you suspect the software when all the evidence points to an issue with the HARDWARE?  And if you're measuring in the nanoAmp region, you'd better be ABSOLUTLEY certain that your grounds are true and accurate.  Probably grounding to your power supply is not good enough.  Your power supply probably has to be grounded to a copper stake going - what is, it, six feet? - into the ground.
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • APO Offset time integration with R3

    Hi,
    When I put an offset in the last operation of the PPM
    this creates an earlier availability date for the component for planning.
    However this date gets transferred to R3 as the basic finish date on
    the planned order.
    This is incorrect - it should be just the available planning date
    on the planned order.
    How do I get R3 to reflect the correct dates ???
    Thanks,
    Tony

    Well, you need to know what is real and what is drift, and that depends on the data. Is the frequency of the signal constant and known?
    If the wavelenght is constant, you can simply subtract the average value if you process exact multiples of the wavelength each time.
    How does the real data look like? Is it similar to the simulated data in your example?
    Why is there a while loop in the signal generator?
    Why do you use the pt-by-pt integration if you process entire segments? The plain integral could do the same without any loops.
    Why is there a wait in the toplevel loop, even though the loop rate should be determined by the signal timing?
    LabVIEW Champion . Do more with less code and in less time .

  • Pulselength USB 6501

    Hello,
    I want to use one or more USB 6501 Boards to fire up some 10s of IGBTs. Each of these switches turns on ~10A for 1ms-3ms (each IGBT has a different turn-on length). Since the pulse pattern repeats after at least 40ms, i want to fire them step by step to minimize the stress for my main power line.
    I managed to create a VI which does exactly what I want - with one exception: The digital waveform gets created from an array using "build waveform". But no matter what value I feed into "dt" to control the length of each digit/pulse, all I get is pulses of 1 ms for each logical "1".
    From my point of view, "dt" tells the Channel how long it should stay "high" for each "1" it receives. Is this incorrect? I want to control the length of each pulse in steps of 0.1 ms - in other threads I read something about the need to use some kernel-functions to be able to use sub-millisecons resolutions. If this is correct, shouldn´t I be able to see a 2 ms pulse when setting "dt" to 0.002?
    Thank you for every hint, Sascha
    BTW: Labview 8.5 Evaluation / Labview 6.1 full
    BTW2: In the attached file you will only find 8 digital waveforms for 24 digital ports... I don´t know how to save the full 24*20 binary array, therefore you will receive an error if you try to run this VI without correcting the number of physical ports to use.
    Attachments:
    IGBT.vi ‏49 KB
    6501.png ‏53 KB

    Hello Philosoph,
    the USB-6501 is a static DIO device, which means it does not have an onboard clock to switch the digital ports with a certain frequency.
    You can turn on and off the digital lines with software timing in LabVIEW. That is ok if the timing does not have to be very accurate - i.e. it does not matter if the pulse is 10 ms or 12 ms - and if the frequency is not too high.  A pulse length of 1 ms is borderline - most of the time, it will probably work, but when your PC does have to do other tasks, you might get a delay of up to  100 ms. In any case, you will have a jitter on the pulse length. For higher timing accuracy requirements, you would have to use a DIO device with correlated, which means clocked, outputs.
    Having said that, I would recommend a different approach for the signal generation. I attached a VI that writes state information to the digital outputs; you can modify the digital pattern in the array, and set the desired pulse length. As the first iteration of "Wait for next ms multiple" does not have a determined duration, I would leave the first line all zeros and start signal generation with the second line. If needed, you can wrap the for-loop in another loop to repeat the pattern.
    Regards,
    Johannes
    NI Germany
    Attachments:
    Digital Signal - static.vi ‏19 KB

  • MyRIO functions palatte

    I'm using a myRIO with LabVIEW for the first time. I watched some videos by Veneet, and am curious why my function palatte does not have the same timing functions as seen in the Measuring Loop Timing in LabVIEW FPGA video. I have attached two screenshots, showing MAX and the myRIO project, and also my functions palatte. Any insight is appreciated.
    Solved!
    Go to Solution.
    Attachments:
    Capture.PNG ‏261 KB
    capture2.jpg ‏896 KB

    I have just tried what you have suggested, and I am not able to select myRIO as my project type. The attached screenshot is what comes up after slecting File>New>FPGA Project.
    Attachments:
    Capture4.PNG ‏45 KB

  • NI USB 6229 to communicate with 1 wire EEPROM (read/write)

    I have NI USB 6229 and am trying to communicate with a 1 wire EEPROM DS2433 chip through digital I/O with (hardware timing) with LabVIEW 7.1. I am struggling to read serial no. as well as reading/writing certain values which I have received through different analogue I/Os. Can anyone help me on this?

    Duplicate
    Regards,
    André
    Using whatever version of LV the customer requires. (LV5.1-LV2012) (www.carya.nl)

  • Subject: Timing issues in LabVIEW 6.0

    Hi all!
    I am running LabVIEW 6.0 on Win 2k Professional and am baffled
    by the following:
    Using the GPIB Read .vi, I read from a couple of virtually
    identical Solartron/Schlumberger 7150 Digital Multimeters at
    a set time intervall and subsequently write the data to file.
    The test routine performs only elementary arithmetic besides
    GPIB reading and writing to file.
    Using the Get Time/Date In Seconds .vi to time the read-store
    loop reveals that the GPIB Read operation is excessively slow.
    As the GPIB Read .vi's timeout defaults to 10000ms (488.2
    global timeout), I tried out a number of different timeout
    values and found that timing only begins to approach the
    value I set without GPIB read errors when timeout is set at
    >=1000ms and th
    e read-store intervall is at least 440ms(!)
    I cannot understand why the GPIB read operation should
    require as much as 440ms when the CPU is otherwise minimally
    loaded...
    Isn't there a way to GPIB read at a rate faster than once
    every 440ms?
    Thanks in advance.
    Best regards,
    Andrew

    I did a quick search of the instrument driver network and found a CVI driver for your instrument and a LabVIEW driver for a model 7151. You can convert the CVI driver to LabVIEW and the 7151 might be close to what you need. The drivers can be found here: Solartron 7150 LabWindows/CVI Certified Plug and Play Instrument Driver.
    Also, there could be a lot of reasons that your readings are slow. See if Solartron has some example code that you can look at. It probably won't be in LabVIEW but you should be able to use the same GPIB commands.Message Edited by Molly K on 02-18-2005 11:38 PM

  • "LabVIEW FPGA: The compilation failed due to timing violations, but there is no path information because the timing violations are not of type PERIOD

    The compilation of my labview fpga vi fails with the error message "LabVIEW FPGA:  The compilation failed due to timing violations, but there is no path information because the timing violations are not of type PERIOD".
    In the 'final timing (place and route)' report, the requested frequencies are all below the maximum frequencies and the compilation error message is only displayed at the very end on the 'summary' page.
    I tried to optimize my labview fpga vi with pipelining, but had no success.
    Can anybody offer some advice on how to debug fpga code with this error? Is this really a timing error or something else?
    Software:
    Labview 2011, fpga 2011, xilinx tools 12.4 sp1
    Hardware:
    NI PXIe-1071 Chassis
    NI PXIe-8108 Embedded controller
    NI PXIe-7965R FPGA FlexRIO FPGA module
    NI 5761 250 MS/s 14 bit Analog input digitizer
    The Xilinx log of the compilation run is attached.
    Also, this issue was already discussed in this thread ~6 months ago, but no satisfying answer was offered so far...
    Thanks,
    Fabrizio
    Attachments:
    xilinxlogc.txt ‏2313 KB

    Hi Kyle,
    the problem is: I have one computer which compiles the VI successfully and a second one which shows that error. Both use the same software setup (LV2011SP1+RT+FPGA from DS2012-01). Both use the same project file - atleast SVN shows no difference.
    - You can have one FPGA VI where one computer is compiling successful and a second one complains. (Btw. I have a SRQ running in Germany on this topic.)
    - More problems: After successful compiling on first computer and transferring all to second computer (using SVN, including the full project folder with all files like bitfiles, lvproj, and everything) the second computer is unable to start the RT executable due to error "FPGA VI needs to recompile". Solution so far: Call the FPGA-OpenReference with the bitfile instead of the VI (as I used to do until now)...
    - More problems: After modifying the FPGA-OpenReference to use the bitfile (on the 2nd computer) and transferring all the files back to the 1st computer (using SVN as before, including the whole project) the 1st computer complains: FPGA-OpenReference is creating a different reference than is used in the VI. So what happens here? On one computer my VI is ok, the reference is typed correctly. Transferring all the files to a different computer the VI isn't ok anymore due to changes of the reference??? You know: all files are the same: lvproj, FPGA bitfile didn't change, cRIO reference didn't change...
    All those problems didn't occur on my RT-FPGA projects in LV2010SP1. I'm not pleased...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

Maybe you are looking for