10-05-2020 09:53 AM
I want to simulate a frequency divider that divides the input signal by 4. I am using a signal generator with a square wave output and feeding this as a clock to the D flip flop circuit (using logic gate). I don't know whether I am doing it right or not. Can you please help me with the frequency division circuit? to check whether the output signal frequency is divided 04 times to the input signal or not. It is urgent, kindly help in this simulation as I am new to Labview.
Solved! Go to Solution.
10-05-2020 10:08 AM
I can't tell what you really need here. My best guess at interpreting goes something like this:
- you have a physical signal generator that makes a square wave
- you have a physical D flip flop circuit you feed it to
- you want to evaluate whether the circuit does the frequency division you desire
- somehow LabVIEW is supposed to be involved? It isn't clear why, I would think a scope or any decent multimeter would let you do this measurement.
- there's no mention of any DAQ hardware which would be needed for LabVIEW to interact with real physical signals. It'd be most natural to do this with a counter task, provided you're working with 5V logic. (Many counters are also compatible with 3.3V logic, but I'm not sure *all* are.)
-Kevin P
10-05-2020 11:57 AM - edited 10-05-2020 12:00 PM
Dear Kevin,
Thanks for the answer, sorry I think you misunderstood it, function generator means the generator in Labview.
Actually, I want to simulate the program in Labview having a signal generator and counter to divide the frequency of the counter. Kindly find the attached figure. I am trying here.
10-05-2020 12:58 PM - edited 10-05-2020 12:58 PM
@photonick wrote:
Kindly find the attached figure. I am trying here.
You are running your signal generator once before the loop and turn it onto a single boolean, basically turning a square wave into a single bit of information. This means that the square wave and all timing information is irreversibly lost. I don't think you even have a basic understanding of LabVIEW and dataflow, so please start with the tutorials listed at the top of the forum. LabVIEW is a programming language, not a circuit simulator, but you can of course program anything you want.
Also, pictures of diagrams are pretty useless. In this particular case there is no way to tell how the express VI is configured. Please attach the actual VI. Maybe add a graph to show how the input signal looks like and what kid of output you are trying to get out of it.
10-05-2020 01:47 PM
10-05-2020 02:22 PM
Thank you Altenbach!
Indeed you understood it correctly what I wan to say. Kindly find VI and the circuit of frequency divider attached below.
Yes, I am totally new to Labview, there are a lot of things I need to understand that´s why I am making a lot of mistakes. Trying to learn it from youtube videos. But as I have an urgent task to do this that´s why I need help with that task (submitting by tomorrow). First I want to simulate it in VI and then I will acquire a signal from the signal generator using NI DAQ and then I will divide that acquired signal frequency in Labview.
But the first task is Labview simulation, and you have attached the exact output. Can you please provide VI for this too? the frequency division should be by 4. i.e. f/4
10-05-2020 02:55 PM
As we said, LabVIEW is a programming language, not a circuit simulator (such as e.g. multisim).
My VI is very simple flat code with everything visible. If you have trouble recreating it, you probably shouldn't even be on this project. Why would they ask you to submit this???
@photonick wrote:
the frequency division should be by 4. i.e. f/4
Then divide by two several times, just use another FOR loop!
10-05-2020 03:06 PM - edited 10-05-2020 03:07 PM
I am working on a project, I am new to Labview but as part of the project, I have to do this... I am from an optical communication background but this the first time I have to work on Labview too. So I have to do it for the project.
Yes, I am understanding the things you have used , when I calculate the values then next time I would have an idea how things go in Labview, as I think they are not that complex but because of the lack of components used here, I am facing a problem. I am quite sure by doing such exercises a few more, I will be able to do it by myself next time as in each task or problem the same components are used most of the time.
Thanks for the help, highly appreciated.
10-05-2020 03:14 PM
One more question, If I need to use an external signal from NI DAQ and then use this code to divide it, what changes I would need for this and to read back that output divided signal too.
10-05-2020 03:20 PM
Here's the code. Modify as needed. Never submit anything that you don't understand in the smallest details!
(Of course it would be interesting to rewrite it as a ptbypt VI that takes a scalar boolean input and outputs a scalar boolean at 1/4 of the frequency when called repeatedly with new values. Not shown.)