LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Encountered error -50103

Solved!
Go to solution

Hii I am trying to output analog voltages but I can't as I found out It is due to err(-50103). Can anyone tell me the reason for it and possible solution. I am attaching my files with this.

0 Kudos
Message 1 of 25
(3,719 Views)

I'm not trying to be mean or anything, but please do try searching the forum before posting a question.  This question has been asked and answered many times.

 

Error -50103 tells you that there is only one analog output sample clock.  Therefore, if you want to generate analog output simultaneously on multiple channels, you must combine the channels in a single task.  Right now you have two separate tasks, both of which are trying to use the same clock to generate output.  Error -50103 tells you that you can't do that.  Oddly enough, your two separate tasks also use the same physical channels with all of the same parameters. 

 

Why all that duplicate code?  You already specify both channels (ao0:1 means you will generate output on analog output channel 0 and analog output channel 1) in a single task, you're generating a waveform for each channel...in fact, your code looks almost identical to one of the examples which ships with LabVIEW (and that's great that you started there -- good for you!).  You don't need all that duplicate code.  Get rid of it. 

Message 2 of 25
(3,711 Views)

Sorry for the confusion. i was trying to generate two sinusoidal wave using two different output channels with different frquencies. So, one channel was supposed to be a0 and another channel is a1.

0 Kudos
Message 3 of 25
(3,707 Views)
Solution
Accepted by topic author chinna06

You still have to put your channels in the same task, though.  You can generate different waveforms on different analog channels -- it will require a bit more programming -- but you're confined to one task since you only have one clock.  Does that make sense?

Message 4 of 25
(3,697 Views)

Thank you for helping. I am a beginner in Labview can you give me an idea of how to do that.

0 Kudos
Message 5 of 25
(3,693 Views)

First of all, search the forum.  Smiley Wink

 

After you've done that, come back with specific questions and we'll guide you along.

 

A few hints:

 

1.  You only have one clock, so your clock frequency will need to be high enough to generate your highest-frequency sine wave.

2.  It will help A LOT if you can define your frequency ranges up front.  That will allow you to choose a clock rate which will work.

3.  Waveforms aren't going to be the easiest way to do this.  You will probably want to use a numeric array datatype.  It will be a 2D array.  Row 0 of the array will contain the sine wave for channel 0.  Row 1 will contain the sine wave for channel 2.

4.  You can still use waveform generation VIs to generate your sine waves if that's easier.  To get the waveform components, including a numeric array containing the sine wave, this will be your friend:

 

get waveform components.png

 

See if that gets you started.

Message 6 of 25
(3,690 Views)

Actually, I take that back.  Using waveforms will be fine as long as both waveforms have the same sampling parameters:

 

diff ao wfms.png

 

Just make sure you set your sampling parameters appropriately, the Nyquist theorem and all that, such that you have enough samples to generate your sine wave accurately.

0 Kudos
Message 7 of 25
(3,685 Views)

DianeS

 

I just tried in the following way and still encountered some error and can't figureout what the eroor is can you help me with that?

0 Kudos
Message 8 of 25
(3,656 Views)

You are doing exactly the same thing as you were doing before.  Why are you surprised that you're getting the same result?

 

Look at my first answer to your post.  Specifically, look at the code I posted, which fixed your problem.  Did you actually try to run it?  It would appear not.  Your task already contains both channels.  You only need one task, which contains both channels.  Do not set up two separate tasks, both of which contain both channels.

 

Try this.  Don't modify it.  Just run it.  I don't have your sine wave subVI so I will assume that you are using the same sampling parameters for both waveforms, as you were told to do.  I'm happy to look at it for you if you want to attach it, though.

0 Kudos
Message 9 of 25
(3,651 Views)

Thanks, I understood it. Can you kindly see the example provided by NI that I can't execute it, It is in this link

 

http://zone.ni.com/devzone/cda/epd/p/id/1423#0requirements

0 Kudos
Message 10 of 25
(3,648 Views)