10-10-2009 12:18 AM - edited 10-10-2009 12:19 AM
trying to generate a square wave pulse at a specific frequency
it would be great if its simple as setting the amount of frequency (i.e., 50 , 50 pulses per sec)
but it gets complicated because of the sample rate
my problem is to convert it to digital and i don't know whats wrong
i attached a pic of my block diagram
as you can see, one pulse has frequency F, the other F/2, and lastly F/4
i need it to be compatible with the VI attached as well. can anyone help? thanks in advance!
10-10-2009 12:36 AM
forgot to mention,
judging by the outcome of "Create Digital Waveform",
i think i need my final digital array to come up as
for F
0
1
0
1
0
1
for F/2
0
0
1
1
0
0
1
1
and so on. sorry if it's a bit vague but i don't know how to explain better. and the outcome of the VI i made (the picture) comes up as a 16 bit. thanks again
10-12-2009 04:18 PM
Hey Sdkpark,
We don't really need to write F out to DO, as it's going to be the CO Pulse Frequency Output; we could simply connect to the counter output for F. For F/2, we can simply create a waveform that repeats 00110011, and for F/4 we could repeat 00001111.
10-12-2009 05:01 PM
Hello again Sdkpark,
Apologies the message I was writing didn't include my full post. Take a look at this great community example for a prebuilt solution to what I believe you're trying to accomplish:
http://decibel.ni.com/content/docs/DOC-5763
Let me know if this isn't what you're looking for and I'll reply back. Have a great day!