04-21-2022 06:43 AM
this is my first VI on LabView and I hope that you can spend a bit of time on understanding my troubleshoot and eventually suggest me a solution.
I'm blocked on how can you implement a frequency meter. This instrument has to transform and input wave into a sequence of impulses (one for each time the input rises over 0), then count them and calculate the frequency of the input.
This is what I need to implement:
My VI is incompleted and can only count the number of pulses generated. Furthermore, I didn't implement any system of clearing (signal U2). It just makes the sequence of impulses starting from a sine wave and displays (an counts) them only when start button is on.
Here are my questions:
Thank you for reading,
04-21-2022 10:34 AM
Can you please go to File->Save For Previous Version... and save back a few versions? 2016 would be plenty far enough. Quite a few of us around here aren't equipped to open LV 2021 files.
What I can't tell from your description is where the hardware ends and where the software is supposed to start.
1. Are you using an NI data acq device? Which one(s)?
2. Which of the nodes in your schematic are actual hardware that exists (or will exist soon...) independent of your program? I note that "F1" and "ULC" are colored in red as distinct from the downstream logic gate and counter that are black -- is there a special meaning for the color scheme?
3. If needed, do you have the ability to convert the analog-looking pulses U0, start, and UL (maybe also clk?) into digital logic pulses?
04-22-2022 05:39 AM
Thank you for answering,
There is not any external hardware, it is all supposed to be implemented in a VI, including the wave generator input and the output display. Each signal flows inside this VI. This is an exercise to get practice with LabView and I'm using only it's "internal" functions.
Colors of schematics in screenshoot have no meaning, they just do what I explained hoping it's clear. I can implement them in any way I prefer, the important thing is that it should work with any periodic waveform and be able to measure its frequency.
I don't have the ability to convert analog pulses into digital ones.
Please tell me if there is something else unclear.
I'm uploading some different versions of my VI, the ones LabView showed me as possible conversions by clicking File>Save for previous versions.
04-24-2022 05:40 PM
This is kind of a lot to tackle for your "first vi".
I won't be able to walk you through every step, but here are a few tips:
1. Be careful about datatypes. For example, the "AND" operator isn't meant to be used with floating point values. I for one have no idea what behavior to expect.
2. Keep in mind that in this purely software approach, "time" is a simulated quantity. It comes from the sample rate of your simulated signal and the sample # in question.
3. The distinction between "digital" and "analog" isn't so important since you aren't dealing with data acq hardware.
4. It will be helpful to learn about creating sub-vi's. Each stage of your processing could be its own sub-vi. This both cleans up your top-level block diagram and also (more importantly) lets you test and debug each processing step one at a time.