LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CRIO Array to Analog Output

Hello everyone,

 

I am working with CRIO9074 (mcu side) with the block below I transfer the data  (from lvm file) consisting of "variable and voltage columns" to both the array and the graph with 1 millisecond intervals.

 

However, when I want to take the data from the array and transfer it to the CRIO analog output, the software cycle slows down a lot. How should I do this?

 

Best regards..

 

btncan_0-1725728209291.png

 

 

0 Kudos
Message 1 of 8
(360 Views)

Is your VI running on the host PC or cRIO? Can you upload your entire project?

-------------------------------------------------------
Applications Engineer | TME Systems
0 Kudos
Message 2 of 8
(329 Views)

Hi btncan,

 


@btncan wrote:

I am working with CRIO9074 (mcu side) ..

However, when I want to take the data from the array and transfer it to the CRIO analog output, the software cycle slows down a lot. How should I do this?


  • What do you mean by "slows down a lot"? What exactly is "a lot"?
  • You use the ScanEngine: what is the sample time of the ScanEngine? (You know the 9074 is very old and slow when using the ScanEngine?)
  • Why do you need all those local variables?
  • Why do you need a 1MHz timed loop?
  • Why do you use a XYGraph on a headless (aka does not support a monitor!) cRIO?
  • Why do you access the file twice?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 8
(318 Views)

The project is running in CRIO and the file reading is done from the "C:\" drive in 9074.

 

There was no problem reading the data and transferring it to the array.

 

I will upload it below.

0 Kudos
Message 4 of 8
(300 Views)

Hi GerdW,

  • What do you mean by "slows down a lot"? What exactly is "a lot"?

*I set the loop speed to 1ms, after file transfer it becomes 17ms. I used "pi" controller as controller. The original version was in the project file.

 

  • You use the ScanEngine: what is the sample time of the ScanEngine? (You know the 9074 is very old and slow when using the ScanEngine?)

*Iam currently working at 1ms cycle speed (the setting in the picture has been changed), I am also working on the FPGA side (25uS) but I wanted to work on the mcu side first.

 

  • Why do you need all those local variables?

*Should I stop the local variables to increase speed?

 

  • Why do you need a 1MHz timed loop?

*I am currently doing 1ms cycling (adjusted setting in the picture)

 

  • Why do you use a XYGraph on a headless (aka does not support a monitor!) cRIO?

*I don't fully understand

  • Why do you access the file twice?

*I don't fully understand

 

***

I have attached the project file

Thank you for your help.

 

 

0 Kudos
Message 5 of 8
(297 Views)

Hi btncan,

 


@btncan wrote:

I have attached the project file


You didn't attach the "project file", but only one VI…

 

Your whole VI could fit on y FullHD screen:

 


@btncan wrote:

*I set the loop speed to 1ms, after file transfer it becomes 17ms. I used "pi" controller as controller. The original version was in the project file.


Just because you define a loop rate doesn't mean the code inside could be execute as fast as you like to…

How long does the ScanEngine need to read your AI and write the AO?

 


@btncan wrote:
  • Why do you need all those local variables?

*Should I stop the local variables to increase speed?

 

  • Why do you use a XYGraph on a headless (aka does not support a monitor!) cRIO?

*I don't fully understand

  • Why do you access the file twice?

*I don't fully understand


  • You don't need local variables once you use more wires and less sequence frames!
  • Your cRIO doesn't support any frontpanels displayed on a monitor, so you don't need any charts/graphs in the VI…
  • You call ReadDelimitedSpreadsheetFile twice in the first frame, but only use the putput of one call. Why?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 8
(276 Views)

btncan_0-1726414800758.png

 

Hello,

I edited the software as follows and limited the size of the read data to 1 second (1000mS), but unfortunately the main loop operating speed is over 1ms.

0 Kudos
Message 7 of 8
(233 Views)

You want to start debugging and find out which part of your code is slowing down.

The first thing I would check is your subVI. You can use VI Profiler to monitor the execution time.

What's the execution setting of your Derivative SubVI? You might want to try setting it to subroutine to minimize the overhead. See VI Execution Speed

-------------------------------------------------------
Applications Engineer | TME Systems
0 Kudos
Message 8 of 8
(222 Views)