Analag/Dig​ital Output with Delay/time​d loop

Hi all, 
I am trying to execute the following sequence (in the attached picture). 
I am using 3 digitat output ports and 2 analog output ports. 
My first question is, how mayI use an array to alternate between the digital channels, in the appropriate order? 
also, how can I make an execution last for a certain amount of time, before stoping, then continuing to the next objective int he process ? 
Lastly, I have trouble introductin gboth analog and digital output into the same execution. 
Any help is realyl helpful, 
Thank you ! 
Attachments:
photo.JPG ‏103 KB

Hi taov, 
i am using a daq6009, and the picture i uploaded shows the pins that I want to output signal from and the duration fo time i would like it to last. 
as of now I have been practiving by powering just one digital port, to turn on for a a few seconds then turn off at the end. Though my Vi does not turn off the digital channel at the end of the duration I specify. And I'm not including the analog output in my code. 
Attachments:
6secLEDDIO.vi ‏33 KB

Similar Messages

  • Process the output with dispatch time 3

    Dear experts!
    Thank you for your attention!
    I ues output type BA00 to print order confirmation and set the dispatch time 3
    after i save the order, where can i process the output?
    as in delivery output, we can use VL71 to process outbound delivery.
    which t-code could i use to process the order output with dispatch time 3  ???
    Best regard!
    Tangdark

    is there anyone can help???
    please~~~

  • Two signals on two outputs with specific time interval

    I cant manage with following:
    Have NI-6251 card. Trying to sent two step-signals on two outputs with
    specific time interval, say 1 to 10 ms with 1us accuracy.
    How can I start?
    Thanks!

    Hi Anonymous,
    What do you mean by step-signals?  Do you mean a signal that steps up the voltage over time, a step function signal that is zero until a certain time then goes to 1, or a pulse train?
    In the meantime you can find examples for getting started in the NI Example Finder by selecting Help » Find Examples
    When that opens you can limit the examples to ones that are compatible with your hardware.  In the bottom left corner select your hardware and check the Limit results to hardware box.
    Browse to Hardware Input and Output » DAQmx » Digital Generation or Generating Digital Pulses.
    Best Regards,
    Bryan H.

  • Send an output with dispath time 3, from an external report.

    Hi,
    It would be very appreciated if someone could help us with the following question:
       We have an output message in a shipment which print a form.
       This output is defined with dispatch time 3 ‘Send with application own transaction’.
       Then we have the following doubt:
           We need to create a report which the user can use for:
             1. Re-send the output (we mean print the form again) if it was already
    sent    (Status = Successfully processed)
                   2. Send the output (we mean print the form first time) if it has not been sent yet (Status = Not processed)
         Then we had thought to do a submit to RSNAST00 program, with the ‘Send again’ checkbox marked for the case 1, and with this flag empty for the case 2.
         But we have seen that this program only works with output are defined with dispatch time 1 or 2. So we think that it  would not work in our case.
    Could you help us with this, please? Do you know other program or other way to do it?
    Thanks in advance.

    No one knows?

  • Help needed with delay timer in my program

    In my program i want to delay the program for a certain time and then carry on. Below is what i have done.
    long instant;
    for(int i=0;i<length;i++){
    instant=testarray;
    On();
    startTime = System.currentTimeMillis();
    do{
    endTime = System.currentTimeMillis();               
    elapsedtime = endTime - startTime;          
    }while(elapsedtime<instant);
    Off();
    In this program the "testarray" contains "long" numbers which represent the times i want to delay the program at. "length" is the length of the array (which is correct as i have tested it), the "On" and "Off" classes turn certain pins on and off at the parallel port (which work as i have tested it).
    My problem is that when i try and run my code above the pin come on once and then stop. It doesnt go on and off like i want it to.
    If anyone know how to take times from a array in "long" format, then turn the pin on, delay it for the time in the array, then turn off the port and do all this again as long as there are still times left in the array could you please help me
    Thx

    in on and off
    public void On(){
    ParallelPort lpt1 = new ParallelPort(0x378);
    int baseAdd=888;
    lpt1.writeOneByte(baseAdd,10);
    public void Off(){
    ParallelPort lpt1 = new ParallelPort(0x378);
    int baseAdd=888;
    lpt1.writeOneByte(baseAdd,255);
    }The problem is that instead of the pins going on and off a lot of times, it goes on once stays on for about 10 seconds and then turns off. Its not blinking on and off like i want it to

  • A problem with delays in timed loops and DAQ

    I am programming a simulation for nuclear rewetting for a visitor centre at my company in Switzerland. It involves heating a "fuel rod" and then filling the chamber with water. The pump automatically starts once the rod core reaches 750C. After this, a requirement stipulates that flow rate be checked to ensure the pump is operating at the necessary conditions. If it isn't, the heater must be shutdown to avoid, well... meltdown. However, we must allow 10 seconds for the pump to respond, while still allowing a DAQ rate of 10-100Hz.
    The challenge is that I can't add a delay in my main loop else delay all acquisition, but I can't figure out how to trigger a peripheral loop (with DAQ for the single channel of checking flow) from the main loop, and when the peripheral loop determines if flow has initalised, respond back to the main loop with the okay.
    I think much of my confusion is in the interaction of the loops and the default feedback nodes that labview is putting in willy nilly. Would the only solution be to have two 'main' loops that don't communicate with eachother but rather do the same thing while operating on different timing? Tell me if you want me to post the file (although its on an unnetworked computer and I didn't think it would be too useful).
    Thanks+ Curran
    Solved!
    Go to Solution.

    Here it is! It is not in any form of completion unfortunately.
    So reading in the temp with NI9213 and watercolumn height with NI9215, we determine to turn on the pump with NI9472. NI9421 determines whether the pump is on (there is flow) and I must respond accordingly.
    I have 3 scenarios similar to this one as well, so having redundant loops with different timing like I mentioned would be way to heavy. I think I may have though up of a solution? At the time the pump is initiated, we record the iteration and wait for a number of iterations that correspond to 10s to pass before fulfilling the pump shutoff requirement?
    Attachments:
    rewettin1.vi ‏15 KB

  • Digital Output With Timer (Simulation)

    Hello everyone, I just learned how to make LabVIEW program a week ago. I try to make a simulation of Digital Output by LabVIEW (my attachment). In this simulation I have a slider as an input (0-10 V), two numeric control (upper limit and bottom limit), a waveform chart that plot those 3 value, and two boolean LED (P0.0 and P0.1) as an indicator. In this simulation you can fill any number (between 0-10) in the numeric control as a limit for your slider input. If the input from a slider exceed those upper and bottom limit then the boolean LED will turn on, P0.0 if exceed upper limit and P0.1 if exceed bottom limit. The problem is I don't know how to make timer for those boolean LED. As example:
    1) Make an input from slider,
    2) If input (1) exceed the upper limit,P0.0 will turn on for 5 second,then turn of for 10 second,
    3) If in that 10 second you change the input back to normal (between upper and bottom limit) then P0.0 will stay turn of until the input from slider exceed the upper limit again,
    4)If in that 10 second you didn't change the input (stay exceed the upper limit) then P0.0 will repeat the process (2) until you the input from slider back to normal.
    (Same process for input that exceed the bottom limit).
    Can you help me to make this timer? Thank You (I'm sorry I made a double post):newbie
    Regards
    Juventom
    Attachments:
    Digital Output With Timer.vi ‏16 KB

    Hello Juventom,
    As I understand it you want to be continuously checking the value of the sliding bar and comparing that to the upper and lower limit controls whilest also chaning the LED booleans to true for 5 seconds then false for 10 seconds if the sliding bar value is outside of the limits.
    To do this you would probably be best using a parallel loop design, where you have 3 while loops in place of the one you have currently. Each one of these while loops would be responsible for a part of your program (e.g. the top one would display your values on the graph and the second one who check the sliding bar value against the upper limit and then turn on the LED, etc)
    I've found this tutorial about multiple loop programs and I think you should look at the section entitled "Parallel Execution"
    http://zone.ni.com/devzone/cda/tut/p/id/3749
    This way you can use normal delay VIs but when they run they only pause that loop rather than the whole program.
    Please let me know how you get on with this, and ask me if you need further help.
    James W
    Controls Systems Engineer
    STFC

  • CRIO 9474 Output delay time

    I'm going to use the cRIO 9474 digital output modlule to control a high speed/high current driver. The following data is stated in the manual: Output delay time (full load): 1 μs max. Full load is 1A, the current output for the driver is only 10mA. Is there any chance that output delay time will be longer then 1us with such small load (10mA)? Will there be any jitter? My switching frequency is going to be around 200-300kHz.
    Best regards,
    Per

    Hello Per,
    There is a bit on confusion about the 1μs that we spec on the manual.  That time or delay time is just the time that it takes the signal from the cRIO Backplane to the MOSFET in charge of turning the channel ON or OFF.  That time won't change depending on the load.  That means that the gate will start turning ON or OFF at the same time no matter what the load is.
    What changes is how long it takes for the line or channel to get to the desired voltage value.  That will change depending on the load but shouldn't be too significant.
    We don't spec that because that a value that depend on your load.
    Hope this answers your question.
    Ricardo Santa Olalla
    CompactRIO Product Support Engineer
    National Instruments.

  • Output triggred in the invoice with Date/Time 1

    Output triggred in the invoice with Date/Time as 1 i e Send with periodically scheduled job.
    So could you  let me know when this gets triggeed if we maintain 1 in condition record?
    Thanks,
    Praveen

    Hi Praveen,
    When you maintain 1in the Date/Time column in the Condition Records for O/P of say the Invoice it means that you are telling the system to send the O/P with periodically scheduled job.
    To achieve this you must use the report program RSNAST00.The message is processed through report program RSNAST00. This report program can be scheduled periodically or started manually.
    For scheduling periodically you need to set up a batch process in SM35.
    Hope this helps,
    J Nagesh

  • Ceate idoc with some time delay

    Hi Friends,
    i am new to xi guide me How to create idoc flat file with some time delay with out using BPM

    Hi ,
    Please clearly  describe your scenario  . Then only you will get correct answers  .Already you have Opened same thread  and  answered by Vijay

  • Need help with control system that reduces a flat output signal every time a certain input exceeds given value

    I'm having difficulty setting up a closed loop control system that reduces one of my voltage outputs (connected to a high voltage system) by 30% every time a measured voltage exceeds a certain threshold value.  I'm using a USB 6229 DAQ.  I've been trying to create a waveform that looks like a DC signal, but the only waveforms that I can seem to manipulate while my VI is running are the stock waveform types.  Also, I've tried to use a formula node or conditional structure to update the output value every time the measured voltage exceeds a given value, but everything I do reinitializes the output value every time it runs or won't store the previous signal value.  I'm using LabVIEW 8.6 and don't have the PID or similar express VI's.  I've attached the mess I've got working right now.  Can anyone help?  I'm really stuck!
    Thanks! 
    Attachments:
    HiV step down.vi ‏40 KB
    output control.vi ‏100 KB

    I'm sorry it's such a mess; I'm still pretty new at this.  These are both little driver programs for a larger overall control program. 
    Output control is meant to send a flat signal to the DAQ whose value can be manipulated while the VI is running.  I have the second activated segment merely to check the values being output.  I didn't realize I attached a version with a meaningless control...I had a control where the user would put in the stating voltage (the high voltage source has a 1V-100V setting for external control).  I've attached this slightly different but equally dysfunctional version.  Ideally, I would have liked something like the analog signal generator vi to come with an input wiring for offset on the DC signal.  Most of the code was diabled because it is copied from an example; it is largely rubbish.  I initially used the DAQ Assistant, but when things weren't working out I switched to putting in each step manually to try to troubleshoot.
    As far as HiV step down is concerned, I've tried something different with a nested case structure (if that's the right terminology?), and I've attached that file.  I think this problem has been solved, but you never know!
    Attachments:
    output control slightly different.vi ‏100 KB
    HiV step down w case structures.vi ‏44 KB

  • Using DelayQueue with dynamically changing delay times?

    Greetings all:
    First-time poster, so please be gentle. :-)
    I am implementing a cache timer task whose job is to removes idle elements from a cache after x time, and was considering a DelayQueue as potentially more efficient than iterating through the entire cache each time. Important point is that the delay time of elements in the queue will be dynamically changing while they're in the queue, until the point when they become idle, i.e., each time an element's content changes, its expiration time moves further out.
    I went looking in the DelayQueue source (and from there to PriorityQueue) as I was interested to see how it implements its sorting mechanism, and it appears to me that it may not handle this properly. Specifically, it appears that the queue is sorted when elements are added or removed but not otherwise, so that you could end up with the head of the queue being an element that has not really expired.
    Question: Has anyone used a DelayQueue for this kind of scenario, and if so, did it work as expected?
    Thanks,
    Brian

    If you want this behaviour I suggest you look at
    overriding LinkedHashMap as it has a means to
    maintain sorted from most recently accessed to last
    accessed.
    Thus to clear it all you need to do is remove the
    oldest elements.Interesting. Currently I'm using a HashMap so changing to a LinkedHashMap would require virtually no changes to existing code. It still won't quite work as-is, though, because access only gets updated on put's and remove's, whereas I would need access updated on any modification to a contained object as well. I'll think about it a bit more - thanks for the suggestion.

  • Step motor control with a time delay

    Hi all,
    I am trying to control a step motor to move in vertical direction by Labview2010. The specific Labview function blocks are created by the manufacturer of the step motor. Now the axis can move up/down properly but my question is that I want it to move with a time interval. For example, we set the desired position to 10mm and waiting time 1s. When I click on the start button once only the axis moves 1mm and wait 1s. Then axis moves another 1mm and wait 1s. This action will obviously repeat 10 times until the axis reaches 10mm position.
    I will be very thankful if someone could give me some hints.
    Best regards,
    Nicky
    Solved!
    Go to Solution.

    You're welcome
    You should some more to the code so that it's more reliable. There might be some miscalculation between the travel distance and the resolution, i.e. 5mm travel and 2mm resolution will give the forloop 2,5. This should be either 2 or 3. I'm not quite sure how the for loop handles this. I think it will round to nearest. You should anyways check it out. Also avoid using 0mm.
    Good look with your project 
    Regards,
    Even
    Certified LabVIEW Associate Developer
    Automated Test Developer
    Topro AS
    Norway

  • Continuous in- and output with PCI-6229

    Hi All,
    I'm currently evaluating a PCI-6229 card on RTX (and maybe InTime later on). The main goal of the evaluation is to prove we can get hard real-time, deterministic behaviour from this system in order to use it to replace our current DSP-based solution.
    To do so, I'm setting up a rather simple program that should
    - continuously acquire 1 channel @ 20kHz
    - have a processing loop of 5mSec, ie 100 samples; this loop should be entered every 5mSec as exactly as possible
    - do some simple processing in the loop (thresholding the signal)
    - bring out the result on an analog output (low signal if signal is under threshold, high signal for all samples above the threshold)
    I could get the basics working pretty quickly: continuous input, continous output, continuous input with dma, input using interrupts.
    Trying to combine everything isn't really working out however.. Normally I'd try and try until knowing the device inside-out but now I have a rather strict timeframe so hopefully someone here can provide some insight.
    Questions:
    1. For the input, I can get an SC_TC interrupt each time one frame is scanned. I measured this on a scope by toggling a digital output on the card, and there's no noticable jitter on the squarewave which is a good sign.
    However I'd like to combine this with DMA, but the DMA is lagging a bit on the interrupt so I end up having to poll the DMA after all in the ISR, so there's no use using the interrupt in the first place.
    Is there a way to set up continuous DMA servicing and get an interrupt from the DMA system itself after 100 samples are transferred?
    2. For the output, I cannot get continuous mode working with DMA, only by writing to the FIFO manually. I can preload a couple of frames with the dma, but after calling aoStart(), tDMAChannel::write() works once, but all calls afterwards return kBufferUnderflow. Any ideas?
    I probably have to check when exactly to write to the DMA, but I have no idea which of the many status functions to use. Tried with AO_Status_1.readAO_FIFO_Half_Full_St() but that's not it. tried to write it on each UC_TC interrupt but that didn't work either.
    3. DMA is, to my understanding, a more performant way of getting samples into the host and doesn't require to call AI_FIFO_Data.readRegister() in a loop and vice-versa for the output side. But are there really benefits in using DMA?
    4. I made a basic program to bring everything together the simplest way possible: preload 100 samples in the output FIFO, start analog input, start analog output, have the ISR copy all values directly from input to output FIFO.
    Putting both analog signals on a scope, I expected to see the input and about (see question5) 5mSec later the same signal on the output, with no jitter.
    However what I see is the output is just floating around, in other words there is no fixed delay between output and input! How is this possible? I use the same divisor for in-and output. Is there any sample code available that achieves what I want?
    5. Is there a way to start both input and output at the exact same time, eg at the same edge of a certain clock pulse? How are input and output synchronized? Can I be sure they never go out of sync?
    Solved!
    Go to Solution.

    update: looking at the DAQmx control samples, it seems some of them set the start trigger for the AO to the AI start trigger. I mimicked this using kAO_START1_SelectAI_START_1 with the aoTrigger method, and the sync seems better now: the output starts exactly 10mSec after the input (or 5, if I preload only one frame) and stays in sync for about 25mSec. That it goes wrong.
    At the moment I'm using no DMA, just one simple interrupt routine that basically does
    board->Interrupt_A_Ack.writeAI_SC_TC_Interrupt_Ack( 1 );
    board->Interrupt_A_Ack.flush();
    toggle ^= 1;
    board->Static_Digital_Output.writeRegister( toggle ? 0x00 : 0xff );
    for( u32 i = 0 ; i < numSamples ; ++i )
      const u32 val = board->AI_FIFO_Data.readRegister();
      board->AO_FIFO_Data.writeRegister( val );
    In the screenshot in the attachment you can see this goes wrong: cursor A shows the position of the input signal (=AI 0, yellow) that should be shown 10mSec later at the output (blue line=AO). Cursor B shows this 10mSec later position, and you can see there's some garbage right after the cursor. This is the data that was written to the AO FIFO in the fifth interrupt (interrupt position show in purple).
    Trying to figure out where that comes from, I put board->AI_Status_1.readAI_FIFO_Empty_St() in the interrupt loop. And effectively, when trying to read the 500th sample, it reports that the FIFO is empty. Consequently the data written to the AO FIFO does not make sense anymore. But I do not understand how can this ever happen? The SC_TC interrupt is fired whenever 100 samples are read from the input. So after this interrupt occurs, the FIFO should always contain at least 100 samples, no?
    Attachments:
    tek00000.png ‏22 KB

  • Using Digi 002 rack with FCP

    Does anyone have experience with using a Pro Tools Digi 002 rack with Final Cut? I'm having some trouble making it work. I just want to be able to use during editing for audio output. The 002 shows up as viable device in audio/video setup, however, FCP claims it only has one output, instead of the 8 it has. Really, at this point in time I'd be happy with 2 channels recognized, but I certainly would like to stay away from mono. Any ideas?
    --Justin S.
    I'm running FCPHD 4.5

    I think your best bet is to contact DigiDesign. I have run several searches on the FCP forums and SoundTrackPro forums for you. Nothing came up that indicates the device you are using works with FCP but I didn't read 'em all.
    bogiesan

Maybe you are looking for

  • Aperture 3 crashes when importing iPhoto Library

    Hello, I'm trying the Aperture 3 30 day trial. I installed it and am trying to import my iPhoto library (with the option of leaving the files where they are). It starts and I see my events come in, but then it crashes. This happens every time I try i

  • Can Xcelsius dashboard open in Lotus Notes?

    Does anyone has experience using Xcelsius dashboard in Lotus Notes?

  • My iPod's screen will not light up anymore and i don't know how to fix it?

    See I droped my ipod once and the screen craked and then the next day the screen did not light up. One of my friends said that i shoundn't get a ipod from gamestop.

  • Device Failure unable to recover

    been having burning problems. My machine is almost three years old. Recently it it has been saying "The attempt to burn a disc Failed. the devise is unable to recover or retry." About every tenth try it works. I've updated all software. It occurs in

  • Music purchase download

    About a month ago, my phone basically died. I called support and after "bringing it back to life" by going through a process and syncing it to my computer, my phone was working again, however, all of my music downloads were gone. Luckily, about 300 o