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.

Similar Messages

  • Digital input and digital output at the same time

    Hi all
    I have a PCI-6503 board. I have done 2 task that run simultaneously: the first one is port0_16 output and the second one is port2 input.
    I get sometimes (not every times...this is strange...) error-200587 saying:
    'Requested operation could not be performed, because the specified digital lines are either reserved or the device is not present in NI-DAQmx.
    It is possible that these lines are reserved by another task, the device is being used through the Traditional NI-DAQ interface, or the device is being reset. You might also get the error if the specified resource is currently in use by LabVIEW network variables bound to the DAQ Channel, or if the DAQ Channel is being used in any OPC Client software.
    If you are using these lines with another task, wait for the task to complete.  If you are using the device through the Traditional NI-DAQ interface, and you want to use it with NI-DAQmx, reset (initialize) the device using the Traditional NI-DAQ interface. If you are resetting the device, wait for the reset to finish.'
    In the attached VI i have recreated the basic structure of my real VI (the error is present even here of course...).
    How can i do?
    I want to have both digital input and digital output with the same PCI-6503 every single cycle... Is it possible?
    Please help me!!!
    Kind regards.
    I love the smell of napalm in the morning
    Attachments:
    DIO simultaneously error.vi ‏31 KB

    Hello Maverick,
    Did you have any luck with the example Raven sent you?
    In Raven's example, it properly passes the DAQmx task from one SubVI to another to avoid having to open the task again. These errors are likely to occur when you have multiple DAQmx calls in a VI that call the same task again without clearing the previously opened task. If at any given time you try to open a task that already is being used, you might receive an error "resource is reserved"... similar to your original example.
    If you are interested, here is an awesome link that gives a detailed explanation of the LabVIEW dataflow paradigm
    Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications
    Thanks and good luck!
    Jordan Randall
    National Instruments Italy

  • How to count the no of digits entered in the NumericField & print the same

    Hi!
    How to count the no of digits entered in the Numberic Field and print the content of Numberic Field.
    Thanks.

    Hi Venkat,
    To check the number of digits, just convert it to a string and use the length() method. to get the number of characters. However, I am not getting your second point of printing the number?
    Kindly explain in detail.
    Regards,
    Poojith MV

  • 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

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

  • Routing counter to PFI line/ not routing counter to any external port - How is it done?

    Hi!
    I am using a counter to create a sample clock for digital output. The counter looks just like the one in the example attached.
    I now discovered that the counter frequency is routed to PFI12 of my NI6259. I don´t know why, I haven´t done this. I don´t want the counter at any external line because it causes interferences.
    If it is not possible to route the counter to no port, how can I route it to another port? I did not find any answer in the knowledge base to that question.
    Thanks for your help.
    Best regards,
    Yopp
    Attachments:
    corrDIO.vi ‏54 KB

    Thanks for the replies!
    I tried the signal routing, but it doesn´t work as I expected. I routed PFI12 to PFI 15. Now the signal is at both outputs. Even if the deactivate or delete the signal routing VI it stays that way.
    If there is a possibility to route it and get rid of it at PFI2, I would choose one of the PXI trigger lines, as the are not in the screw terminal
    I attached the signal routing example I made, could you have a look at it, maybe I did it wrong?
    Attachments:
    Routing signals.vi ‏8 KB

  • 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

  • HT5783 My MacBook Pro (Mid-2009) digital output has stopped working. It turns on the red light at the other side of the plug, but fails to connect with my receiver. Output from Airport works fine.

    It was working fine until now, and now suddenly, the sound is gone. I've tried PRAM and SMC reset. Nothing works.
    Using the same cable with my airport express, through airplay, the sound comes out fine.
    It wasn't working when on Mavericks, nor now, on Yosemite.

    Hey marcalc,
    Thanks for the question. I understand that you are experiencing issues with the digital output of your MacBook Pro. The following resource may provide a solution:
    OS X Mavericks: If you can’t hear sound from your speakers
    http://support.apple.com/kb/PH13841
    If you’re trying to listen through a digital receiver
    If you’re using your computer’s digital output port (not available on all computers), choose Apple menu > System Preferences, click Sound, then click Output. Make sure Digital Output is selected.
    Make sure your computer is connected to a digital-ready receiver using an optical digital cable, and that your receiver is set up for digital input (see the information that came with your receiver).
    Try adjusting the volume on your receiver. You can’t use the computer’s volume controls to adjust the volume while using digital output.
    Thanks,
    Matt M.

  • 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

  • Digital Output problem once again (WIN XP, Audigy

    I searched the forums with no luck, actually I searched the whole internet with no luck - so far.
    My problems in a nutcase:
    - I can't find the button for Digital Output (the one which enables it, Windows XP's sound mixer used to have that option with some ?windows build?, but I can't find it since I installed creative drivers, it's just gone...).
    - If I find the digital output on-button with your help, is it even possible hear music with add-ons trough digital-optical cable or should I buy some mono-cable? :O
    To be specific:
    I have the Creative Audigy 4 Bulk, which of course supports SPDIF Digital output. I bought expesi've optical cable that I could finally use my hifi 5. speakers with movies trought computer. I have new 700 euro amplifier, and it supports everything, so the problem isn't with that one, anyways, let's get touch with the real problem.
    What ever drivers I'm using, I can't find the digital output section anywhere. Creative drivers has one SPDIF-button, but it affects nowhere. So, I can't even get the Digital Sound on, because windows mixer has no button for that with my windows xp, weird. I also tried to install windows vista, and there wasn't either any options, where I could put the digital output on.
    Which drivers and which add-ons should I install to get that Digital Output to work.
    If I manage to find the button for digital output from some drivers, can I also listen music while it's connected via optical-digital cable, or am I just able to hear sound from dolby digital movies? Is it even possible to get everything work with my optical cable (music/games and movies at the same time).

    . Your card doesn't have optical output, only "coaxial" digital. You will need a stereo (or camcorder) cable with one mini jack on one end and 2 (or 3) RCA connectors on the other. The white RCA will be the one you need.
    The setting is on the "Creative AudioHQ" at the "Surround Mixer" selection. It is called "Digital Output Only". Or if you use the little icon on the taskbar, at the "Speakers" on "Speaker Selection" you have the same option (a check mark under the selection of speakers).
    2. If you read the FAQ, you will get surround sound (5.) ONLY from DVD-Video that are encoded in DolbyDigital or DTS and ONLY if you pass-trough the digital signal to the receiver to do the decoding. In ALL other cases you will get STEREO PCM signal.
    3. If your receiver is a decent one you should have an analog surround input (5. analog input). in that one you can plug the analog outputs from your card in order to have surround sound all the time (like in the games).
    Message Edited by SoNic2367 on <SPAN class=date_text>09-25-2006 <SPAN class=time_text>06:24 AM
    Message Edited by SoNic2367 on 09-25-2006 06:26 AM

  • 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

  • Write digital output on wireless node

    hello
    i have wsn kit with 9791 gateway, i need to program node 3202 to write a digital output, i want to know how can i do this in labview ?
    do i have to write program ? what library in labview should i chose ? is it using FPGA module in labview ? i really spent alot of time searching for this answer and i am new in labview program
    thank you 

    Hi,
    In order to use the WSN-3202 with Gateway-9791, you have to install LabVIEW and NI-WSN driver.
    You can find the software version support for your WSN at http://zone.ni.com/devzone/cda/tut/p/id/12734#toc0.
    After you have install the software, you can configure your WSN using Measurement and Automation Explorer (MAX) and add WSN node to the gateway, it might not looks exactly the same in the picture below because I am not using 9791 as the gateway.
    Next, you can open an empty project or your existing object and add your gateway into your project.
    After you add the gateway and your node into the project, you can access the DIO at WSN-3202 through the share variable node. You can just drag the DIO from the project explorer into your vi.
    Best Regards,
    KH
    Application Engineer

  • Is it save to use digital output as a digital input signal for another channel

    Hi all,
    I know this is a stupid question, but I do not have other signal generator by hand. So what I want to know is, can I use the digital output signal of my USB-6001 as an input signal for the same device but on other digital port? I did not try out directly because I do not want to burn the device down......
    Thanks
    Solved!
    Go to Solution.

    I do loop backs all the time, especially in my test systems as a way of making sure my signal is making it to the UUT pin.  I typically throw in a 10k resistor just in case, but I have never had an issue.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Externally Triggered 6534E Digital Output

    Hi Dear Friends,
    I have get a question on how to do the triggered output for the 6534E card. Right now I am using the 6534E card to output a digital gate pulse, and I want to synchronize the output of this gate pulse to an external source, which is the Sync output of a Angilent 33220A function generator(10 kHz). I want the rising edge of one trigger pulse(the sync output) to start one digital gate pulse output, and when one digital gate pulse if finished it waits for another rising edge of the trigger pulse to start another digital gate pulse.
    For the more detailed description, please have a look at the attached waveform. Hope you can shed some light on the possibility of doing this.
    Thanks a lot for the help.
    Attachments:
    6534 Triggered Digital Output.JPG ‏95 KB

    Hello tiddlycorona,
    From the diagram you provided, you can try the Gen Dig Pulse-Retriggerable.vi. This LabVIEW example demonstrates how to generate a digital pulse from a Counter Output Channel on a digital trigger. The Initial Delay, High Time, Low Time, and Idle State are all configurable. It also shows how to use a Digital Start trigger, so the digital pulse is not started until a trigger signal is received. Though the pulse is configured in terms of ticks, it can easily be modified to generate a pulse in terms of Frequency/Duty Cycle or Time.
    Best regards,
    Ali M
    Applications Engineer
    National Instruments
    www.ni.com/support

