07-06-2020 07:33 AM
I designed a circuit to count the pulses of the simulated square wave signal generated. I used the select tool to make the outputs of the signal as 0 or 1. Until then my code worked correctly but when I added a while loop to design my counter, the select tool is not generating the output and also the graph is also not getting generated. I don't understand why it is happening like this. Please tell me where I did the mistake. My aim is to design a counter which counts the high pulses of the input without using daqmx.
I am attaching the two files with counter and without counter where the latter code is working fine. Please tell me why my code with counter is not working.
07-06-2020 07:54 AM
Why do you have a loop inside of your loop? Move the shift register to the main loop and remove the inner loop.
07-13-2020 05:43 AM
thank you sir, it worked and now the counter is working but it is working when the frequency is at 10.1Hz but when I am making the frequency at 50Hz then the simulaton signal is not working at all. Please tell me why it is not working when I am increasing the frequency.
07-13-2020 09:47 AM
Hi Dinesh,
@Dinesh247 wrote:
Please tell me why it is not working when I am increasing the frequency.
Because you are using ExpressVIs and their bad companion "DDT wire"…
And because you don't pay attention to the coercion dot in your VI!
Replace the ExpressVIs by "simple" functions from signal processing palette. Then learn how to handle their "basic" datatypes, like DBL arrays. And learn how to compare DBL values to implement your "counter"!