How to give delay in switch on digital output lines

Hello All,
I am working on PCI-6514 Digital IO card, I am writing a sequence to my application using DAQmax for  Digital input and output lines
I want to switch on one output line0 and after a delay 5sec switch on line1 output and after a delay of 3sec switch on line2 output and sense input line 0 and line 1 .
How can we know the status of output ie output is on or off.
Since i am using the IO card for first time suggest me in this.

Hi
I am going to assume that you are using LabVIEW 7.1 for this application.  If you are trying to acquire data from an external device after outputting data to that device, the DAQmx tristate property node will give you this functionality.
You will then need a DAQmx write.vi to output your digital data followed by a DAQmx channel property node. Select Digital Output>>Tristate on the property node and wire a true constant into it. After the property node, you can use a DAQmx read.vi to read the data coming into the digital lines. By using the tristate property node, you can avoid stopping the digital output task and starting an entirely new task.  I am attaching an example program that will demonstrate this.
Regards,
Hal L.
Attachments:
digital input and output.vi ‏39 KB

Similar Messages

  • How to give  push button in alv report  output

    hi,
    my requirement is that , i have to give push button in alv report output(item level) not in application toolbar, i am using reuse_alv_grid_display FM, can any body provide me sample code
    regards,
    siva kumar

    have a look at this thread, also has a sample report at the end from Uwe Schieferstein.
    [button on alv list|How to add and program a pushbutton on ALV grid line;
    seems not to work try this:
    How to add and program a pushbutton on ALV grid line
    Edited by: Micky Oestreich on May 15, 2008 10:20 PM

  • How do I calculate 'uptime' of a digital output

    Hi everybody,
    I'm new to these forums and I am currently evaluating Labview for a series of lab tests where we measure energy balance in a chemical reaction. I've already 
    I have a USB 6008 wired to a relay drive (thanks to these forums) and a heating element and I want to measure the total time heating element is 'on' during 24 hours to calculate the energy the system is getting. The heating element switches on and off based on the signal of a thermocouple.  Is there an easy way to measure the seconds that the output port wire to the heating element is active? Device-independent would be preferable (like measuring the signal uptime of the input of the digital output of the USB6008)
    I tried a lot of options today, like while loops, sequences, case structures following several postings here but all of them failed miserably - while the problem sounds so easy. I could easily do it in the hardware by wiring the output of the relay drive to a bauser timer, but that would be giving up too soon
    Any help would be appreciated.
    Best regards,
    Dimitri

    Hi Dimitri,
    Welcome to the NI Forums! It's good to hear that you've already received some help here.
    Q: Is there an easy way to measure the seconds that the output port wire to the heating element is active? 
    A: Yes! The method we can use to perform this action depends on the sort of architecture that you're using at the moment, however we can take advantage of the section of your code which defines whether the line should be on or off. When it's on, using a While Loop we can  use a Timestamp to keep track of the current System clock; this Timestamp will update on every loop iteration. If we use a reference Timestamp which is created outside of the While Loop when we first begin to drive the line high, we can simply work out the difference between the current Timestamp and the reference Timestamp to get the total time.
    This kind of code will also be device independant because it relies only on the computer it is used on.
    I hope this helps!
    Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

  • How to use 8600 fax with a digital phone line?

    Has anyone had any luck with setting up the HP Officejet Pro 8600 with a digital Phone line?  I do not have an analog phone and of course that information was never brought to my attention when i bought the printer.  I am a bit amazed that it does not work with both analog and digital.

    Hi mboddeti, Here is a different link to the document.http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02891758&cc=us&dlc=en&lc=en If it still does not work, go to HP.com and search for c02891758 and it will find that document.  Error codes are different though.  The voice over IP line still could be the issue, but it is possible that something else is occuring.The document has instructions on how to test your fax setup with the HP faxback service.  If it works with the test fax, it could be an issue with that particular receiving fax.

  • How to acquire serial data on a digital input line with good performance?

    Hello,
    we have a performance problem with our realtime controller. Our objective is, to read a 24-bit long digital waveform from a digital input line. To do this, we supply a clock signal (236 KHz)  to the PFI1 Line of our DAQ Board. On each rising edge of the clock, a new bit is set on the digital input DI0.
    Our hardware which transmits the data, is triggered through a digital output from our realtime controller. On each edge on this output, the hardware starts a serial transmission of 24-Bits.
    Everything works fine except the bad performance of our realtime controller. We want to acquire the 24-Bits in a 1ms timed loop. To measure performance we wrote a test program. In that, we only triggered the hardware and transfered the data to the realtime controller. The task which is doing this job, has a approx. CPU-Load of 30%, which is, in my humble opinion, very high. The task is not waiting for data or anything else! We have earlier implemented a control which is also using a 1ms timed loop. This control is sampling 2 analog input signals, 2 counters. Futhermore it's sending telegrams with CAN and doing many calculations. The strange thing is, this much huger program has a CPU-Load of 25%. Does anybody know where the problem is?
    For the better understandig I attached our test-program to this text.
    We're using:
    PXI-8175 realtime controler
    PXI-6221 Multifunction DAQ
    Thanks!
    Regards, 
       Crest!
    Attachments:
    dig_test.zip ‏51 KB

    Hello,
    First of all 30% CPU-Load is normal because the DAQmx-driver needs a lot of resources.
    In your programm you should place a wait (for example with 1ms) into the while-loop which causes
    lower CPU-Load.
    If this is not enough you should build your vi like in the following example.
    Regards,
    Christian
    Attachments:
    Read Dig Port.vi ‏51 KB

  • How to give constant space in sap scripts.

    Dear experts,
    In my requirement I am printing invoice line item details. In my program,I am printing 8 columns. How to give the constant space in my output.
    My issue.: here am fetching Internal Excise Document Number (DOCNO) item number (zeile) plant (werks) quantity (menge) storage location (lgort) and so on.
    when i am fetching the values from the table, the values are different from each and every rows. so nothing would be aligned properly into the column. For example, if the  doc no is having 10 char,from item no all the values of the column is getting moved to right side. in my second row doc no is having only 2 chars. in this case every column value is moving left side. its looking like realigned and not good.
    How do i give constant space for each and every column. so if the values are more or less it could not be moved to any side.
    please hellp me to solve this issue.
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Thanks in advance.
    Regards,
    Sandy.
    Edited by: Alvaro Tejada Galindo on Sep 28, 2011 3:40 PM

    Hi,
    check out ur tab positioning in paragraph format...any misalignment is their or not.
    second thing you can do is checkout your printer i.e zebra printer or .matrix etc. your using sometimes misalignment happens
    in printer..or print some sample values for verifying the root cause .
    regards,
    KRISHNA

  • How to generarte encoder signals usign digital ouput lines?

    Hi
    I want to generate encodr signals using the digital output line in my daq card. How can i accomplish this task.

    If you have a multifunction DAQ device, then you could use a counter on the device to generate a TTL pulse signal. Counters can be used to generate a single pulse or continuous pulse trains.
    I would suggest to look at example programs to find out how to program with counters. In LabVIEW, there are a variety of example programs that interface with counters. If you're using a text-based programming language, there are examples installed with NI-DAQ that can be found within the ...\Program Files\National Instruments\NI-DAQ\Examples directory.
    I hope this helps.
    Regards,
    Todd D.

  • PCI-6023E & digital output

    Hello,
    I have a PCI-6023E and I want to generate a continous pulse train with a digital output line, and I need to know the maximum frequency for this pulse train that I can generate.
    Thanks a lot for your answer.
    Regards, Anacelia

    Hi Anacelia,
    You should not realy on this answer without verifying with NI first. So here goes.
    Page 347 of the catalog indicates the supported data transfer mode is "programed I/O". This indicates that each line state change must be initiated by an operation of the controlling software. Therefore, the upper frequency limit is determined by how often the code that sets or resets the line runs.
    So, the upper limit is determined by the software and the environment it is running in. If you are woring in Windows environment, and your machine is faster than about 400 Mhz then there are two factors to concider when answering your question. How fast does the code run, and how deterministic is it.
    If determinism is not an issue, you could resonably expect to get
    about one update every 10ms if the code is clean. This would give you 100 update per second or about 50Hz.
    If determinism is required, and you are not running in a Real Time environment, the above estimates should be backed off. Anything above 5-10Hz is going to be questionable.
    Like I said, verify what I have said with NI.
    I hope this helps,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Question on the optical digital output.

    Can anyone with a new iMac give me some clue as to what the optical digital output looks like?
    As I understand it, its combined with a headphones port, this is where I am confused.
    Does it look like a standard Phono type input (Coaxial) or does it have a little red light shining out?
    I need to know before I order as I want to output to dac.
    Cheers

    The optical Jack is just like the normal mini-jack you use for the headphones.
    You have to look for a "mini-toslink" cable or adapter. Since most receiver have Toslink digital input, you should buy a toslink-toslink cable and a mini-toslink adapter.
    you put the mini-toslink in the headphone output port and the mac automatically switches to digital output.
    If you want to watch to a movie in DVD player, insert the DVD, press play, press stop, go to DVDplayer>preferences>sound output>digital output.
    I have to choose it every time I watch to a DVD...

  • Route counter ouputs to same Digital Output

    Hi,
    I'm not sure this is possible but i'd like to route the outputs of 2 counters (PCI-6602) to the same Digital Output line.
    My 2 counters each generate a pulse train defined by frequency, dut-cycle and delay. I want to combine the 2 pulse trains into one resulting pulse train. How would this be possible if I can't route the outputs of the counters to the same digital line ? Do i have to abandon this idea and define the desired pulse train in binary and repeatedly output that to a digital line ?
    Many thanks in advance for any feedback here.
    Cheers, Shaun.
    Solved!
    Go to Solution.

    In the end I configured a counter for Pulse Train generation and opted to change the duty cycle and frequency via 'DAQmxWriteCtrFreqScalar" (i.e. Pulse Width Modulation)
    I registered a callback for the 'DAQmx_Val_CounterOutputEvent' and then changed the dutycycle and frequency in that callback. 
    Unfortunately, I kept getting  "The pulse generation with previous property settings must complete a
    full cycle before the property can be updated." error messages and, opon further reading, managed to find a doc where National Instruments suggest adding a 'Wait(period)' before executing the 'DAQmxWriteCtrFreqScalar' call.
    The problem with this solution is that it one has to wait a minimum of 2 Periods before the Pulse Train can be modified which is not acceptable for our work.
    So is there an alternative solution which allows us to change the Pulse Train after only 1 Period ? Is there an event we can trap which allows us alter the Pulse Train after every period ? I'm sure PWM must be possible on Daq cards (PCI-6602 or PCI-6281 or PCI-6259)?
    Cheers, Shaun.

  • Make USB-6001 digital output always high or low in C

    Hello all,
    I am new to the NI DAQ interface. I have an USB-6001 and I am trying to use this device to control some logic circuit in C. So what I want to do is:
    * set some digital output lines to high or low levels, and change their status when needed (in C).
    I have tested the device in NI MAX -> Test Panels, and found that the device is able to do this. Then I try to do it in C. I hace checked the examples, and the function I should use is the one called "DAQmxWriteDigitalU32". I have problem in understanding its input parameters. I have tried something with my own understanding, but it does not work as I expected. Here is one test I did:
    uInt32   data=1;
    int32 written;
    TaskHandle taskHandle=0;
    DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
    DAQmxErrChk (DAQmxCreateDOChan(taskHandle,"Dev1/port0/line7","",DAQmx_Val_ChanForAllLines));
    DAQmxErrChk (DAQmxStartTask(taskHandle));
    DAQmxErrChk (DAQmxWriteDigitalU32(taskHandle,1,1,10.0,DAQmx_Val_GroupByChannel,&data,&written,NULL));
    taskHandle=0;
    DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
    DAQmxErrChk (DAQmxCreateDOChan(taskHandle,"Dev1/port0/line0","",DAQmx_Val_ChanForAllLines));
    DAQmxErrChk (DAQmxStartTask(taskHandle));
    DAQmxErrChk (DAQmxWriteDigitalU32(taskHandle,1,1,10.0,DAQmx_Val_GroupByChannel,&data,&written,NULL));
    I want to simply set "Dev1/port0/line7" and "Dev1/port0/line0" to high level, but only "Dev1/port0/line0" responds me. The second parameter of the function DAQmxWriteDigitalU32 corresponds to numSampsPerChan. If i replace it (currently 1) with a larger value, e.g. 100, I can see that "Dev1/port0/line7" sends a number of 1 out, then return back to 0. So I guess the problem is just that I do not understand well all parameters of the function DAQmxWriteDigitalU32. Can anyone please tell me how I can set a digital output line to 1 or 0? 
    Thanks!
    Hongkun
    Solved!
    Go to Solution.

    Hello,
    Here is a link explaining the inputs of function:
    http://zone.ni.com/reference/en-XX/help/370471W-01/daqmxcfunc/daqmxwritedigitalu32/
    Also here you can find a lot of examples in ANSI C
    http://www.ni.com/example/6999/en/
    Randy @Rscd27@

  • Simple digital output

    How can i use counter as simple digital output(On, OFF) for 6602?
    I want to use counter output (PFI_32) as simple On/Off output, because in the future
    I want to change my application to pulse generation.

    Hi,
    An example of writing to a digital output line can be found at:
    C:\Program Files\National Instruments\NI-DAQ\Examples\VisualC\Do\DOoneline.C
    As in the LabVIEW example, you will have to set the line to number 28. Program is hardcoded to use
    DIO_28 of TIO board. DIO_28 is pin 32.
    I hope this helps, and have a Great Day!
    George

  • NI DAQmx Digital Output Trigger To Start Analog Input Task

    Hi everyone.  I am using the NI DAQmx VIs to set a digital output line low (boolean '0').  I want to begin reading an Analog Input voltage (Start Analog Input Voltage reading task) right after the digital output line is set low.  I am using the DAQmx Start Trigger (Digital Edge).vi to try and do this.  I have the digital edge to trigger off a falling edge since the digital output line is being set low.  I am using "do/SampleClock" as the source into the DAQmx Start Trigger (Digital Edge).vi.  
    I don't have the DAQ card (PXI 6229) since someone else is using it but I wanted to write up the SW so that when it becomes available I can have SW to try out.
    I have attached the VI.  Am I setting up this VI correctly?
    Thanks!
    Attachments:
    Trigger AI Task Off DO Edge.vi ‏32 KB

    I think you are going to have to wire that Digital Output to a PFI line on the card with the Analog Input(s).  You then trigger on that PFI line.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to generate multiple digital outputs (square waves delayed) at 50 kHz?

    I would like to generate 3 digital outputs like the picture attached at 50 kHz. Using the "digital pattern generator (marching values).vi", I can generate 3 digital square wave but without the delay time. How can I do that?
    I'm using the card PCI 6034E.
    Thank you
    Attachments:
    digital outputs delayed.png ‏8 KB

    Hi,
    the digital pattern generator (marching values) only shifts the binary value of the first signal and sample to the next signal/sample.
    Have you tried generating your waveforms via build waveform and use t0 terminal to change the lead delay?
    In general, this DAQmx example could be helpful which you can modify to your needs.
    DAQmx Write Digital Channel- External Clock: https://decibel.ni.com/content/docs/DOC-11142
    Regards,
    Thomas

  • How can i give delay of less than 1ms or in micro second?

    how can i give delay of less than 1ms or in terms of micro seconds in labview?

    Hi Kamuil,
    have you seen the following thread?
    http://forums.ni.com/ni/board/message?board.id=170​&message.id=81398&requireLogin=False
    hope this helps.
    Cheers,
    --Russ

Maybe you are looking for