LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI Cdaq as Tranceiver

I am not very fimiliar with graphical programming environment of Labview. I am having trouble in Low level programming of Cdaq. 
  1-  I have attached the VI. I am able to send and receive a simple sin wave via Cdaq. But when i place my signal generator VI(E-SIM Modulator) in loop i get error. Signal generator VI will give me 192 sample values as 1D array of waveform, whenever called.
I want to send those sample values via Cdaq NI 9263 module and then acquire as well simultaneously via NI 9201 module. Once i've done that i need to call my signal generator VI again to generate new 192 sample values  and TX and RX them and so on. I have tried placing it inside the loop as well and iv'e had various errors i.e. 200479 .
 
2- Secondly when i acquire values i want to feed 192 sample of it in my E-SIM-OFDM Demodulator VI, in form of 1-D array.
 
I have attached a simplified flow diagram, main VI and subVI's.
Any kind of support would be very helpful .
Thanks
Regards

Mohammad Ahsan
CIIT Lahore
0 Kudos
Message 1 of 6
(2,838 Views)

I don't see where you are trying to write new samples to the analog output inside the loop.  I do see you trying to change the clock sample rate in the loop.  Thata is what is probably causing your error because I don't think you'd be able to change your sample clock rate while a task is running.

0 Kudos
Message 2 of 6
(2,825 Views)

I want to place E-SIM-OFDM(subvi) inside the loop, where it would produce fresh data (192 samples) for every iteration. Im not sure whether to use nested loop structure or what. 
The data rate changing entity iside the loop that you mentioned can be removed it's not mandatory. 

0 Kudos
Message 3 of 6
(2,806 Views)

Your rate changing property node MUST BE removed.

 

Your subVI should be just fine inside the loop.  The problem is that you never use the output of that subVI such as writing it to an Analog Write.

0 Kudos
Message 4 of 6
(2,788 Views)

Thanks RavensFan.
I have modified the file and attached it. My data generation VI is working fine and data is being written as output on NI 9263's pin ao0. But still i'm not able to receive it at same time on Pin ai0 of NI 9201 module.
I have tried different approachs i.e. serial triggering, but Read is not triggering on every loop iteration.

 

Im trying to implement a Visible light communication system using Enhanced SIM-OFDM. I have designed my modulators and demodulators. Now i want to use Cdaq as DAC and ADC of Transmitted and received signals respectively. I'm not able to get a hang of Cdaq yet.

Download All
0 Kudos
Message 5 of 6
(2,761 Views)

Hi ahsan911,

 

This may or may not be the source of your problem, but the DAQmx Start Task VIs should come before the while loop, not be in the while loop. Try moving those VIs out of the loop to the left side. 

 

You may also be interesting in looking at some of our DAQmx example programs. You can find these in LabVIEW by going to Help->Find Examples. There are many examples you would probably find very useful under Hardware Input/Output->DAQmx

0 Kudos
Message 6 of 6
(2,726 Views)