Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

myRIO Unknown Error -363004 at Analog Output

Highlighted

Dear Forum,

 

Just wondering if anyone out there could advise me please.

 

I'm setting up code on the myRIO (using the myRIO function palette) to create a simple signal generator on the analog output, however at the AO function I receive Unknown Error -363004 as shown below:

Capture.PNG

 

This error doesn't occur, however using the high level analog output function.

 

Does anyone have any suggestions on why it may be happening?

The thoughts I've tried (to no avail)

  • Take the modulus of the output values, therefore all positive values
  • offset the amplitude of the wave to +0V and above, even with a square wave outputting either 0 or 4V it errors.
  • Set AO open to "allow multiple opens"
  • Input Random Number -- Build Array -- AO Write (this does work)
  • Replace While Loop with Timed Loop
  • Change the loop timing

Code shown below (and attached) as a VI Snippet.

Low-Level code (producing the error):

SigGen VI_snippet.png

 

 

 

High Level code (which works):

HighLevel Snippet.png

 

 

Any suggestions, big or small would be greatly appreciated!!

Kind thanks,

Tori
Student
0 Kudos
Message 1 of 6
(5,693 Views)
Highlighted

Hey Tori,

 

The analog output VI that you are using writes a single analog value per pin.  When you call the analog open VI you are determining how many pins to write to and the array passed to the analog write VI is one value for each channel.  In your code you open a single channel and then pass multiple values to the analog write VI.  I assume this is what is casing the error.

 

If you want to write out a waveform you'll need to use a for loop to iterate over each sample in the waveform and write the values one at a time using the analog write VI.  You may want to consider using a producer consumer architecture to achieve this.

 

Let us know if that helps or if you have more questions.

 

Thanks!

 

-Sam K

LabVIEW Hacker

Join / Follow the LabVIEW Hacker Group on google+

0 Kudos
Message 2 of 6
(5,687 Views)
Highlighted

Hey Sam,

 

Thanks for the fast response and suggestion!

 

If you check the help file for the AO function, it shows that the input to the "Values" must be a 1D array of double, therefore by inserting a for loop, the values then must be built into an array within the for loop to avoid a broken wire into the AO function.

When reading this back into AI, however, the sine wave is no longer being outputted like a sine wave.

 

To check I've implemented it as you expected, my amended code is shown below.

 

Kind thanks,

Edited.png

Tori
Student
0 Kudos
Message 3 of 6
(5,682 Views)
Highlighted

Hey Tori,

 

When you say: "the sine wave is no longer being outputted like a sine wave."  What exactly do you mean?

 

When you pull the data points out of the waveform data type you lose the timing information.  As a result the code you've written will output the data points as fast as it can (as fast as the for loop can iterate).  Try adding a delay to the for loop and see if that gives you better output.  The delay will determine the frequency of the 'sine wave' and you may have to play with the timing and number of samples to get a nice smooth output.

 

Again, let us know if that helps or if you have more questions.

 

Thanks!

 

-Sam K

LabVIEW Hacker

Join / Follow the LabVIEW Hacker Group on google+

 

0 Kudos
Message 4 of 6
(5,679 Views)
Highlighted

Hi Tori,

 

Have you fixed that problem?

 

CZ

0 Kudos
Message 5 of 6
(5,149 Views)
Highlighted
Can you provide the picture of hardware
0 Kudos
Message 6 of 6
(185 Views)