Pulse ON/OFF - digital outputs

I have this application where I need to turn ON a digital output for like 50ms or 100ms and turn it OFF. I call it Pulse COntrol
Here is an attachment jpg that shows how I am achieving it.
Another question if I may regarding loop timing. I have a while loop which iterates at 100ms. I choose a certain part of the program and make it a Subvi to clean the program to look more readable. Will the program still run at 100ms per iteration? For example, I have an equation that calculates a valuve from a analog input. To make the program clearer, I put the calculation into a subvi and send info and receive info through subvi panes. Will this affect the loop timing? I hope my question is clearer.
My program does a lot more than just calculate a value, hence wondering. THANKS!
vj
I may not be perfect, but I'm all I got!
Attachments:
p.JPG ‏22 KB

hey VeeJay, 
did you want suggestions for how to do your Pule Control a different way, or were you satisfied with the way you have it implemented in the code you sent a pdf of? thanks!
~kgarrett
Applications Engineer
National Instruments

Similar Messages

  • Turn off digital output?

    In the back of my Mac Pro I see a red light above the audio jack. I cannot hear audio. In audio control panal it says for output "Built in digital output" How do I shut this off and back to analog? I know on my MBP I stick a paper clip into jack and it shuts it down.

    If you use a paper clip in a macbook pro, you'll want to use a coathanger for a Mac Pro.
    But a better solution would be to enable the line out or internal speakers in the Sound Preferences Panel. If you don't have any option besides Digital Out, then you have a hardware or software issue that you can't fix with a paper clip, and the first thing to do would be to reset the PRAM.

  • USB-6009 pulse train generation with digital output....

    Hello!
    I've bought a new USB NI-Card (USB-6009) and now I'm trying to adopt an old vi that uses traditional DAQ drivers. I wrote that vi for a PCI NI-Card (PCI-6024E), which has two counters to generate two pulse trains simultaneously. Now I've only one counter and that's why I'm searching for a good way to create pulse trains using a digital output! The pulse trains are both ranging between 100 Hz and 100 kHz.
    I'm sure somebody has an idea how I can solve the probem in the best way
    Kind regards,
    Peter

    You can't do it with this low cost board. Both digital and analog outputs are software timed only. The analog out is rated at only 150  samples/sec and the digital is about the same. You can't even use one of the counters because it is not a hardware timed counter output. It is an event counter only as an input.

  • Create 4 digital output pulses base on input ttl signal

    Hi
        I am a beginner in Labview and would appreciate any advice on how to solve the following problem.
    I am creating a TTL pulse train, and would like to send that into Labview as input.  For every falling edge detected on the input signal, I'd like Labview to generate 4 digital output pulses.  For each output pulse, I'd like to be able to specify the delay, and duration.       The picture should illustrate it more clearly, with the numbers showing the intended order of magnitude.
    System:  NI PCI-6733 DAQ card, Labview 8.5
    My daq card has 2 24-bit timers, and 8 digital I/O but I don't know what the best approach is for creating between 4-8 output pulses of this precision..should it be handled in hardware, or in software?  And how would I go about it
    Thanks,
    -Sidney
    NI Hardware: PXI-7853R, PCI-5122, PCI-6733, PXI-1036, PCI-MIO-16E-4, PCI-6110
    Computer Hardware: Xeon Quad Core - 2.33 Ghz, 8 GB RAM
    Software: Labview 2009, Labview FPGA 2009, Vista 64-bit, MAX 4.6, DAQmx 9.0, NI-SCOPE 3.5
    Solved!
    Go to Solution.

     Hi Yann,
       Wow, thank you so much for this example!  I'm trying to take a look at it, but when I run it.. it responds with the following error message
    Error -200452 occurred at Property Node DAQmx Trigger (arg 1) in DAQmx Start Trigger (Digital Edge).vi:1->reprise-1.vi
    Possible reason(s):
    Measurements: Specified property is not supported by the device or is not applicable to the task.
    Property: Start.TrigType
    Task Name: _unnamedTask<49>
    This is strange too, because ive already used the Digital Edge Start trigger for a different application with this card.
    -Sidney
    NI Hardware: PXI-7853R, PCI-5122, PCI-6733, PXI-1036, PCI-MIO-16E-4, PCI-6110
    Computer Hardware: Xeon Quad Core - 2.33 Ghz, 8 GB RAM
    Software: Labview 2009, Labview FPGA 2009, Vista 64-bit, MAX 4.6, DAQmx 9.0, NI-SCOPE 3.5

  • Unwanted 5VDC (uS) Pulses on DAQCARD-12​00 Digital Outputs

    I'm currently using a DAQCard-1200 PCMCIA multifunction DAQ card to automate some "push-button" features on a particular piece of equipment. I've connected 3 of 8 Digital Outputs available on PortA in parallel with the momentary pushbutton switches used for manual control. To stimulate one of the switches, I am pulling the digital line low for 100mS then returning it to a high (the other signals should remain high during this time). I scoped the signals and noticed very short (uS) +5VDC-Pk pulses occuring on the idle lines (also on the digital lines I'm not even using). I'm using a the "Write to Port" VI. These "blips" occur during the rising "and" falling edges of the active signal. Occasionally, these
    "blips" are long enough to trigger the other two inputs that I'd like to remain inactive. Besides using a filter to reduce the inverse-peak of the unwanted signals, is there a way to programatically control or remove these "blips" alltogether? Or are these even supposed to be there?

    These blips can occur when writing to a digital port, and not masking the bits you do not wish to change.
    If these blips are causing problems, take a look at the Write to Digital Port.VI. Double click on its icon to open its front panel. Go to its block diagram. You'll see where the port is configured on iteration 0, and then the Port Write is called, and there is an input to mask lines. This is what you'll need to do--put a value on this input to mask lines you want to remain the same. This should fix the blips you are seeing.
    Also, if you are not manipulating more than one digital line at a time, you could use the Write to Digital Line.VI, which would accomplish the same thing. But if you need to update more than one line at the exact same ti
    me, this method won't work for you.
    Mark

  • Trigger digital output at every 10 digital pulses

    How can i generate an output pulse at every 10 input pulses comming from an encoder?
    I need to trigger a sensor at every 10 encoder pulses to get data from the sensor.

    Hello jyp777,
    What you will need is a counter with an if statement that activates a digital output every 10 ticks. To do this, I would look at a LabVIEW example titled: Counter - Count Edges (Continuous Clock) that can be found under Help >> Find Examples... >> Hardware Input and Output >> DAQmx >> Counter Input in LabVIEW. Using this example VI, it should be a simple step to add a condition that triggers a digital output when the count reaches 10. 
    You can also use a Digital Output example if you need help in this area. These examples can be found by going to :
    Help >> Find Examples... >> Hardware Input and Output >> DAQmx >>Digital Output. I would recommend "Digital - Continuous Output.vi". 
    Happy LabVIEW coding!
    Thanks,
    Collin D.
    Applications Engineer
    National Instruments

  • Digital stimulus-f​requency response: Need to drive with digital output trigger. Using counters for response.

    I need to drive stimulus-response with a software driven digital trigger and NI-TIO counter based response. No analog I/O is really relevant, although I have a PCI-6035E multi-function DAQ as part of my gear. I intend to use the analog, but its timing is non-critical and can be software timed.
    The real trick is that I want to set the basic timing of the system (in the range of 1 - 50Hz) from the timer0 on the 6035E. This signal needs to be replicated to drive a trigger pulse and to route through RTSI (or a PFI) to trigger frequency counts using the four possible groups of counter/timers on the 6602.
    What I need is:
    while( enabled )
    Repeat at (
    software controllable rate = 1-50Hz)
    Trigger Sets a PFI line for 10-20us
    same trigger sets an RTSI line
    - Software Set Delay (usually zero)- stable is more important than the delay time!
    Count for software set time on 4 counters
    analog samples
    Post-process
    I want to do this in LabView. I have checked out the Advanced sychronization demos online, but the examples all use analog triggering and buffered digital I/O. This doesn't really address what I need to do.
    I have made some failed attempts which relied on software to sync up the trigger and the response frequency acquisition. This is definately flawed. I need to start the counting right after setting the digital output trigger, and stop the count after a fixed interval for frequency calculation.
    I am having trouble working through the signal routing to get the timing to trigger off the digital stimulus output pulse.
    Any help would be appreciated
    Thanks,
    Joe

    Joe
    What are you using the trigger from the 6035E for? I do not know what you mean by, "to trigger frequency countes."
    If you are having problems just routing the signal to the 6602, here is a vi that shows you how to route a signal through the RTSI cable to use as the source of a counter.
    Brian
    Attachments:
    Route_RTSI_to_Source.vi ‏67 KB

  • 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

  • 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

  • Solution to my Audigy 4 Digital Output probs... please make a stic

    I was recently playing Q3TA with my son when my overheat protection kicked in. I exited to windows to see the temp and throttle back my CPU a tad, and when I returned I had no sound from my digital output. Analog was working fine, however.
    Setup:
    Giga-byte GA-MA78GM-S2H w/780g chipset
    Athlon 64 X2 5000+ BE
    Integrated Realtek HD audio (disabled)
    Integrated ATI HD 3200
    2xGB 800MHZ DDR2
    Creative Audigy 4
    Boston acoustics Digital BA735 2. speakers
    I went over every setting in all of my consoles, HQ's and drivers. I played with driver versions, DirectX versions, diagnostic programs and procedures in the knowledge base. In defeat, I even wiped out my XP install and started fresh with the Aud-4 removed, using analog on the integrated card thru headphones. Then I disabled the integrated card and reinstalled the Audigy 4 only to find that there was still no sound from the digital speakers.
    Solution?
    I[color="#ff0000"] unplugged the power to my speakers, and reconnected everything. As soon as the power was back up, the sound started playing (I had a .MP3 on for testing).
    This stumped me for two reasons that occur to me know:
    . These speakers (and possibly many others) don't fully power down when you turn the volume knob off and the light on the satellites goes out. The decoder and subwoofer unit keep their light on.
    2. Apparently, some situations introduce a faulty signal to the digital output that scrambles the speaker units and they refuse to operate any longer.
    Now I know, unplug the power to my speakers. My system works on all three sampling frequencies in "audio console" 44., 48, and 96KHz. None of the troubleshooting procedures touched my problem, because they didn't even mention the speaker setup, let alone doing a hard reset.
    Please please please!
    Make this a sticky for future me!!!

    The Digital output jack on the card isn't of optical signal type.....you will need to get those I/O module mention bt johnston2 for optical connection.

  • 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

  • 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 do a digital output triggered by the falling edge of a clock?

    Hello !
    I would like to do a digital output (on a given line of a pci 6602 card) triggered by the falling edge of a clock.
    More precisely, a pulse train is generated. I have to output each bit of a variable (first, the LSB ; then, the others bits, until the MSB), each bit being transfered on a falling edge of the pulse train. How could I do that, please ?
    Thank you for helping me.
    Julian.

    see the following link (other forum same subject)
    http://forums.ni.com/ni/board/message?board.id=40&message.id=1634

  • Problem with digital output and microph

    Hello! I recently bought a new motherboard MSI K8N SLI Platinum that have onboard Sounblaster Li've 24bit, with coaxial and spdif and also the standard outputs. I ve connected via a fiber optical cable to my amplifier and i checked the digital output only box to the advanced settings on the mixer. I am hearing sound very well from my amplifier but when i connect headphones to with microphone to my soundcard , i don't hear anything at all from my headphones. Also i cannot speak via microphone. If i uncheck the box digital output only i hear sound from my headphones and also i can speak to microphone. Is there some way to have them both enabled? In my previous motherboard i didn't have that problem. I could hear sound from my amplifier with pcm signal and from my headphones and microphone analog at the same time.
    Thanks!

    Thibaud,
    The clue is here: " i take acquisition with one sample on demand."
    You are apparently using software timed output. To maintain accurate phasing at 80 Hz you need timing which is accurate to better than 4 milliseconds. This is not likely to occur with a desktop operating system. Sometimes it will be good and other times OS latencies will throw the timing way off.
    If your board supports it, use hardware timing. The timebase sources on most boards are far more precise and accurate than software timing.
    Lynn

  • How to use Digital output to turn on sensor for Analog Input?

    I am trying to use a digital output to turn on an array of sensors that I then wish to read on 16 analog input lines. I have a 6024E DAQ card. I am planning to take data at 10-20 hz, so not terribly fast, but I will be acquiring for long periods of time (days) so I will be streaming data to disk.
    I have a fair bit of experience in Labview basics, but can quickly get out of my depth when I try something new (like this). I have V6.01.
    It looks as though the best way might be to do the DO and then a single AI as individual events, then write to disk and continue through the loop. I am puzzled, however, how to keep this cycle on schedule given that I don't know how long it will take to sample 16 channels
    , write the data to disk and get back to the starting point... perhaps this is so fast that I don't need to worry about it? The actual timing of the samples (be it 10 or 20 hz) isn't too critical, as long as I can record at what time they were taken... it would be frustrating to find that I was several seconds off after days of data.

    Hello,
    Thank you for contacting National Instruments.
    If you are worried about the time of your acquisition being off, then you should associate each voltage measurement with a timestamp. This will allow you to know the exact time at which the sample was taken and you will never be off. You can use the Get Date/Time in Seconds.vi in our while loop with your AI code so that you can read a sample and read the time. You can than log the voltage value and the timestamp to your file.
    Regards,
    Bill B
    Applications Engineer
    National Instruments

Maybe you are looking for

  • An unknown error occurred (-48)

    I have music on my ipod (5th generation video) from other people's itunes. Not only can I not figure out how to get my music that is on my ipod to stay in my itunes without the ipod connected... I now have a syncing problem. When my ipod is connected

  • What's wrong with this code (in recursion there may be a problem )

    // ELEMENTS OF TWO VECTORS ARE COMPARED HERE // CHECK WHAT IS WRONG WITH THIS PGM // there may be a problem in recursion import java.util.*; class Test Vector phy,db; public static void main(String adf[])      Vector pp1=new Vector();      Vector dp1

  • New button help

    i want to add a new drop down movie clip button to this fla, can anyone take a look and help me, i would credit you in the html, http://www.megaupload.com/?d=JWW4TDGK please help me ! the website is www.sandslandscaping.com i want it to say John Deer

  • Re: Last 12 Months Rolling

    Dear All, I am using OBIEE 11g, Can any one help me pls.. i have two prompts like Year and Monthname.. For example: User selects 2013 June report has to display last 12 months from selected month, that i achieved using supporter report. (ref:: Last N

  • BAD problem - photoshop getting worse

    i make GUIs for software synthesizers and it is CRITICAL that i have pixel-per-pixel performance. i have used photoshop for over a decade. granted, i am not erudite on colour or display settings, still, this blows me: for about the last year, i will