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

Similar Messages

  • How to measure the pulse duration of a TTL signal using AI?

    Hi there.
    I would like to know how to measure the pulse duration of a TTL signal using an Analog input.
    These TTL signals comes from an ultrasonic sensor's output. The pulse width of the signal is
    proportional to the distance of the object the sensor detected.
    I have tried using the example "Measure Pulse Width.vi" which uses a counter to measure the
    pulse duration instead. It provides me with correct results.
    However, i will like to know how can i do it using the AI instead.
    I tried it by using the example "Acq&Graph Voltage-Int Clk.vi" which i modified by including a
    timing and transistion measurement vi. Pulse duration was selected as the output. A graph indicator was also added at the output of the pulse duration to monitor the incoming TTL signals.
    However, everytime the TTL signals was detected on the graph indicator, the numeric indicator always produce a "zero" reading.
    I have attached my vi for your reference.
    Can anybody advice me what i have done wrongly?
    Regard.
    Attachments:
    Acq&Graph Voltage-Int Clkv1.vi ‏190 KB

    Hi Paul,
    Today i tried using 2 different methods to read the pulse duration of my sensor signal.
    Both methods use "Acq&Graph Voltage-IntClk" vi as a guide.
    Method1:
    Add a filter vi(lowpass/bandpass) and a timing and transition measurements vi.
    Pulse duration is selected as the output. With some numeric conversion, a centimeter
    reading indicator was created. However, the reading always remains as "zero"
    Method2:
    Add a Mask and Limit Testing vi and a timing and transition measurements vi.
    By adjusting my upper and lower limits, i manage to "filter" a single pulse out from the actual signal.
    However, like the earlier case, the cm reading still remains at "zero"
    I have attached both the methods resulted waveforms for your reference.
    Are there anything that you can advice on?
    Regard.
    Attachments:
    Results_Waveforms.doc ‏141 KB

  • Digital outputs while sampling analog inputs

    I am currently developing a program using LabView 2012 SP1.  I am interfacing with a NI USB-6009 DAQ using NI-DAQmx 9.5.5f4.  I am attempting to acquire a voltage reading on three analog inputs (AI0, AI3, and AI4) at 1 second from startup and at 20 seconds from startup.  The three digital ports: P0.0, P0.1 and P0.2 are used to turn on transistors for the signals in question and must remain high during the ~20 seconds the readings will take place.  I have figured out how to acquire 20 samples over 20 seconds on the analog inputs but have trouble with the digital outputs.  The DAQ assistant is not a good option and the USB 6009 has limitations that are not necessarily covered in the example code im finding.  Basically I need to turn on (write hex 7) to port P0.0-2, acquire my analog samples for 20 seconds, then bring port P0.0-2 low and end the program.  Can anyone help walk me through this?  Thank you in advance.
    RJ
    I surf therefore I am....

    Solved it.  See attached vi.  
    I surf therefore I am....
    Attachments:
    Level.vi ‏69 KB

  • Should not create any output file when invalid input source schema

    I have a xslt file, which I have make code to check the order status value.
    If OrderStatus != 'Reject' --> create attribute, element for output file
    Else OrderStatus = 'Reject' --> do not create attribute/element ==> output is the empty file.
    Requirement: if OrderStatus = 'Reject' --> do not create any output file.
    how to do with this requirement?

    I'd ask them over here.
    http://forums.asp.net/
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Accessing digital inputs from signal express (TEK MSO2024)

    Hi,
    i'm trying to access the digital inputs of an TEK MSO2024 from signal express, but no luck.
    I'm using SignalExpress2011, tkpdo2 ivi driver.
    Seems like this driver doesn't support digital input, anyone got a solution or another driver?
    *edit
    topic can be deleted
    on another system DI works...
    Regards
    alex

    Hello,
    The best to way drive digital outputs while acquiring analog inputs is to create two steps in Signal Express. Each step will execute relatively at the same time but there is no way to correlate or synchronize DIO with AI on a 6008 because DIO on that device is software timed while AI is hardware timed. Below is the 'Getting Started with Signal Express' manual which can aid in creating an AI and DIO step. Also, if you need additional examples later, they are located in the Help->Open Examples.
    Getting Started with LabVIEW SignalExpress
    http://www.ni.com/pdf/manuals/373873e.pdf
    Regards,
    Patricia B.
    National Instruments
    Applications Engineer

  • TTL signal Frequency

    I am measuring the number of edges (per second)of a TTL signal to calculate the RPM of 2 gear drives. I get a random error due to software timing. I cannot use hardware timing as my PCI6014 card has just 2 counters. I have tried all other methods(period,pulse mesurement)using counters.
    I have now connected my TTL signal to my AI channel0 and I am scaning it 10000 scans/ sec. I am then passing this waveform to single tone extraction vi to find out the frequency of my input TTL signal. But I get a totally different reading as my frequency. I get some frequency value even when my shaft does not rotate.I also tried the period,duty cycle using another VI available in waveform analysis palatte.
    I eliminated all noise in the input signal by representin
    g my input signal as an integer. So my input signal would be either 0 or 5V.
    Is this the right approach? Or am I messing up.Please suggest the best way to measure frequency of a TTL pulse without using a counter.

    Hi Balaji:
    Please look at the example I am attaching with this post. Please keep in mind that you have to sample at least 10 times the frequency of your incoming signal.
    Try connecting a simple square wave to analog input channel from a function generator and see if you can measure its frequency.
    Regards,
    Bharat Sandhu
    Applications Engineer
    National Instruments
    Penny
    Attachments:
    freqMeasure.vi ‏38 KB

  • Count only when a external TTL signal is high

    Hallo,
    I'm using LabView 6.1 on WinXP with a NI6014 DAQ Board...
    I have to count a some TTL pulses only when another TTL signal is high (start the count when the signal goes high and stop it when the signal goes low). Can I program the DAQ to do this (like a gate function) so that in the meanwhile my program can do other things, and only at the end I read the result of the count?
    Thank you,
    Pixo

    Hello Pixo,
    Thank you for your inquiry regarding counters on the PCI-6014. It sounds like you would like a gate function for the counter that you are using. There is a gate for each counter that enables the counter when the gate line is high and disables the counter when this line is low. The I/O connector pin assignment and signal descriptions can be found here . To use the counter you must first configure it and then use a Counter Start VI. Then when the gate is high the counter will increment and the value can be read at the end of the program like you had stated. I have attached a great example VI to get you started with counters. Other examples like this can be found in LabVIEW 6.1 under �Find Examp
    les from the LabVIEW startup screen.
    I hope these resources help. Let me know if I can further assist you.
    Shea C.
    Applications Engineering
    Attachments:
    Getting_Started_Counters.vi ‏64 KB

  • 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.

  • How to use counter output pulses to trigger analog input?

    Hello all,
    I hope the kind people using this forum can help me, a lowly beginner LV programmer! I have been attempting to create a VI that produces a user defined number of TTL pulses, separated by every n seconds. Each TTL would be outputted to a stimulator, which in turn generates its own TTL. Using the stimulator-generated TTL, I would like to trigger finite analog data acquisition (e.g. for every TTL, trigger the collection of a data sweep that contains 4000 samples (collected at 4000 Hz), with 1000 samples collected pre-trigger. I would like to also be able to see each data sweep as it is triggered on a chart. As I understand things (lots of online/book/forum reading), I should be using the counter output to generate my TTL pulses, and syncing each counter produced TTL with analog input, as well as using a reference trigger. Also, the AI part should be started first, so that I don' t miss any counter outputs. If it matters, I also need to use one of the AI channels to acquire the TTL, so I can see my stimulator-induced responses to the stimulator in time.
    I am able to generate the TTL pulses from the counter output, but I am having a problem with the AI part. I am unsure how to sync the counter output with AI. Also, since I need to acquire pre-trigger samples, I would be needing to acquire samples continuously, but when I set 'continuous samples' on daqmx timing, the VI doesn't work (hence why's its set to 'finite samples').
     I hope someone out there can help, as I have been at this for what seems ages, with limited success. I am using a USB-6259 and LabView v8.2. Thanks!
    Attachments:
    RC001 v_1.vi ‏49 KB

    Hello,
    Due to the fact that analog tasks themselves are not retriggerable, a
    pulse train produced by a counter is always used as the sample clock
    for the analog input task in order to recreate a retriggerable effect
    for analog input. This can be done by creating a finite pulse train set
    to retriggerable using the DAQmx Trigger Property Node, or the pulse
    train could be continuous and just be gated by another signal. Neither
    of these methods can be properly applied in hardware to create a
    retriggerable reference trigger. You can however implement something
    similar in software by just stopping and restarting your reference
    triggered analog input task within a loop. There will be some delay
    between when the task is stopped and restarted, as these events require
    software intervention, but if there is enough time between when each
    trigger signal is generated, there should not be any noticeable delay
    or missed samples.
    I have attached an example of this!
    Mark B
    ===If this fixes your problem, mark as solution!===
    Attachments:
    RC001 v_1mod.vi ‏25 KB

  • Generating TTL output pulses

    Hello,
    I have actuators driver which controlls 5 actuators through 10 inputs (two inputs per actuator for open/close). Each line is pulled up to +5V internally. This allows the controller to be operated using open-drain (open collector) sources. The actuator moves when a corresponding input is drained. I need a DIO PCI card to control the driver with TTL pulses of ~2s duration. I was thinking about having all 10 digital outputs powered up to +5V when the card is configured for the output and then selectively write digital low to a channel I need to drain to activate the actuator, living the rest 9 channels at +5V load. Could you please advise me on what DIO PCI card I should use to do that? Any other alternative solutions to my problem?
    Thank you in advance,
    Albert

    Just to make sure I understand everything the “actuator” is the one that has to be controlled by an “open collector” source? since a line driver is a sourcing output, an open collector is a sinking output and a push-pull output is a combination of a line driver and an open collector. Because you need and open collector, click here for more information, I would suggest a NI PCI-6220 since you get 32 digital inputs and outputs, than can handle sinking and sourcing i\o and  you get the additional 16 analog input lines, and counters. But that is my suggestion and since you will probably have a lot more specification that have to be fulfilling the best thing to do is use our search engine, Data Acquisition (DAQ) Hardware, or get in touch with our sales department.
    I hope it helps
    Jaime Hoffiz
    National Instruments
    Product Expert
    Digital Multimeters and LCR Meters

  • How to create 2 output signal locked in phase from a one input signal

    Hi all,
    I have a case in which I want read in a signal analog input (voltage) from a photodiode, I want to create a 2 sinewave signal locked in with same phase as the input signal and output them as analog output to my 2 laser diode. the frequency of the input signal is low aroud 15 Hz , the 2 output signal i want to be  around 120 hz and 150 hz . 
    I am using USB - 6003 daq card.
    I have created a vi to see the input signal but I dnt know how to create 2 signal from the waveform generator locked in the phase as the input signal. I have seen a PLL vi , but dont know how to use that with my program.
    can any one tell me how to proceed.
    thanks
    AG
    Attachments:
    pulse_PLL.vi ‏27 KB

    Hi AnkitG,
    Here are a couple of links that might help you understand a little more how the PLL work and a way to synchronize the task to perform a PLL.
    http://digital.ni.com/public.nsf/allkb/07BC8D77D4E9AE258625708B007CE74F?OpenDocument
    http://digital.ni.com/public.nsf/allkb/2F675A9F2162EA24862572570059A308?OpenDocument
    Also, you should be able to find a lot of examples on how to accomplish the synchronization of tasks on the community, if you consider that the only consideration is that both must start at the same moment. 
    I hope, these examples might show you some useful concepts:
    http://digital.ni.com/public.nsf/allkb/EBD603683446EC13862575B3006A63A2
    http://digital.ni.com/public.nsf/allkb/9E71F8D7D3CD1B0886257688004AE353
    Regards,
    Luis C.
    National Instruments

  • How do I program a NI 6602 card to send trigger pulses, one at each output port, triggered by an input trigger signal, using only one counter for each output port?

    Hello,
    I have managed to program a NI 6602 card in LabView to send pulses on three different output ports, one pulse on each output port (with individually chosen delays) for each input trigger pulse coming on a separate input port. It is the DAQmx Create Channel (CO-Pulse Generation-Time)-VI that I have used for this, see attached code. However, this VI controls both pulse delay and pulse width, and therefore uses two counters for each output port (although you only specify one counter in the VI input signals), as I understand.
    In my application though, I only need to have the delay chosen, the pulse width can be arbitrarily short, and thus I should only need one counter for each output port. How do I accomplish to program this in LabView?
    Best regards,
    Claes
    Attachments:
    Configure Side Camera Flash 1 Triggering.vi ‏47 KB

    Well you're welcome to do that--it will work just fine as long as you are configuring a start trigger.
    <rant>
    However, personally I really don't like putting multiple counter outputs in the same task.  I have seen so many people assume that the counter outputs would be synchronized due to having them in the same task when this is not the case (you need to configure a start trigger in order to synchronize the counter outputs even if they are in the same task).  This is the only case I can think of where multiple channels in a DAQmx task are not automatically synchronized.
    As an example:
    Running this on my PCIe X Series gives a measured 2 edge separation of 1 ms + {7.78 us - 10.11 us}.  This would likely be much worse on a bus with more latency (e.g. USB).
    The resulting output is close enough to what you might expect that it might go unnoticed, but really these counter outputs are not synchronized and it would be easy to glance at the code and not even think twice about it.  For the small amount of extra work on my end to create a separate task for each counter, it really clears up some ambiguity about what the counters are actually doing.  For me it's worth it.
    So again, for your case there really isn't a problem with having the counters in the same task since you are using an external start trigger anyway.  I have just gotten in the habit of avoiding doing this.
    </rant>
    Best Regards,
    John Passiak

  • PID Control - analog input, digital outputs

    Hello everyone,
    I am trying to use the PID toolkit to convert my existing feedback control system to one using PID or just PI whatever works best. Problem is that the tutorials out there discuss in detail about obtaining Analog inputs and using the PID output to control an analog output. Are there any tutorials that show how I can control my process variable which is an analog input by using the PID output to generate digital outputs?
    Basically, what I am doing is controlling the incline of my device with two digital outputs that control two solenoid valves. The angle is calculated from a calibration curve that plots distance sensor voltage with Angle. Any help would be immensely apprecitated. I want to try this out on my own before I post some vi's. Thanks!
    V
    I may not be perfect, but I'm all I got!

    That is exactly what I am doing currently. I have error bands specified around the target to make sure that it doesn't oscillate. But, under load conditions such as pulsed load conditions, the device goes out of bounds and the values trigger to correct for it. But, what I need is seemless or atleast seemless correction. Currently what I see is sudden adjustments to the incline. Please find attached what I am currently using. I am trying to get a more finer solution if at all possible.
    Note: Within 5% of the target = NO action
              Between 5% and 15% = Pulsed ACtion ( DO On for Pulse width time)
              Greater than 15% = continuous action until it reaches Pulse band
    I may not be perfect, but I'm all I got!
    Attachments:
    TDML_subElevationControl.vi ‏41 KB
    TDML_subPulsedValveFuntion.vi ‏16 KB

  • Trouble specifying TTL for digital outputs from PCI-6221

    Hi!
    I'm trying to generate TTL output signals using a PCI-6221 daq board - within Labview, I'm using DaqMx to create two digital waveforms and then write these. When I plug in an oscilloscope, the shapes/frequencies of the signals are correct, but the lower value is 0V, and the higher value is 1V, rather than the TTL values. Is there a way to specify these voltage levels to TTL within the software? I see from NI help that "do.logicfamily" exists to specify TLL, but when I add a property node and connect it to the channels, I do not see Logic Family as an option under "digital output." Let me know if you have any ideas!
    Thank you,
    Emily

    Set your oscilloscope to use 1MOhm impedence.  Your problem is that the maximum current for those DIO is 24mA.  1V/50 Ohms = 20mA.  So you are current limiting the digital outputs.  If you need more current, then you need to add in some digital buffer chips that can output more current.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to combine Digital Output, a delay and Analog Input in a fast loop

    I need to develop a process loop that runs at least at 250 Hz that performs a Digital output, than a delay of 50 microseconds and than an analog input of all the channels. All will be done using ATI MIO 64E3 card. Of course, the acquired data will be processed, displayed and saved. The loop will be running for several minutes until user stops it.

    The fastest and most precise timing will occur if you use hardware timing. You can apply hardware timing to analog input on the E Series boards, but not the digital lines. Let's focus on the analog input first. Continuous waveform scanning uses a scan clock, which can be the board's internal one or an external one which you apply. If you want to scan all the channels 50 microseconds after a digital rising edge, then you need an external signal to signify that scan clock.
    The E Series boards also have 2 counter/timers onboard that you can use for this purpose. You can set up a retriggerable pulse generation operation, where the counter receives a trigger and then on the user specifications, produces a pulse. You can have that route to the analog input scan clock.
    The trigger signal for the counter is that digital pulse. As I mentioned earlier, there is no hardware timing for the digital lines on an E Series board. We do have other digital boards (653x family) that have hardware timed operations if precision is important. If you are satisfied with software's resolution (in the milliseconds), then you can call the E Series board digital function in a loop with a software timer. That digital line can route to the counter to act as the trigger.
    So, on the programming side, you can have three separate and independent operations in parallel. One is for the digital function to output on that line every so often. Another is for the counter set at the retriggerable pulse generation. The last is for the analog input. I will describe this in terms of LabVIEW, but it can be done in a similar fashion with the NI-DAQ function calls or Measurement Studio.
    The digital examples are in the LabVIEW >> Examples >> Daq >> Digital >> E-Series directory. The Generate Retriggerable Pulse example is in the LabVIEW >> Examples >> Daq >> Counters >> DAQ-STC directory. The E Series boards use the DAQ-STC timing chip.
    Go to the LabVIEW >> Examples >> Daq >> anlogin >> strmdisk.llb directory and start with the Cont Acq to Spreadsheet File. This shows how to continuously acquire data and stream it to disk while displaying the data on a chart. Streaming to disk is the efficient way to save data while you are acquiring, as it eliminates the overhead of always opening and closing the file through the iterations of the loop. This saves to a file that can be opened by other applications (Excel, Word, etc.), but it is not as fast as writing to a binary file, which must be opened and read back through LabVIEW. However, for your ~250 Hz rate, it should be fine. Then, go to the LabVIEW >> Examples >> Daq >> anlogin >> anlogin.llb and look at the Acquire N Scans -ExtScanClk example. This shows how to apply the scan clock. Here, the AI Start that you saw in the previous example is replaced by 4 VIs (3 AI Clock Config's and the AI Control). Make those changes to the first example and then add a constant 0 to the AI Control parameter for total scans to acquire. That specifies the continuous operation. The File >> VI Properties >> Documentation menu item of the example describes the physical connections.
    If you aren't using LabVIEW, use the NI-DAQ User Manual and the NI-DAQ Help file installed on your machine. You can look at your AT E Series User Manual at the http://www.ni.com/manuals pages for more information on the hardware. Also, if you want to route those signals internally on the board, you can find some entries in the KnowledgeBase at the http://www.ni.com/support pages.
    Regards,
    Geneva L.
    Applications Engineering
    National Instruments
    http://www.ni.com/ask

Maybe you are looking for

  • Issues with NSAPI connection before/after SP3

    I'm using WinNT 4.0 sp 5, Weblogic 5.1 sp3 and Netscape 4.1 Server. (Note:           I have do not have these problems on Solaris)           I've been having a problem on an off with some jsps that I have written.           They call session beans wh

  • Switch On Time Mac Pro 5.1

    Hello, i have a Mac Pro 5.1 Mid 2010, 2 x 2,93 Ghz. When i switch on my Mac Pro with a RAM-Configuration of 4GB, it takes about 4 secounds to see the grey screen with the Apple-Logo. A RAM-Configuration of 24GB uses about 24 secounds to see the grey

  • Hidden files appear in finder but I can't see them on my desktop

    I have been having this recurring issue where when I have a Finder window open, I can see several files when I click on my my desktop sidebar icon, but when I try to find them on my desktop they do not show up anywhere. What is going on? Is it someth

  • Satellite Pro A300 - Freezes in normal mode

    Before I proceed, I wanna say that I'm no expert at computers. All these technological terms doesn't really make sense to me. Hi. I am currently typing this on Safe Mode as if I start Windows normally, the laptop would simply freeze and will not resp

  • Restrict Plant Posting

    Hi, I have a scenario in which I have to restrict plant posting when i am posting company codes. Lets us say, I have to post a journal entry for a company code A and plant 1 only. We should not allow users to post journal entries other than Plant 1 w