LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Configurable voltage ramp generator with myRio

After looking some documents, I found that there is a function similar to DAQ Assistant.

 

Required and Optional Software to Program NI myRIO

 

See second image and try it.

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
0 Kudos
Message 11 of 22
(837 Views)

I just checked them and they present the same problem, which is that the function's input can't be a waveform, but I need to output the waveform (the voltage ramp) which has been coded in the images that I posted above.

0 Kudos
Message 12 of 22
(827 Views)

Well...... myRIO isn't function generator, you should develop your own code to generate waveform on myRIO.

If myRIO has a function which only generate 1 point signal, you can use it.

 

For example, put it into while loop, prepare ramp data as array, write the data continuously.

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
0 Kudos
Message 13 of 22
(817 Views)

I used the high throughput FPGA add on to get n samples (I guess it is better for waveforms) and made the waveform into a 2D array then the array was the input for the myRio write function.
The code ran but it gave me an error can you help me with it?
The 2 images attached show the code and the error

Download All
0 Kudos
Message 14 of 22
(803 Views)

Hi Habch,

 


The code ran but it gave me an error can you help me with it?

Why don't you read the myRIO help and related documents?

(Did you create that myRIO task with just one channel, but then you provide two channels with your 2D array?)

 


I used the high throughput FPGA add on to get n samples (I guess it is better for waveforms) and made the waveform into a 2D array then the array was the input for the myRio write function.

Where did you use that FPGA function?

Why do you create a waveform just to convert it into a 2D array? What's the point of using waveforms then???

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 15 of 22
(796 Views)

Error Codes (myRIO Toolkit and roboRIO Toolkit)

 

We can search the error information on web.

I guess dimension of 2D array should be 1*N or N*1 because configured channel was only one.

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
Message 16 of 22
(803 Views)

It was made into a waveform to give a linear ramp voltage generation, but myrio funtions can't recieve a waveform input (unlike cdaq) so i transformed it into a 2D array with the time and Y being the 2 columns so i could input it in the write function of the myRio.

0 Kudos
Message 17 of 22
(799 Views)

It says "The number of scaling constant values provided does not match the number of channels that you specified."

But if i give a 1*N array then how will i control the time of the ramp, 

With the sample rate frequency?

0 Kudos
Message 18 of 22
(792 Views)

Hi Habch,

 


But if i give a 1*N array then how will i control the time of the ramp, 

With the sample rate frequency?


You might read the myRIO help - as I did. There is the possibility to output "n samples"

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 19 of 22
(781 Views)

So this says that the output time between 1 sample and another (so the 2 successive numbers in an array) is that decided by the sample frequency which can be between 1 and 80 khz for the write function.

Is that correct?

 

0 Kudos
Message 20 of 22
(774 Views)