LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Spartan3E_Timed Loop_DAC

Hello experts,

 

I am working with Spartan3E FPGA module. Previously I have worked on FlexRIO PXIe 7966 and NI 5781 adapter module. As a starting point I am trying to generate sine wave with Spartan board. After a little R&D i realised that accessing DAC in this board is completely different then 5781 and 7966 system. I have to set up SPI communication to send data to the DAC. I tested the example code of DAC and it ran successfully. Now for my sine wave generation I want to use single cycle timed loop. When I am using single cycle timed loop with sequence inside to generate clock transition (I/O: SPI_SCK) and DAC chip select terminal (I/O: DAC_CS), I am getting following error:

 

Arbiration option not supported in the single-cycle Timed Loop

  Resource: 'DAC_CS' (Output Data Interface)

 


So now i understand that these i/o are not supported in single cycle timed loop, then how would i generate a smooth sine wave without any delay. Does anyone have any sample code for sine wave generation? I tried to search it but i couldn't find it. My actual aim is not to generate only sine wave, I am planning to develop a modulation system. For this as a starting point I need to generate sine wave first.

 

Help is really appericiated..... Thanks...

0 Kudos
Message 1 of 3
(2,098 Views)

What sort of sampling resolution do you need on the sine wave? It may make sense to use the "Wait for multiple tick" timing primitive to get the behavior you want (of course assuming that the time to complete one iteration of the loop does not exceed the time period alotted to the sample period). Using the SPI AIO stuff is not going to work for SCTL since the helper VIs will take some number of clock cycles to complete

0 Kudos
Message 2 of 3
(2,066 Views)

Thanks BradM for the response... The problem is, because I am not able to use timed loop the process takes its own time to excecute and I get steps in my output signal. What I want is to have a proper sine wave. The other problem is as to access DAC you need to communicate on SPI, you have to convert your digital word in to the boolean stream and these converted boolean array has to be written on SPI_MOSI i/o. Which force you to use for loop to index the array elements. So considering all these issues I am not able to generate a sine wave itself. Has anyone generated sine wave from Spartan3E board with the help of LabVIEW?

0 Kudos
Message 3 of 3
(2,060 Views)