Maybe you are looking for

  • Included in the fla. File, change the destination folder.

    Hello. I have my Flash file (myFichier) and I have included a .swf (theSon.swf). During installation (on Android), "myFichier" to intall in applicationDirectory and "theSon.swf" too. I would like the "theSon.swf" file is installed in applicationStora

  • How to hide fields in BP search tab of CIC  Winclient ????

    Hi All,       In IC winclient my requirement was to hide the IBase fields from BP search tab. I have done that by changing the html file  in SMW0 and assigning it in profiles for search strategies. But, now when I search for BP in CIC0 it doesnt get

  • Strange iPhone and HDTV Issue

    This is probably the strangest iPhone issue I've encountered to date (even more weird than the "stop the image rotation half way" bug). For those who either don't know or don't care, the Major League Baseball playoffs are going on right now. For the

  • DVD formatting

    Can someone please help me to understand how to save a Quicktime Pro project on a DVD. I see alot of other choices when I scroll down but terminology is not a strong point of mine. Is recording videos to DVD not a option or choice with quicktime pro?

  • Reg-Round off in sales documents

    Dear all I need a solution for given below point. For Purchase and local sales there should option for rounded off on total amount,but incase of export sales roundoff should not effect. Please kindly suggest. Regards M Auditya Functional Consultant