LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to enter the phase of a signal and get in return its corresponding voltage?

Solved!
Go to solution
Well, I ran it that way, and I got an array of 4 numbers out of the MathScript node. You then insert 0 for a total of 5 number. That doesn't seem like a whole lot of numbers to graph. The plot is showing you exactly what you're providing - 5 data points. The figure you showed in the Word doc seemed to imply a lot more numbers. I think your problem is with the code in the MathScript node.
0 Kudos
Message 31 of 38
(1,261 Views)

Hello , it`s me again.

in my application, i am sending an array of 4 elements in a  DAC with four analog output. i want each element of the array four example 0 1 2 3 to go to output a0 a1 a2 a3. For now, i can only send each element to the four outputs and this is not what i want. I need to find a way to direct each element of the array to the specific analog output.

Thanks... 

0 Kudos
Message 32 of 38
(1,224 Views)
0 Kudos
Message 33 of 38
(1,215 Views)

marylydie,

 

Using the "DAQmx Write Analog 1D Wfm NChan 1Samp .vi", the Data array follows exactly the behavior you are describing.  According to the LabVIEW Help for DAQmx Write for the Data terminal: "data contains a 1D array of samples to write to the task. Each element of the array corresponds to a channel in the task. The order of the channels in the array corresponds to the order in which you add the channels to the task."  So your task is currently writing the sample in the 0th element of your array to channel 0 and so forth.  Does this not reflect the behavior you are seeing?

Message Edited by Seth B. on 10-30-2008 01:53 PM
Seth B.
Principal Test Engineer | National Instruments
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 34 of 38
(1,194 Views)

what i have is 0 onto all the ports, then the second number onto all the ports again and so on...

I want to be able to read the 0 on the first port and the second number on the second port.. 

0 Kudos
Message 35 of 38
(1,183 Views)
Hello marylydie,

I took a look at your code.  It would be good to strip the code down for troubleshooting purposes.  The behavior that you want is the way that DAQmx Write should work.  Try building a simple 1D array with 2 elements.  Then write this array to your device.  The first element in the array will correspond to the first channel you specify.  The second element in the array will correspond to the second channel you specify.  Your simplified program might look something like this.



Give this a try and let me know how it goes. 
Message Edited by RT4CY on 11-03-2008 02:01 PM
Rod T.
0 Kudos
Message 36 of 38
(1,156 Views)
I thank you very much for your respond. The Daq i was working on was not mine. Now that i have mine from another manufacturer everything works as i want. I have one last question( tis project count for my Bachelor degree). I am trying to plot a graph whose input are: -The 1 D array element(Phase in my block diagram) - i also introduce an output in the matlab script. i called it Thmax. This would represent a single point. I need to plot a graph with those two outputs. the single point should be highlited in the graph. I tried those sub VIs: - Plot Waveform -Polar plot ( since i am dealing with angle). Please help me out...
0 Kudos
Message 37 of 38
(1,135 Views)
Hi marylydie,

I'm happy to hear things are working!  Since this is a new question, it may be more appropriate to create a new thread.  I mostly deal with the DAQ side of things, so maybe somebody in the LabVIEW group would be able to better assist you.  In your next post, you may want to say what the results of trying the Plot Waveform and Polar Plot functions.  Were you able to have success with these?  If you are new to LabVIEW, it is a good idea to bring up the Context Help window when using new functions.  You can bring this up by simply pressing ctrl+H and hovering your mouse over the function.  You will get a window like this.

Message Edited by RT4CY on 11-04-2008 08:16 AM
Rod T.
0 Kudos
Message 38 of 38
(1,126 Views)