Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Square wave generator PtByPt for FPGA output

Solved!
Go to solution

I'm trying to build a Host vi in which I can choose either to send out a square wave or a constant value to FPGA analog out put.  I know that this might be solve by using Square wave generator express vi in FPGA.vi, how ever, in order to save FPGA card usage, I want to use the Square wave generator function on host vi. 

 

The first problem I encountered was  Square wave generator function outputs an array instead of a scale so it cannot be connect to the output I/O node of FPGA function.  Then I tried Square wave PtByPt. However, the description of the functino is somewhat vague to me.  What I get now is a constant value defined by amplitude instead of a square wave.  If I set the amplitude at 4, then the wave is a constant line with value 4, and whether it's 4 or -4 is dependent on the frequency I set.  I don't know if it's caused by the wong setting of time parameter of the function.  

 

Can someone help me to figure out how to output a square wave on Host vi? Thank you.

Download All
0 Kudos
Message 1 of 6
(5,264 Views)

Hi Solijang,

 

Your timebase input is not configured correctly. You should take care to see that step time<0.5*fmax. In addition you must also append values to your graph as they come. Please refer to the attached VI.  Hope this helps.

 

Ipshita C.

National Instruments
Applications Engineer
0 Kudos
Message 2 of 6
(5,226 Views)
Thank you very much for your reply.  However, my Labview version is 8.5 so I can't open this file.  Could you please upload the file in 8.5 version?  I appreciate it. 
0 Kudos
Message 3 of 6
(5,201 Views)
Solution
Accepted by topic author soljiang

Here is the same VI in 8.5. Hope it helps!

 

Ipshita C.

National Instruments
Applications Engineer
0 Kudos
Message 4 of 6
(5,188 Views)
Thank you very much indeed!
0 Kudos
Message 5 of 6
(5,184 Views)
However, could you tell me what this Time parameter specifies?  If the frequency is 1KHz, then the period is 1ms, so what does this time mean?  Is it time interval between two data points, which means the time between the dots on square wave is generated?
0 Kudos
Message 6 of 6
(5,180 Views)