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: 

Encountered error -50103

Solved!
Go to solution

Actually that is what I am trying to do it is similar to the one which I am trying to do but in that example I am trying to vary the frequency of second sub vi, can you help me with that. Is that the correct proceedure?

0 Kudos
Message 11 of 25
(789 Views)

I encountered an error like this 

 

Error -200524 occurred at 2277.vi

 

channels in the data does not match the number of channels in the task.

When writing, supply data for all channels in the task. Alternatively, modify the task to contain the same number of channels as the data written.

Number of Channels in Task: 2
Number of Channels in Data: 4

Task Name: _unnamedTask<33>

 


0 Kudos
Message 12 of 25
(772 Views)

I don't think you understand what I'm trying to tell you, because you keep making the same mistake.  Did you try just running the example that you directed me to, without modifying it?  It will generate sine waves on both ao0 and ao1. 

 

I understand that you are trying to do something different.  You are trying to run different waveforms on each channel.  You have all of the pieces of the puzzle...you're just having trouble putting them together.

 

If you're unable to open the code I'm posting, because you're using an older version of LabVIEW, please say so.  It's pretty clear that you're not running the code I've posted for you, and I assume that's because you're unable to do so.  It would have helped if you'd told me that.

 

Here is a picture which shows exactly what you need to do.  This will generate sine waves of different frequencies on each channel.

 

2chan a0 diff wfms.png

This tells you everything you need to know.  It's essentially a combination of everything I've posted for you.  Do it exactly like this.  The functions I'm using to generate your sine waves can be found here:

 

analog wfm generator.png

Message 13 of 25
(771 Views)

Thank you very much I am done with the code.   

0 Kudos
Message 14 of 25
(769 Views)

I really thank you very very much and sorry for troubling you if any.

0 Kudos
Message 15 of 25
(762 Views)

You are very welcome!  We might not have understood each other the whole time, but we solved the problem and that's what matters, right?  Smiley Happy

 

It is working correctly for you now, I hope?  If it's not, let's keep working at it until it is.  I'm not going to abandon you.  Smiley Happy

0 Kudos
Message 16 of 25
(760 Views)

Thanks for it actually it is working correctly, but the thing is can we use internal trigger such that both waves start at same point when it is triggered.

0 Kudos
Message 17 of 25
(745 Views)

Hi chinna06,

 

You can use a start trigger so that you can control when the analog generation starts. A good example of an Analog Output Voltage Generation can be found by going to Help and selecting Find Examples in LabVIEW.

 

From there navigate to Hardware Input and Output » DAQmx » Analog Generation » Voltage » Cont Gen Voltage Wfm-Int Clk-Dig Start.vi

 

This example shows how a start trigger can be added that waits for a digital edge to start collecting data.


Milan
0 Kudos
Message 18 of 25
(728 Views)
What do you mean, both waves start at the same point? You have one task, with two channels. The output of both channels will start simultaneously, by definition. Are you referring to the phase of the output signals?
0 Kudos
Message 19 of 25
(724 Views)

what I am trying to say for suppose when we run the code initially there should not be any wave form output and when we give trigger then both the waves should start simultaneously and should be synchronous to each other.

0 Kudos
Message 20 of 25
(718 Views)