LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiplexed Square Wave

Hy to all

 

I'm working on a project where I have to build a sensor. I'm using 8 analogue outputs and 8 analogue inputs. On every output I have to send one square wave impulse positive and negative with various amplitudes. But they have to be multiplexed, that means first the impulse has to be on output 1 and all imputes have to read the data, then the first has to be 0 again and the next output 2 gets started.

I've written a program and it logically works fine, but as soon as I run it on the FPGA noting happens. It takes 45 min to compile and I don't know what the problem is. I wanted to measure simply the output with an oscilloscope and the is no signal. 

If you have time can you look at the program and give me some ideas what the problem could be.

 

 

Thanks

0 Kudos
Message 1 of 2
(2,463 Views)

hello,

 

it looks like a timing problem. Here are a few tips:

 

1. the output is in the same loop as the input, but the inputs have their own loop afterwards. This means that the output is written a little too infrequently and is therefore not updated. You should probably separate input and output. Also check the calculations at the top to make sure they don't generate values that are out of the ordinary

 

2. you can create the square wave in a separate loop and pass its value with a local variable to other places in your code. This is also good to test the output without interference from the inputs.

 

3. you really don't need to connect the same wire in parallel to your sequence structure. Just pass it in once and reuse the same wire in every frame. It will make it easier to read.

 

Regards,

Joseph

0 Kudos
Message 2 of 2
(2,431 Views)