05-25-2010 11:59 AM - edited 05-25-2010 12:00 PM
Hello,
I am completely new to LabView and am trying to write a program that will create a BPSK/QPSK or QAM signal for me to create using my department's DAQMx Board (NI PCI-MIO-16E-1). I do not have the modulation toolkit and therefore need to do this from scratch (I'm guessing).
My main question is whether it would be possible for me to create my desired signal in MATLAB - since I'm actually comfortable programming with this language - and then move my signal into LabView for it to be pushed out as a real voltage signal using the DAQ boar.
Either way, what would be the quickest way for me to create these signals if I do not have the Modulation Toolkit I'm seeing throughout the NI website?
As things are, I've already managed to output some built-in waveforms(sine, triangle, etc.) using the available functions in LabView. However, if I try to make a sine wave using MATLAB code
(e.g. x = 0: pi / 24:2 *pi ; y = sin(x); ) where I take y as the output of my Mathworks box and connect it to the 'Build Waveform' block whose output goes to the DAQ assistant, I get errors about my MATLAB code not executing.
Ultimately, what I would like to do is create the signal to drive a PCB I have to modulate a laser diode and then capture it again at the output of a photodiode.
Thanks for your help!
Spyros
Solved! Go to Solution.
05-28-2010 03:16 AM
Hi Spyros,
Would you be able to post your code so we can take a look at why the code is producing errors?
Regards,
Jas.W
05-28-2010 02:37 PM - edited 05-28-2010 02:40 PM
Hello,
I've changed my approach since I first posted my problem. Now what I would like to do is output an analogue voltage signal using the DAQmx which will represent a 4- message Differential Pulse Position Modulated (4-DPPM) signal. So far, I have managed to write some code that takes in a .txt file with an arbitrary message and outputs a stream of bits representing the ASCII equivalents for the message's characters. This stream is then encoded two bits at a time such that:
'00' --> '1'
'01' --> '01'
'10' --> '001'
'11' --> '0001'
What this step should translate to is a pulse of duration Tc (chip period) where there is a 1 and zero (of duration Tc) where there is a zero.Please see the picture attached if this doesn't make sense.
Currently, I am stuck using the example 'Cont Gen Voltage Wfm-Int CLK.vi" because I am not sure how to replace the waveform buffer generation block. Ideally, a for a given sequence, I would like to create a signal for which I can control the chip period Tc, the sampling rate and the amplitude of the pulse. I have attached my .vi with the abovementioned example too. If you have any ideas on how I could do this, I would be more than happy to hear them.
Thanks!
05-30-2010 01:04 PM
Update:
I have continued on with my code and can now input my data points to the DAQmx. However, I am stuck on timing, since each data point (one data point = one array cell) equals 1 sec. How can I change this so that I can ultimately control the bit rate?? I have attached my new code...
06-03-2010 04:07 AM
Hi Spyros,
Jason's actually out of the office at the moment which is why he hasn't been able to get back to you. How have you gotten on with your application?
Regards,
Imtiaz Chowdhury
Project Manager
Green Running / Austin Consultants
06-03-2010 05:35 AM
Hello Imtiaz,
luckily I've managed to solve it all over the last few days. Thanks for your help!
Spyros
06-03-2010 05:39 AM
Hi Spyros,
Glad to hear you've got it all working now! 🙂
Regards,
Imtiaz Chowdhury
Project Manager
Green Running / Austin Consultants