Digital waveform output

hello everybody
first of all: i'm working with m-series card pci 6259 and measurement studio c++.
i want to output digital waveforms to sixteen digital outputs.
the waveform buffer should contain at least 720 points.
the frequency at which the output should be changed is varying between 24kHz and 120kHz.
when one waveform buffer is done, it must be recalculated, frequency adjusted and output again, and so on...
in the data sheet of my card i read about waveform characteristics of port 0. but i can't find any
documentation about this anywhere.
so can anyone help me with this problem?
regards
markus

The standard installation of NI-DAQmx puts an item into the Start menu: Start->National Instruments->NI-DAQ->NI-DAQmx C Reference Help.
Look under C Functions->Channel Configuration/Creation->Create Digital Output Channels, and Write Functions, various DAQmxWriteDigital... functions.
Look in the NI-DAQmx Concepts section for various kinds of information about digital output.
Look for the C-language examples under Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\.
John Weeks
WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com

Similar Messages

  • Is it possible to use part of Port0 on a 6363 as line controlled and part as digital wave output?

    I've filled the DIO on Port1 and Port2 of a PCIe and need to use port0 for both line controlled (toggle) and digital waveform output.  I'm using Measurement Studio 14 and C#.  I can make the call:
    NITask.DOChannels.CreateChannel("MyMIO/port0/line8​:11", "myTask",ChannelLineGrouping.OneChannelForAllLines​);
    and run the waveform without issue.  The problem is that the unselected lines are cleared.
    I can kludge around the problem by maintaining the state of all lines on Port0 and accounting for them in the waveform.  That is kind of a pain, adds code, and I'm lazy.  Is there a way to isolate the wave to only the lines selected when creating the task?
    Thanks,
    Derek Hopkins,
    Pacific Northwest National Laboratory

    Hello Derek,
    Could you explain the impact of having the unused lines cleared in your program? I'm not sure I understand the impact that behavior is having on the system.
    Siana A.
    Application Engineering
    National Instruments

  • How do I output three digital waveforms at once?

    I posted this in Digital I/O, but now I think it's actually more appropriate here because it's not a hardware question. I need to output three digital waveforms at a relatively low frequency, 71.9 Hz. I have a PCI DAQ card, the 6024E and am using the NI-DAQmx functions to try to do this. My program basically generates the square wave that I want, and converts it into a digital wave. I do this 3 times for the three separate waves, and then I combine them into an array and send them to my DAQ functions, which are in a while loop so I can get continuous output. My problem is that the waveform that the DAQ is actually outputting is not what I want. It's outputting a wave that has the same duty cycle (approximately) but the frequency is over 2 kilohertz. It's not like this all the time; after it outputs about 7 cycles of this wave, it goes to logic low for a long time, and then repeats itself. When I probe the digital waveform right before it goes into the DAQ functions, it's running correctly at 71.9 Hertz. Am I doing anything wrong with the DAQ functions or the sampling information? Thanks in advance.
    -- Josh Matloff

    Hello Josh,
    I'm pretty sure that the reason that your digital waveforms are not being produced at the correct frequency is because your digital output is not associated with any sort of timing. Unfortunately, with an E series board you can only do software timed digital operations. This means that the frequency at which the values on your digital lines will be updated depends on how fast/often your computer executes the DAQmx Write that is inside of your while loop. If you have an M series board, you can actually correlate the DIO operations with another subsytems clock (AI/AO sample clock, etc.) which means that you can acheive hardware-timed DIO. In the event that you do not have access to an M series board, I think that AnalogKid2DigitalMan was spot on that you would want to use counters to generate pulse trains (that is if your digital waveforms have a constant duty cycle and period). Depending on what the DAQ board is outputting to, you might also want to consider using the Analog Output channels to generate your digital waveform. As long as you continue to use the digital lines on the 6024E, there is not really a way to guarantee the timing of when the digital lines will be updated. You might be able to get close, but you will probably see some "hiccups", especially if your computer needs to service interrupts or give processing time to another application. And lastly, heed geckoee's advice and don't forget to properly close out your tasks! Putting in some error handling may also help in the debugging process.
    Take care,
    E.Lee
    Eric
    DE For Life!

  • Trouble outputting digital waveform to single line

    i want to output to a single digital line a digital pulse. my current attempt is to generate a digital waveform and then provide this as data to a digital line output. the vi runs, and the waveform appears as i want, but the digital line doesn't output anything? any help would be greatly appreciated!
    Attachments:
    digital pulse out.vi ‏32 KB

    Hi
    In reference to my previous post, you can just leave the inner for-loop, but you have to extract the 4 channels.
    Just have a look at the picture.
    Hope this helps.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...
    Attachments:
    DigitalWaveform.png ‏6 KB

  • Jitter of output digital waveform with external clock

    Hi,
    I need to generate digital waveform with 20 bits pattern * 1000 times. Digital waveform must be sync with 1 MHz external clock.
    It is not big deal.
    But there is additional requirement that digital waveform has jitter < 200 ps. It can be delayed for couple ns but it must be very stable.
    Can anyone point me on that parameter? Or share your expirience?
    Thanks!

    Hi Andrei,
    Tph on figure 3 is defined as tp - 2.2ns as we discussed earlier. The data jitter, along with channel to channel skew, is already taken into account. We don't specifically spec the data jitter since we have made this calculate for you. It is safe to say that the data jitter involved in tph is less than 200 ps however this is not a standard spec we provide.
    As for additional board recommendations, what is your application? The 6562 is designed for LVDS applications. The 655x series is highly recommended for high speed TTL based applications. If you reference the 655x manual you will notice similar or better specifications in regards to setup and hold times, which again already take into account data jitter and skew.
    I am curious as to why you would like the specific values documented. We provide the current specifications so that you do not have to use the individual statistics to calculate numerics such as the setup and hold times. Is there something specific you are trying to do here? You mentioned a simple example earlier, what is your actual application?
    Regards,
    Chris Behnke
    Sr. RF Engineer
    High Frequency Measurements

  • Convert digital waveform to array

    Hello,
    I posted a problem before Christmas regarding data acquisition and accessing the hardware buffer on a 6562 card. I managed to figure out that problem but now I'm stuck when I try manipulating the data I obtain. (The original problem can be seen here: http://forums.ni.com/ni/board/message?board.id=70&​thread.id=7926)
    Briefly, my application is clocking and synchronising an ADC board and then looking at the raw ADC data that comes back from the board. To provide synchronisation I am sending a sync pattern on one data line and using a second line to send a "start of frame" indicator, a '1' bit when I know that the board is synchronised. This line otherwise only sends ‘0’s. This cable is wired back into the NI card and LabView. All data sent uses the NI-SHDIO Generation Express VI and I'm using the Acquisition Express VI in parallel with the Generation VI to capture the raw ADC data when it comes off the ADC board. Since I am acquiring both the ADC data and the frame indication data (which I am looping by connecting that output DIO to an input DIO), the digital waveform essentially contains 2 arrays and I can view these from a graph indicator within LabView.
    No problems so far. In order to manipulate the data and look at individual frames I am writing the ADC data to file. To extract the digital data from the digital waveform I am using the following VIs:
    -Get Waveform Components
    -Get Digital Data Components
    -Write to Binary File
    To view and manipulate the data I read it into Matlab and this is where I can tell that something's not right. When I read the file into a variable in Matlab, the variable becomes a 1D double array of 40,008 elements. This seems very odd, considering the Acquisition VI only takes 20,000 samples. When I look at the 1D array more closely it looks like the two arrays have been cross added in some fashion. The 1D array certainly doesn't match either of the two arrays visible in the graph indicator inside LabView. I can understand if the file is reading one array after the other (20,000 + 20,000 almost equals 40,008 after all) but that doesn't appear to be the case.
    I would greatly appreciate some help on how I can extract the two data lines either using Matlab or LabView. Currently it looks like LabView is making a hash of things whenever I try to manipulate or extract the two arrays from the digital waveform. I have tried a multitude of different VIs and ideas but nothing appears to work.
    The most straight forward way would be using the "Converting Digital Waveform to Binary VI" but it can't handle two arrays within the same waveform. (The result looks like the two arrays exclusively OR’d together). To combat this I tried running two Acquisition Express VIs in parallel (one for ADC data, the other for the frame info) but got an error message referring to invalid handles. I presumed this meant that I can't run two acquisition VIs simultaneously, judging from forum posts of users facing the same error message.
    Sorry for the long post but I feel that I needed to fully explain the problem. I'm attaching my LabView code.
    Thank you for reading,
    Christian
    PS. GenAcq2.vi is my code. Waveform_GenAcq2_Cfg.hws is sent by the first Generation VI; Waveform_GenAcq2_shorter_frame_indicators.hws by the second Generation VI.
    Attachments:
    CodeAndWaveforms.zip ‏126 KB
    GenAcq_Screenshot.JPG ‏83 KB

    The extra "8" is being caused by the fact that the "Write to Binary File" VI has a "prepend array or string size" input. Its default is true, and in your case you have it unwired, so you get the array size prepended. As for the rest of your issue, what are your Matlab commands to read a file? The following example VI, which generates a digital waveform and saves it to file,
    can be correctly read into Matlab using the following commands:
    fid = fopen('c:\temp\digData.bin','r');
    F=fread(fid, [256,8], 'uchar');
    Message Edited by smercurio_fc on 01-18-2008 05:26 PM
    Attachments:
    Example_VI_BD.png ‏11 KB

  • How to send digital waveform to the DAC?

    How to send digital waveform, obtained by Function Generator.vi to the Digital-Analog Converter? What kind of subVIs I have to use for this? I have LabView_5.0 on MacOS.

    The 6032 is not a GPIB board. It is a DAQ board board and has 2 16-bit analog outputs, 8 16-bit outputs (16 single-ended), and 8 digital i/o lines. I don't know what you mean that a MIO16/LPM16 is connected to it. There are a lot of example VIs that ship with LabVIEW. Select Find Examples from the help menu and look under Hardware Input and Output. LabVIEW 7 has some under DAQmx>Analog Generation and older versions of LabVIEW have them under DAQ>Analog Output.

  • Generate digital waveform form a read from spreadsheet.vi

    Hi, I'm very new to LabView and am having some problems in completing what I believed would be a very simple task.
    I am using the Read from Spreadsheet.vi to read in an Ascii tab delimited file that I created in Matlab (the file is simple a vector of 1's and 0's that represent a binary stream) All that I want to do is take the output from this and generate a digital waveform corresponding to the 1's and 0's in the array but I cannot find a way of doing this.....
    Help much appreciated,
    Thanks.

    You should be able to just run your data straight  in to the digital write function as long as you select the correct port width of your hardware.
    If you want to do it with a digital waveform it's a bit trickier, the digital waveform data type is a surprisingly complex animal.
    There might be a better way to do it, but this is what I've had to do in the past...
    The "build digital data" function needs a 2D array in, so convert your 1D array into a 2D.
    Then the digital data can be input into a Build Digital Waveform.
    Then the digital waveform can be output with the write digital waveform.
    Message Edited by Troy K on 03-23-2008 11:37 AM
    Troy
    CLDEach snowflake in an avalanche pleads not guilty. - Stanislaw J. Lec
    I haven't failed, I've found 10,000 ways that don't work - Thomas Edison
    Beware of the man who won't be bothered with details. - William Feather
    The greatest of faults is to be conscious of none. - Thomas Carlyle
    Attachments:
    array_to_digital1.png ‏4 KB
    array_to_digital.png ‏9 KB

  • How plotting on a digital waveform graph the bit transition in function of the time

    Hi everyone,
    I am using LabView 6.1 on a Windows XP computer. I am to plot output bits sequences on a digital waveform graph just before sending the information to a board.
    So far I can see the transitions for my 16-bit port (16 plots) but the width of a pulse is always identical, no matter what times I enter. I wired my 1-D array timestamps to the property node Xscale.MarkerVals[] of my digital waveform graph... but it doesn't seem to affect my plotting...
    Thanks in advance for any help concerning this problem.
    Jonathan Sabah

    Well here is piece of my VI with the necessary sub VI.
    I also want to hide/unhide plots... I have found how to hide.. but cannot figure out how to unhide.
    Any help please ?
    Thanks again
    Jonathan
    Attachments:
    Exemple.vi ‏58 KB
    Setup_DIO64_for_Output_1.0.vi ‏111 KB

  • Real-time - how to control speed of digital waveform

    Deploying the VI attached to my RT desktop target I generate digital waveform on 8 channels on port0 and acquire data on AI [PXIe-6358].
    The digital output frequency and analog input sample frequency are 10000 Hz therefore I expect that while one 8-bit digital code is active [valid] for 100us, one single analog sample is acquired. That means that I would expect one cycle of the while loop to finish in 100us x 2^8 = 100us x 256 = 25600us = 25.6ms.
    However what happens is that the while loop finishes in 6ms regardless the set frequency. The loop finishes in 6ms even if I set 5/10/15kHz or if I put a 100us delay into the while loop. I also tried to set the source of the analog input sample clock to 'Dev/do/SampleClock' but nothing seemed to work so far.
    How can I force the digital generation to be in correlation with the analog acquisition? I need to acquire 1 data point per channel while the respective digital code is active.
    Thanks,
    Krivan
    Attachments:
    RT_ai_dig_wave_gen.vi ‏56 KB

    Hello krivan,
    Thank you for your post on the forum.
    Do you want the digital generation to start at the same time as the analog acquisition?
    Shalini B
    Applications Engineer
    National Instruments UK & Ireland

  • Digital waveform editor

    If I use the Digital Waveform Editor to create a clock, can this clock signal be used as a my clock source?  An example I am trying to reference for creation of my own VI is the Dynamic Generation and Acquisition - Demo.vi found in the Example Finder in LabVIEW 2012.  In it the On Board Clock is used for both Generation and Acquisition.  I would like to use a clock that I have already created in my waveform file because I know my other signal is working with it and the device under test when doing a signal generation and acquisition using a scope.  Any advice on how to do this (if possible) would be appreciated.

    tcarrico,
    In terms of using the waveform file that you created directly as your clock source, this is not possible. However, if you wanted to output this waveform using a function generator and then use that signal as an external sample clock for your Digitizer, this would be more likely to work. Is this more along the lines of what you were thinking?
    Robert B
    Applications Engineer
    National Instruments

  • Export digital waveform+labview

    Hi to everyone...I'm a newbie with labview, and I want some help for the beggining...Well I'm working on a project and for start I must use an arbitrary signal and an oscilloscope so as I can see the the graph of it(for simplicity I used a sinus in the beggining...)and then I must use an A/D converter and the digitalized output must be saved in a .txt file so that I can read it...So I wired the sinus with the A/D converter but then I cannot make the output of it compatible so that I can save it...I used the component "export waveforms to spreadsheet file.vi" but it says error diffent type of data you cannot wire a "Digital waveform" with the input of the file "1-D array of waveform(DBL)"????I used and some other components for saving in a file but it didn't go better...What did I do wrong???Please if anyone can help me...I would appreciated!!!
    Solved!
    Go to Solution.

    Hi again...I want some help...Last time I sent you "my_main.vi" file and told you that had a problem about making time to be correct in the .txt file...I haven't solved it yet, although I tried a lot to find how I can change this the txt. Anyway for now what concerns me most is that although the gragh(with the formula i use) i see in the front panel is correct when i take the data from the .txt file and paste it to a .xls file and making a graph it seems that there are pulses of the same amplitude before the visible signal i see in my front panel...I couldn't understand why this was happening but after a while i put the same formula in a grahp calculator that i have and saw that the previous pulses are not of the same amplitude, they just appear to be so because the amplitude that is set to the component isn't enough to show their whole amplitude...so they are been cut off and seem to be the same...So i tried to change the values at the x-axis but I didn't make it.The program holds some certain range(0-4) that I had initially set to it...At the bottom line I'm facing a problem to appear the rest of the graph in the component's output, and also to fix the phenomenically wrong pulses to my .txt file...Please I would appreciated if anyone can help me...Im sending you all files to have a picture of wht's going on...
    Thank you for your time...
    Michalis V.
    Postgraduate Student
    Department of Informatics and Telecommunications
    National & Kapodistrian University of Athens  
    Attachments:
    my_main.vi ‏20 KB
    results.txt ‏154 KB
    samples.xls ‏428 KB

  • Digital waveform to DAQ

    Hi,
    I have generate some digital waveform by reading a text file. the graph that is connected to the waveform is what i wanted. But I need to output this waveform through one line digital output of USB6501. How do i go about doing it?
    Any help is appreciated. Thanks.
    Attachments:
    data.txt ‏1 KB
    test.vi ‏64 KB

    When one looks at the specifications for the USB6501, one notes that it cannot do hardware-timed output.  Therefore, you can't use a waveform datatype to generate output with this card.
    So, you will have to use software timing and a loop.  Since you specify a pretty slow transfer rate (0.5sec), it should work fine.
    Look at one of the examples that ships with LabVIEW to get you started.  Click "Find Examples...Hardware Input and Output...DAQmx...Digital Generation...Write Dig Chan".
    Of course, you only want one line.  So when you specify your physical channel, only specify one line.  Change the function inside the loop to "Single Channel...Single Sample...Boolean (1 line)".  Now the function will accept a single boolean value.
    You do a lot of screwing around with getting your data into the right format.  That can be simplified a lot.  See the attached picture.  This is not complete code -- you will need to look at the example I mentioned -- but this picture and the example, combined, should tell you what you need to know.
    Hope this helps get you started.

  • SPI Digital Waveform Library

    Please provide feedback, comments and questions on the SPI Digital Waveform reference library in this thread.
    - David
    (posted by Christian on behalf of David)

    Hi JeyZ -  In the past, I've worked with microprocessor-based slave devices that have nondeterministic response times to a given query from the master. For example, I would send a data query in the first byte, then expect to clock out the data from the slave in the next byte. If the slave device wasn't done with its search/retrieve routine, it had no data in the output register so all I clocked in was x"00". Could something like this be happening to you? Do you have a datasheet for the slave device you're communicating with that you can link publicly? You may also try using the SDW library to build the waveform. It will guarantee that timing parameters for the bus are met and all edges in the waveform conform to protocol requirements. Alternatively, I can only ask that you post more information about your application software and the device you're communicating with, so we can help you debug it. In response to your question about using the 6229 for I2C, that device does not have a per-cycle tristate feature. At present, only the 655x devices support that capability. Without it, you would have to do a lot of work to get this device communicating over I2C, and I can't guarantee it'll be possible in the end.

  • Read digital waveform through single DIO line

    Hi I have currently  purchased NI DAQ USB 6363 to accquire serial digital waveform. I'd like to read serial digital data through one of the digital IOs with data rate of 45 kHz. Please see the attached for the data frame. Could anybody comment one the feasibility of this? Is there any example codes that I can refer to? 
    Attachments:
    digital waveform.jpg ‏49 KB

    Hi tintin
    Thanks for posting, and sorry you've not heard from anybody for a while.
    Have you taken a look at the stock digital read examples? i.e. Find Examples >> Hardware Input and Output >> DAQmx >> Digital Input >> Digital - Continuous Input.vi
    The USB 6363 can do DIO up to 1Mhz so it seems feasible at a glance.
    Kind Regards
    Chris | Applications Engineer NIUK

Maybe you are looking for

  • Error on Running Full Client Reports on Infoview

    Post Author: AmitP CA Forum: WebIntelligence Reporting I'm running WebI 6.x on a system with the following environment Microsoft Windows Server 2003 SP 1Business Objects 6.5 SP2Microsoft Internet Information Services (IIS) 6.0 Whenever I try to run a

  • Share roll over in many pages

    Hi, Is there any way i can use my roll overs in many pages (as a master page) in order to save time?

  • ORA-00904 when exporting job queues

    Hi! I have a 8.1.6.3.7 database (although you only see 8.1.6.3.0) when you log in) which I'm trying to export. Everything is fine until the time comes to export job queues. I then get the following error messages: EXP-00008: ORACLE error 904 encounte

  • 1. Working with DV and HDV in the same project     2. importing music error

    1. I am working on a project that was shot with both HD and DV footage. What is the best way to work with both types of files on the same time line so that I can compress them to DV format video? 2. Also, I am having a problem importing music files i

  • TS3212 ios6.0 x iTunes failure

    hi. i upgraded my iphone4 with the new ios6.0. from this moment can't connect my phone to my iTunes on the PC. (The iTunes stopped with failure every time and switch off, can't see my phone). i tried to reinstall iTunes, but without any success. with