Generating a digital signal

Hello,
I am trying to  generate a digital signal which can be controlled in terms time i.e. Switching ON for 10 minis off for 5 minutes. I tried to generate a digital signal which is going high but unable to control it. As I am the beginner in labview any kind of help is appreciated.
Please see the attachment for the developed block diagram
Attachments:
digital signal generation.vi ‏17 KB

It appears that all you posted is one of the shipping examples. Is that all you've tried? You can't control it because you're not actually doing anything inside the loop. You're simply setting the value high before the loop starts, and not changing it in the loop. What kind of device do you have? Is it software controlled? If so, you will need to keep track of the time inside the loop. You can use the Elapsed Time VI to do this. Attached is a simple example to get you started to see how this can be done. I'm sure you can figure out how to integrate what you did and what I've shown you.
To learn more about LabVIEW it is recommended that you go through the introduction material, tutorial(s), and other material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.
Attachments:
Switching signal.vi ‏29 KB

Similar Messages

  • MyDAQ - Generating a digital signal and displaying it on an analog waveform graph

    Hi,
    I am using the NI MyDAQ to generate a digital waveform with an adjustable frequnecy. This is being implemented into a program I have already written which generates a TTL "like" pulse out of the sound card. I am displaying the output on an analog waveform graph, and I'd like to be able to display the digital waveform generated by the myDAQ on the same graph. (Not at the same time, either one or the other, toggled by a button). I've been messing with arrays and conversions but I cant seem to really get anywhere with it all.
    This is the vi I have made to generate the adjustable frequency digital signal with MyDAQ. Any suggestions on the proper way to do this if the following is wrong would be great too as I just got the MyDAQ a few days ago. I would think there must be a better way but this is the best I could come up with so far.
    Solved!
    Go to Solution.

    Hi Jonny,
    The general logic you are using to create a digital pulse train is fine. This VI you've written should work and will create the pulse train based on software timing (which is fine because you don't have hardware-timed DIO on the myDAQ anyway). However, it is usually good practice to start the DAQmx task just before your while loop and then clear the task after the while loop when you press stop.
    For reference, there are some pretty good LV examples that I recommend looking at for this application too. If you are just trying to create a digital pulse train, the example Gen Dig Pulse Train-Continuous.vi is a good example that uses a counter to create a digital pulse train of your desired frequency. This is generally the prefered method to create a pulse train if you have the hardware available to do so (the myDAQ does have a counter). Alternatively, there are some DIO examples that continuously write to a digital line/port.
    If you're not familiar, you can find the examples by going to Help >> Find Examples... in LV. Then, navigate to Hardware Input and Output >> DAQmx >> Generating Digital Pulses or Digital Generation.
    Also, here is some additional information about the myDAQ and its counters:
    myDAQ Counters 
    myDAQ Manual 
    Hopefully this helps.
    Chris G
    Applications Engineer
    National Instruments

  • Generate digital signal for 6722 or 6221

     Hi,
    first thanks for the help I already got on this board.
    Now I've got the following problem:
    I like to generate a digital signal: high for 300µs, low 300 µs, high 300µs, low 300µs, high for about 2ms.
    I am looking for a solution how to generate this digital sequence. At the same time I will read the information back via an analog input (hopefully I have now a solution for this problem).
    I tried to find examples but I wasn't successful. At the moment I was not able to produce any digital sequence which worked.
    My hardware is either 6722 or 6221 - which should be OK regarding the timing.
    Thanks
    Solved!
    Go to Solution.

    Find attached example.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.
    Attachments:
    Digital Waveform [LV 2009].vi ‏14 KB

  • How to check 6 digital signals change value at the same time with PCI-6229??

    I am using DAQ card PCI-6229.
    Channel 1 generate a digital signal.
    Channel 2,3,4,5,6,7 acquire digital signals.
    I want to check:
    1. Whether the rising edge of Channel 2,3,4,5,6,7 occures at the same time;
    2. The time delay from the rising edge of Channel 1 to the rising edge of Channel 2,3,4,5,6,7 is within a certain range.
    I know I can use counter to get the two edge seperation time delay. But I only have two counter, it is two time-consuming if I check one by one.
    I don't know how to check the rising edge of 6 different channels occure at the same time.
    Does anyone has any suggestions?
    Thanks

    Hello,
    You can use the DAQ card's digital input change detection circuitry to detect changes in the input, you can then use a counter to measure the relative time between samples. Please read Page 6-9 DI Change Detection Applications for more information. Let me know if this helps
    Christian A
    National Instruments
    Applications Engineer

  • DIGITAL SIGNAL GENERATION

    Hi!
    I want to generate a digital signal (0-5V) in order to turn on and off an hydraulic pump. The time on (high) and time off (low) are specified by a MatLab code, so that once the pulse has finished one cycle, the program should be go again to MatLab code and take two times again. Then it should generate the signal again.
    Thank you for the help.
    Miguel

    Thanks for the reply.
    I have a system with an hydraulic pump, power supply, transistor and computer. I would like to send a digital pulse from my computer (0-5V) to the transistor. The transistor then closes a circuit (power supply and pump), and the pump starts running.
    Then, I would like that each sample (each pulse) has specific width (time on), and also specific time off before it starts with other sample. These times (time on and time off) are computed by a MatLab code.
    I'm working with DAQmx drivers and I also have a BNC 2110.
    I also attach my code in Labview that I am trying to modify.
    Thanks a lot.
    Regards,
    Miguel
    Attachments:
    Gen Dig Pulse Train-Finite_original.vi ‏22 KB

  • How to output a digital signal on negative slope of the clock?

    Hi
    I need to output a finite length of the digital pulse which will start on demand at the negative slope of the imported (or exported) clock.
    I am trying to get the clock exported or imported, but in no case I can trigger outputting the signal on the negative slope. 
    What is the trick?
    thanks
    Pawel
    Solved!
    Go to Solution.

    Which device are you using to generate your digital signal.  What is the clock source?  Can you attach your vi?  Normally, there is a DAQ function to configure the trigger where you choose the trigger source and the trigger slope (rising or falling), which would be falling for a negative slope.
    - tbob
    Inventor of the WORM Global

  • Digital signal generation in cDAQ- 9477 with 1ms resolution.

    I am using cDAQ -9477 Digital card with 9178 chassis (USB) .I have to generate some digital signals for 2 seconds. The signal should be
    0 (3ms)  -   1(1ms)  -    1  (2ms)   & repeat the sample 0 (3ms)  -   1(1ms)  …….  upto  2 seconds.
    I had generated samples for 2seconds with 1ms duration of each sample.
    I am unable to do that with 1ms resolution in cDAQ -9477 Digital card.
    Is the above signal generation is possible (each sample -1ms) ?
    I am using LabVIEW2009 .I attached the code.
    Kindly let me know the suggestions .
    Attachments:
    Digital Signal.JPG ‏7 KB
    Digital.vi ‏40 KB

    cDAQ chassis do not currently support hardware timed tasks for digital modules with >8 lines.  The DAQmx help defines these devices as "static digital I/O modules".  The "Digital I/O Consideration for C Series Devices" section in the DAQmx help describes the capabilities of digital modules on different chassis.
    Unfortunately this means you are stuck with static (software timed) generation.  Over USB this will affect the accuracy of your signal.  You won't be able to achieve the signal you are trying to generate with the current support.  Static generation will max out at roughly 1kHz, but Windows can introduce a large amount of jitter.  What you really need is a hardware timed task.
    This is a feature that could be added in the future.  I recommend submitting a feature request, though I know that doesn't solve your problem now.

  • Is there a better way to generate custom timed digital Signals

    I am trying to generate digital output of high and lows with particular delays on different lines. Each daq assistant is activating single line on a port on USB 6501. There more complex high and lows that I need to generate with variable time difference between high and low. There is codebelow which accomplishes what I am trying to achieve but for executing a long pattern of high and low signal is very time consuming to do this way. I am sure there is a better way to do this, I  not a expert on labview so I haven't uncovered its full potential. Can anybody suggest a more effective and a quick way to do this. I would hgihly appreciate. Thanks!
    I have not shown in the code below but through DAQ assistant I have initialized lines to low level logic.
    Solved!
    Go to Solution.

    See the attached file
    Attachments:
    Digital Signal.vi ‏335 KB

  • Generate complement​ary digital signals with dead time between each pulse and controlled by duty ratio

    I am to generate  two complementary digital signals using NI 9606 conected by RIO Mezannine Card to NI 9683 (Half Bridge DO).
    I am able to generate the signals but I am not able to put dead time between high and low signal and also, low and high signal.
    Requirement:
    (1) When the first signal goes high and the second signal goes low, there should be a controllable dead time.
    (2) Also when the second signal goes high and the first signal goes low, there should be a controllable dead time.
    I am able to do requirement 1, but I am unable to fulfill requirement 2.
    Please have a look at my VI and let me know how to go about satisfying requirement 2.
    Attachments:
    complementary test 2.vi ‏69 KB

    Hi Frank ,
    I have already taken note of the example Tannerite has provided  and have built my vi ( attached in previous post) surrounding that example.
    Now I require to control the PWM duty cycle as you can see from the vi using a knob and that control refers to both the signal 1 and 2.
    Now the signal 1 end and signal 2 generation requires a controllable dead time. Similarly, signal 2 end and signal 1 geneeration also requires another controllable dead time.
    I am able to do either one dead time at a time using delay but not two dead time simultaneously.
    I feel that I have two put the delays at the appropriate data flow point. I am working on that.
    I would really appreciate if you could give some insight on how to solve this dead time issue and generate two complementary waveform with dead times whose duty cycle can be controlled by a knob controller in fronty panel .
    I have also posted the required timing diagram for reference as suggested by Tannerite.
    Best regards.

  • How to control individual channel of signal generated from digital waveform generator?

    Digital waveform generator has 8 channels. I need to generate two different signals to HSDIO. How to modify and control two different channels? Also, how to translate pin outs from PXI-6541 to channels? I need to control signal into pin 1,3,29,and 31 individually.
    Thank you!!
    Solved!
    Go to Solution.

    You must combine your individual data into an array.  The digital waveform is simply a digital representation of the binary array.  It still boils down to bit 0 of each array element going to channel 0 (or the first channel you specify in Create Dynamic Channels).  The next bit goes to the next channel.  My last post is quite clear.  To display the array in binary, right click on an array element, then select Display Format, then select Binary.  You can also right click on the element, select Visible, then select Show Radix to display the small b before the number.  One more thing, in the Display Format window, uncheck the box next to Use minimum field width.  Then set the numeric just under the box to 8.  Then select Pad with zeros on left in the box below.
    You should not use waveforms until you learn more about how the HSDIO operates on input data.  It isn't hard to combine waveforms, but it also isn't as clear as using an array of U8 or U16 or U32.
    Trying to explain further.  The first number to be writen to the HSDIO will have this effect:  Bit 0 (LSB) of the number gets written to the first HSDIO channel you specify.  Bit 7 goes to the 8th channel you specify.  If you don't specify 8 channels, the bits get ignored.  So wiring in one number will produce only one bit on each channel.  In other words, the number already combines the bits of all the channels you specify.  You don't combine anything yourself.  Look again at my picture on my last post.  By wiring in an array, you cause a bit pattern to be generated.
    I hope this is more clear.
    - tbob
    Inventor of the WORM Global

  • Generating digital signals (T/F) continuosly at certain frequency

    Please help me in generating digital signals continuously (TRUE/FALSE alternatingly) in LABVIEW 7.1. I want them to be crreated at frequency which can be controlled by myself. Kindly help its urgent. Contact me at [email protected] Thanks Rahul

    Have you looked at the shipping examples for DAQmx? What kind of DAQ card do you have?
    p.s. since all questions are answered here, posting your email does no good except put you on a list of spammers.

  • 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

  • Can we design analog to digital signal conversion block diagram (ADC) in labview

    hi every one,i've doubt i.e can we convert function generator output (i.e analog signals) to digital signal in labview......can anyone help me how to create ADC circuit that means ADC Block Diagram in LABVIEW.....please give me solutions for my problem

    Hi guru,
    from signal generation VIs you get arrays containing float values (aka DBL). Those floats are just digital values made of 0s and 1s…
    Any value in your computer is digital!
    To provide a solution you need to rephrase your question! What exactly do you expect as result of your operation?
    Edit: kkkkkkk ur ckt ???
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Measuring digital signals coming from the HSDIO (PXI-6542) with the DMM (PXI-4070)

    Hello,
    in attachment you can find the program I'm using for my measurement: I'm generating and acquiring digital signals with the PXI-6542 and at some trigger point of one of those digital signals I'd like to capture the measured values on a plot with the Digital MultiMeter (PXI-4070).
    It does work if you configure the generation repeat mode as continuous, but if you do have a finite repetition (repeat count is 1) it doesn't react on the trigger, as if it can't find a trigger. On the other hand, if you have a finite repeat count of 30 or more it does react and triggers correctly again.
    First I though it had something to do with autocalibration before the measurement takes place, but If you do a highlight execution (stepping through the program) it looks like it measures before the generation session is initialized.
    Is there a way to measure correctly when the repeat count is only 1?
    Thanks in advance,
    Jürgen

    Hey Jürgen.  I apologize that you haven't gotten an answer yet to your post.  I looked at your code and had some questions.  What is the source of your trigger to your DMM?  I see that you're exporting the data active event to PFI1, and your comments indicate that PFI1 and PFI2 are connected to give you a start trigger for your digital acquisition.  Exporting the data active event with a finite or continuous pulse should only give you a single edge per run, though - you wouldn't get a pulse each time.  Is your trigger coming from a data line?  I didn't see any line in your included data that would indicate a single pulse.
    The other thing that I noticed is that you've got no timing dependency between your HSDIO code and your DMM code - they're in parallel with each other.  Thus you could get different results run-to-run, since it's not deterministic as to which parallel "thread" that LV will start on first.  LV may switch back and forth several times, but let's say that LV reaches the HSDIO Start command before reaching the DMM Start command - in that case, the HSDIO device may finish it's entire operation before the DMM ever starts looking for a trigger, and thus never get the trigger at all.  I'm not sure why this would explain why you're seeing the finite case work and the continuous case not, but I wanted to point it out because it could bite you down the road.
    I hope some of this this helps get you going in the right direction.  I'd also suggest posting HW-centric questions in the appropriate form.  There are Digital forums and DMM forums that might help you reach people that will be more familiar with your particular hardware.
    Chris

  • Generating arbitrary digital waveforms

    Hello,
    I'm new to the world of hardware-timed digital signals, so I'm unsure of how to proceed. I have a cDAQ-9174 and a NI 9474, which I'd like to use to produce two periodic, synchronized digital signals:
    What's a good way to accomplish this? I found the DAQmx "Generate Signals" -> "Digital Output" task, but that seems to only generate uniform pulse trains, not the arbitrary waveform I'm looking for.
    Thanks in advance.

    Ok, one step closer to the answer. DAQmx Write.vi (Digital Wfm 1Chan NSamp) lets me define an arbitrary waveform for 1 channel. How do I specify waveforms for two channels?

Maybe you are looking for

  • Is my External HDD about to fail? Help!

    I bought a WD my book for mac 1TB, towards end of Jan. I have a 2008 13" unibody Macbook running Snow leopard 10.6.2. the external HDD had been working perfectly fine with time machine, backing up regularly as it should without any issues. However to

  • Datafiles sizes increased while importing

    Dears, I need to import HR dump from database 1 into database 2. I knew how to do this but while importing, i faced some problems regarding to space issue in database 2. I had to stop importing to increase space. after i did this , i repeated importi

  • File Adapter help required.

    Hi All, My scenario: I have source txt file that is seperated by semicolon. I need to do Receiver determination that for some value it shoud go to Receiver A and for other value it should go to Receiver B. File that is reaching Receiver A and Receive

  • Update from 10061 to 10074 not working

    I started my PC 3 hours ago for the first time today. I left the room and came back 20 minutes later. The screen was black and no reaction to mouse or keyboard. I had to long press the power button. It started successfully and before I did anything I

  • Conditional Lookups in MDM?

    I'm an MDM newbie, just learning my way around, trying to figure out how I will be able to make MDM work with the data landscape we have around here. My question today is, is it possible to have what I will call a "conditional" lookup for a field?  T