From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using two separately acquired voltage waveforms to plot XY Graph.

Hi all,

 

I am a relatively new user to Labview.

 

My code is currently able to output an analog voltage signal, while simultaneously acquiring two analog voltage signals. However, there are a few problems with my code and I have been reading about possible solutions, but no luck so far. The ultimate goal is to plot the output voltage against one of the acquired voltages in an XY graph. But let's start with the problems that need to be fixed first before I move on to more complicated things.

 

Problems:

 

1. When I click on 'START DEMAG' it gives me an error: "Specified operation cannot be performed while the task is running"

 

I cannot figure out what is causing this. Does anyone have a suggestion?

 

2. After I did some reading, it seems like I will need to use shift registers to route the acquired waveform data out of the while loop. Then I will need to do the same for the output voltage, then bundle the data and route it into an XY graph.

 

The problem is that the sampling rate for the input voltage is different to the sampling rate for the output voltage. That makes things more complicated, and I am not sure how exactly to route the data out of my while loop.

 

I have attached my file, with the subVI's that it needs to run. I would be ecstatic if you had any suggestions, since I have been struggling with it for some time now.

 

 

 

 

0 Kudos
Message 1 of 4
(2,242 Views)

You are creating two different tasks that both use the same channel Dev1/ao0.

 

That doesn't make sense.

 

And if you want to output to two different analog channels, they need to be in the same task anyway.

0 Kudos
Message 2 of 4
(2,236 Views)
I have the same issue. I acquire two signals from the same daq. And I want to plot one signal against the other.
I extracted the sample value from every waveform sample.
And then bundled it with the other waveform's sample value.
Then I used the XY Graph to plot the two values but instead of giving a proper continuous single it gives me a spider web.
0 Kudos
Message 3 of 4
(2,104 Views)

This is an old thread that is pretty much unrelated to your question.

 

Post your question in a new mesage thread.  Attach your VI where you've saved some typical data into the controls and indicators as defaults.  Even attach a screen shot of your VI so we can see what you are describing.

0 Kudos
Message 4 of 4
(2,087 Views)