LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

generating frequency dependant square pulse and making it digital

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!

Message Edited by sdkpark on 10-10-2009 12:19 AM
Download All
0 Kudos
Message 1 of 4
(2,728 Views)

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

0 Kudos
Message 2 of 4
(2,720 Views)

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.  

 

-John Sullivan
Problem Solver
0 Kudos
Message 3 of 4
(2,693 Views)

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!

-John Sullivan
Problem Solver
0 Kudos
Message 4 of 4
(2,692 Views)