09-07-2024 11:32 AM - edited 09-07-2024 11:57 AM
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..
09-07-2024 12:41 PM
Is your VI running on the host PC or cRIO? Can you upload your entire project?
09-07-2024 01:35 PM
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?
09-08-2024 12:41 AM
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.
09-08-2024 01:05 AM
Hi GerdW,
*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.
*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.
*Should I stop the local variables to increase speed?
*I am currently doing 1ms cycling (adjusted setting in the picture)
*I don't fully understand
*I don't fully understand
***
I have attached the project file
Thank you for your help.
09-08-2024 12:10 PM - edited 09-08-2024 12:12 PM
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
09-15-2024 10:42 AM
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.
09-15-2024 12:30 PM
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