LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting FPGA square wave generator to FPGA digital I/O Module NI9401

I am trying to create a square wave generator in which I am able to control the values for: frequency, amplitude, and duty cycle. Currently have working code to do all except change the amplitude.  

 

Thought of using FPGA Math & Analysis Square Wave Generator, but am having problems connecting it to the FPGA I/O Module. I am using the high speed digital I/O module NI9401, compactRIO, and LabVIEW 8.6.

 

LabVIEW help menu says this for FPGA Math & Analysis Square Wave Generator:

 

"To pass the square wave to an output line, you can wire square wave out to an I/O resource using the FPGA I/O Node."

 

Does anyone know how to do this?

 

When we try to do this, we get an error because the I/O module will only take a boolean input and the o/p of the Square Wave Generator is set for 16-bits.

 

For reference, I have attached the current code for both the FPGA target and real time controller.

 

Please advise.

 

Thanks,

 

Tim

 

 

Download All
0 Kudos
Message 1 of 5
(4,222 Views)

Have you tried this:  ( near the bottom square wave generator)

 

http://zone.ni.com/devzone/cda/tut/p/id/4799

 

http://zone.ni.com/reference/en-XX/help/371599D-01/lvfpga/fpga_square_wave/

Message Edited by RRRRSSSS on 11-10-2008 06:53 AM
0 Kudos
Message 2 of 5
(4,201 Views)

Yes, I have tried this. This is the same help file givin within labview.

 

I need to know how to connect this square wave generator to an FPGA I/O module - for instance i/o port#1. I am using the NI 9401 module, which is high speed digital i/o module.

 

The code I have attached replicates a square wave generator without using the square wave generator module.

 

The problem with this code is that I need to be able to vary the amplitude of the square wave.

 

The current code does not allow for me to do this, and the square wave generator module does allow this - which is why I need to know how to properly connect it.

 

If anyone has any other suggestions as to how to vary the amplitude of the square wave, I would appreciate your thoughts.

 

Thanks.

0 Kudos
Message 3 of 5
(4,169 Views)
The 9401 is a 5V TTL digital I/O module.  You can't vary the amplitude of it's output.  It either outputs logic high or logic low.  If you need to vary the amplitude, you will either need to look at using an analog output module (model numbers 926x) or interface the 9401 to some analog circuitry external to the module.  In the latter case, the 9401 simply services as a communication interface to the analog circuitry.
0 Kudos
Message 4 of 5
(4,158 Views)

Hi

Have you solved this problem

I want to do the same thing But I cannot

Thanks

0 Kudos
Message 5 of 5
(2,458 Views)