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.

Similar Messages

  • Digital waveform acquisition using DAQ digital lines-urgent

    Hi, I would like to use DAQ Digital input acquisition to acquire the attached waveform. The wavform is actually analog but olways varies between 0 and 3.3 V (  I use 6363 OEM) . I also have another waveform that varies between 4.4 to 5.8
    the problrm I have is for the first waveform I always read 0 and for the second waveform I always read 1., Is there any way to change the decision level when I select  digital input acquisition. Lets say when the voltage is below 4.6 consider it as 0 and when it is above 4.6 take
    Or I need to use analog acquisition
    Thanks
    Attachments:
    tek00001.jpg ‏192 KB

    According to the X series multifunction DAQ documentation for the 6363 the maximum level for a Low=0.8V and the minimum level for a high=2.2V.
    So your first signal (0 to 3.3V) should work ok assuming the digital ground reference is connected properly.
    The second digital waveform (4.4 to 5.8V) will either need some extenal conditioning or be read as analog and converted to digital.
    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

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

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

  • 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

  • Is the digital waveform graph supported in Measurement Studio?

    I have an application that could really use the LV-style digital waveform graph in Visual C++. Are there any plans to support the digital graph in Measurement Studio?
    Thanks, Bob

    Unfortunately, there is currently not an equivalent of LabVIEW's digital waveform graph in Measuremeht Studio for Visual C++. You can fake some of the features with CNiGraph. If you have Measurement Studio for Visual Basic 6.0 installed, you can see some examples of this in the VB DAQ\Digital\Digital Waveform and Digital Waveform Continuous examples. Also, attached is a sample Visual C++ 6.0 project that demonstrates how you can simulate some digital graph features with CNiGraph. There's also a screenshot attached that shows what this looks like. Hope this helps.
    - Elton
    Attachments:
    DigitalGraphExample.png ‏16 KB
    GraphDemo.zip ‏19 KB

  • 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

  • Digital waveform

    Aim of my VI: 1. PLC Digital Outputs are being switched from On and OFF through a relay. I have to read that signal and represent it in the digital waveform within a time period, using NI DAQ 6251.
    2. The data should be represented in real time showing the pulse with X-axis having the time scale.
    3. I have capture all the data and save in an excell file.
    4. With minimum resolution of 1 to 10ms.
    Please see my VI which I made and suggest.
    I have a question, in my VI I have directly plotted the data coming from the digital read. What is the X-axis there?
    Secondly I have used the time stamp to represent the actual time.
    Which graph is correctly satisfying the purpose? Sorry I generally get confused with timing in the loop.
    Attachments:
    Read-PLC-Dig Chan.vi ‏59 KB

    Hi KRAZE4LV,
    The following example demonstrates how to perform a continuous digital read that outputs the data to a graph:
    NI Community Example: Digital - Continuous Input - https://decibel.ni.com/content/docs/DOC-25130
    I would recommend starting with this.  The graph, however, will not scroll as you have described.  To get the behavior you want, you should replace the Digital Waveform Graph with a Waveform Chart.  Here is a guide about the types of charts and graphs available:
    Types of Graphs and Charts in LabVIEW - http://zone.ni.com/reference/en-XX/help/371361H-01/lvconcepts/types_of_graphs_and_charts/
    To get your digital data into this chart, you will need to use the following VI from your Waveform Palette to convert your data to a compatible type:
    Digital to Analog VI - http://zone.ni.com/reference/en-XX/help/371361H-01/lvwave/digital_to_analog_wf/
    You can adjust the chart's history (right-click»Chart History Length...) to configure how many samples are shown at a time.  With this setup, your x-axis will be your computer's timestamps.
    As for your file logging, the following VI performs the file i/o you are requesting:
    Export Waveforms to Spreadsheet File VI - http://zone.ni.com/reference/en-XX/help/371361H-01/lvwave/export_wave_to_spreadsheet/
    Regards,
    Chris E.
    Applications Engineer
    National Instruments
    http://www.ni.com/support

  • Digital waveform editor sample size limit?

    Hi,
    Can anybody please tell me the sample size limit of the Digital Waveform Editor? Thanks!
    Jing

    Hello,
    1) You can actually acquire as many points as you want. You may be worried about the throughput of all this data from the DAQ board into computer memory, but I don't think this will be much of a concern for your application. You're limited only by how much memory your computer has. Mainly, you should be concerned about what you are doing with all those samples after they are acquired. Are you just using them once then throwing them away? (Such as the "Cont Acq&Graph Voltage-Int Clk.vi" shipping example.) Or are you streaming them to disk? If you just keep them all in computer memory, then there would be some maximum number of samples you could hold but that number would be system dependant and you'd just have to experiment to find that number.
    2
    ) That's a great idea to take those voltage signals and make them digital inputs. This way you'll also free up some more bandwidth giving you the option to increase the sample rate on your other channels. However, you won't be able to include any DIO channels in the same task with your other analog channels. You need to create a separate task for these digital input channels. Lines 0,1,2, and 4 will be reserved for communication with your SCXI chassis by the way. You also won't be able to do any buffered sampling like you can with the analog channels. The DIO for the PCI-6024E is only immediate and software-timed. (You must poll the status of the line with a software loop.)
    Let me know if you have any other questions.
    Russell
    Applications Engineer
    National Instruments
    http://www.ni.com/support

  • Digital waveform frequency measurment

    Hi,
    i have Motor driver can give me the speed as feedback "digital waveform"
    the frequency is proporational with the speed
    i have Cdaq 9188
    also i have ni9401
    1. at which slot i have to connect the cmodule 9401 to be able to reach the counters ?
    2. how i have to connect the speed feedback to module ?
    3. can i have guide about this issue ?
    thanks alot

    Try posting in english here
    Translation 
    Digital waveform editor to create waveforms PXIe-6536 I want to output, what do I like?
    I do not know the correct response is, at present we take the following approach.
    ① Digital waveform editor creates a waveform
       1.. Hws as the output file format
       2. "NI-HWS Express (load)" read
       3. VI confirmed the digital waveform graph output.
    ② PXIe-6536 for creating DAQ Assistant
       1. PXIe-6536 digital output in
       2. DAQ output waveform creation screen test assistant
       3. NI CB-2162 has been confirmed that the output waveform on
       4. DAQ Assistant SUCCESS
    Is conducted to the point where there are some drawbacks, however.
        * DAQ Assistant, you run alone, I get an error
    "-200,077 Error code is DAQmx Write (Digital 1D Wfm NChan NSamp). Vi: 3 occurred in
     Measurements: Requested value is a value that is not supported at this property.
    Property: Output.BufSize
    Requested value: 0
    Minimum: 2
    Maximum: 4294967295 "
        HWS * DAQ Assistant VI to read the attached file for the connection can not connect For the loop to be taken into
        * Thereafter, the sample rate settings do and what do I like?
    Such situation.
    Us, Labview for complete beginners because it is, I do not know how you like the above is correct.
    And I think there are many points, but fall short, you can ask that solved until you have any opinion you have any

  • Digital waveform editorで作成した波形をPXIe-6536で出力

    Digital waveform editorで作成した波形をPXIe-6536で出力したいのですが、どのようにすればよいでしょうか.
    対応が正しいかわかりませんが、現状では以下のようなアプローチをとっております.
    ①Digital waveform editorで波形を作成
    .hws形式のファイルとして出力して、
    「NI-HWS Express(load)」に読み込み
    デジタル波形グラフVIで出力を確認しました.
    ②PXIe-6536用にDAQアシスタントを作成
    PXIe-6536でのデジタル出力
    DAQアシスタント作成時画面でテスト波形の出力
    NI CB-2162上で波形が出力されていることを確認
    DAQアシスタント作成完了 
    というところまでを行いましたが、いくつか気になる点があります. 
     DAQアシスタント単体で実行すると、エラーが出る
    「エラーコード-200077がDAQmx Write (Digital 1D Wfm NChan NSamp).vi:3で発生 
     Measurements:  要求された値は、このプロパティでサポートされている値ではありません。
    プロパティ: Output.BufSize
    要求された値: 0
    最小値: 2
    最大値: 4294967295」
    DAQアシスタントとHWS読み込み用VIの接続を添付ファイルのようにForループ内に入れなければ接続できない 
    以後、サンプルレートの設定などを行うにはどのようにすればよいか.
    といった状況です.
    当方、Labviewに関しては全くの初心者であるため、 上記のような方法が適切であるかわかりません.
    至らない点も多いかとは思いますが、お気づきの点がございましたらご意見いただけますようお願いいたします.  
    Attachments:
    sample.jpg ‏654 KB

    Try posting in english here
    Translation 
    Digital waveform editor to create waveforms PXIe-6536 I want to output, what do I like?
    I do not know the correct response is, at present we take the following approach.
    ① Digital waveform editor creates a waveform
       1.. Hws as the output file format
       2. "NI-HWS Express (load)" read
       3. VI confirmed the digital waveform graph output.
    ② PXIe-6536 for creating DAQ Assistant
       1. PXIe-6536 digital output in
       2. DAQ output waveform creation screen test assistant
       3. NI CB-2162 has been confirmed that the output waveform on
       4. DAQ Assistant SUCCESS
    Is conducted to the point where there are some drawbacks, however.
        * DAQ Assistant, you run alone, I get an error
    "-200,077 Error code is DAQmx Write (Digital 1D Wfm NChan NSamp). Vi: 3 occurred in
     Measurements: Requested value is a value that is not supported at this property.
    Property: Output.BufSize
    Requested value: 0
    Minimum: 2
    Maximum: 4294967295 "
        HWS * DAQ Assistant VI to read the attached file for the connection can not connect For the loop to be taken into
        * Thereafter, the sample rate settings do and what do I like?
    Such situation.
    Us, Labview for complete beginners because it is, I do not know how you like the above is correct.
    And I think there are many points, but fall short, you can ask that solved until you have any opinion you have any

  • Simultaneous analog and digital waveform read with PXIe-6361 and BNC2120 ?

    Hi there,
    I am trying to collect both analog and digital signals from a PXIe-6361 linked to a BNC2120, using the attached VI. I am running Labview 2011 64bit. This is the first time I am working with digital input. On the 2120 board, I have the digital input BNC cable connected to User Input 1 and wire between the screw terminal of UserInput 1 and the P0.1 (Digtial I/O) screw terminal.
    I have two questions related to this:
    1) When I try to run the VI in its current state, I get the following error:
    Error -89137 occurred at DAQmx Start Task.vi:3
    Possible reason(s): Specified route cannot be satisfied, because it requires resources that are currently in use by another route.
    Property: RefClk.Src
    Source Device: PXI1Slot2
    Source Terminal: PXIe_Clk100
    Required Resources in Use by
    Task Name: _unnamedTask<6>
    Source Device: PXI1Slot2
    Source Terminal: None
    Destination Device: PXI1Slot2
    Destination Terminal: RefClockInternal
    Can anyone point me in the right direction for troubleshooting this?
    2) I would like to combine my regular waveforms and the digital waveform into one array which would then be written to file. I can't figure out how to combine the two different waveform types...can anyone give me a hint on this?
    Thanks for your help,
    Claire.
    Attachments:
    Export Waveforms To Spreadsheet File (1D)_wo extra line.vi ‏33 KB
    Multi-Device Synch-Analog Input-Finite Acq-Analog Start_Claire_wDigitalin.vi ‏105 KB

    Hi ClaireJ,
    Sounds like a reference clock conflict. This KnowledgeBase (KB) talks about this error when using simultaneous sampling. Also, might want to check the device routes in Measurement and Automation Explorer (MAX) as discussed here. Finally, if you are routing your PFI line over a RTSI connection, this error can occur. This KB discusses it.
    As to your second question, this post should help.
    Bill E. | Applications Engineer | National Instruments

  • How to do a digital waveform subtractio​n

    i am trying to subtract two digital waveform using subtract operation, but it seems that the subtraction opertation doesn't like digital waveform.
    error message:"You have connected two terminals with different types. the type of the source is digital waveform, the type of the sink is double"
    anybody can help? please.

    Hello,
    See the attached modified example. Now you can access data in a 2D array .
    Software developer
    www.mcm-electronics.com
    PS: Don't forget to rate a good anwser ; )
    Currently using Labview 2011
    PORTUGAL
    Attachments:
    dither tech2.vi ‏57 KB

  • 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 do I sample a digital waveform?

    I have a digital waveform that represents a 1-bit data stream.  The bit rate is 1Mbit/s (i.e. For a value of '1' the line is high for 1us, for '0' the line is low for 1us). 
    I want to create a numeric array representation of the line by taking a sample of it every 1us and appending it into an array.
    How do I set it up in LabVIEW to sample the line at 1MHz and create a 1-D numeric array of the bits?

    Hi Raine,
    It sounds like you're trying to keep data from previous samples in memory through the next iteration of the sampling loop, then append the new sample to the array.
    Using shift registers is the most reasonable option. To create a shift register, wire your sample data to the edge of your sampling loop then right click and select Replace with Shift Register. You can then use a Build Array function to connect the shift register data with the current sampling data.
    Cheers.
    | Michael K | Project Manager | LabVIEW R&D | National Instruments |

Maybe you are looking for