06-16-2022 07:14 AM
Hello,
I am working on proximity sensor... To get digital output I am using NI9403 daq system... After forming digital waveform graph I am not able to connect write to measurement file to get output data in excell sheet.... Can you please tell me how can I obtain entire output after digital waveform?!
06-16-2022 09:48 AM
Can you please share the LabVIEW code you've written (attach the VI or VIs, not pictures, please)?
Bob Schor
06-17-2022 12:53 AM
Please find the programming.
06-17-2022 07:24 AM
@Shre4071 wrote:
Please find the programming.
Where? Nothing was attached to your Post! Please attach your VI (or your entire Project, after you compress it to create a .zip file).
Bob Schor
06-17-2022 11:53 PM
Please FInd attached...
06-18-2022 10:02 AM
Oh, dear -- you are using the Dreaded DAQ Assistant (my term -- I "fondly" call it the "DDA"), and in the code you attached, you apparently haven't configured it for anything (as no input devices are specified, no logging is specified, etc.).
In My Humble Opinion, the DAQ Assistant was "invented" by NI Marketing to show how easy it was to do simple Data Acquisition with LabVIEW -- "You don't even have to learn LabVIEW to collect data from devices", I imagine the Marketing Blurb trumpets.
On the other hand, DAQmx, the really brilliant series of VIs and functions that make the DDA "do its thing", is brilliant, relatively simple, and is What You Should Be Using. There's a wonderful LabVIEW White Paper in the DAQmx Series called (approximately -- if you search the Web using the first 5 or 6 words of this title, you'll find it) "Learn 10 Functions in NI-DAQmx and Handle 80 Percent of your Data Acquistion Applications".
Skip the first section, which mentions the DDA. I'm going to summarize the rest of this for you (and give you my "personal spin" on getting started.
This brings up another point -- continuous Data Acquisition (or Data Production). How do you "time" the While Loop that takes each set of samples? The answer is, you don't -- you let the DAQmx Hardware, which has basically an "uninterruptable clock" (unlike your PC's clock) that "guarantees" output of however much data you specify and at whatever time interval is specified by # Samples x Sampling Rate. So if you say "1000 Samples at 1 kHz", the loop will run precisely once per second. The amount of time it takes for a DAQmx Read to "read" the data is, in this case, 1 second, but it takes only (say) a fraction of a millisecond to deliver it to you for further processing, say writing to a Chart.
The Principles of Data Flow says that since the output of the DAQmx Read is connect to, say, a Chart, the Read will go first, then the Chart. So the first time into the Loop, the Read will take 1.000 second, and writing to the Chart we'll say takes 10 ms. Now the first While is done, and you start the second While. The second Read will occur 0.99 seconds later (because it started without interruption when it finished 10 ms earlier), and the second Chart will have 10 ms more time (that it doesn't need), so all the data are captured, and all are displayed.
But what happens if you need to do "more processing", say save to disk, or do some intensive processing that might take > 1 second? The answer is you take the data and send it to another Loop, running in parallel, to do the time-consuming work. This is something called the Producer/Consumer Design Pattern -- you probably don't need to worry about this now, but it is something that comes with LabVIEW "for free".
Bob Schor
06-22-2022 05:26 AM
Dear sir,
Can you just provide me with a solution for that? I am not able to identify the mistakes in the circuit diagram? Please do one help, sir.
Thanks in advance.