Programming/Importing Nonlinear Outputs

The next project I’m working on sounds like it might require some interesting output values. The plan would be along the lines of providing a signal to a power supply that would simulate the power supplied from a solar panel (basically a daily bell curve). Programming in the equation(s) via variables would be doable, but would be limited in its flexibility if changes to the experimental schedule were to change down the line. Is there a way to import real data (possibly as a .csv file) to use as this output? If it is possible, how flexible is the ability to import (just into the PAC Control for a more realistic single data set, or directly through the groov EPIC eliminating the need to reprogram the logic when a new output is needed)?

1 Like

Absolutely! It’s very doable. Check out this old forum post that explains how to read in a CSV or even a TXT file - Reading a csv file in PAC control - #5 by philip

Welcome the forums Chris.

To the second part of your post, can a CSV file be uploaded outside of PAC Control…

Yes.
Two options.

  1. If you are Ok with having the person doing the CSV upload having access to groov Manage, they can do it through the file menu.
    PAC Control can then detect the new file and use that in the code that @Dan_Opto linked to (Or your variation on that code).

  2. If you don’t want anyone beyond an admin having access to groov Manage, then you can use Node-RED dashboard to upload the file from any web browser, and again, once uploaded, PAC Control will read the file and go from there.
    How to make a Node-RED upload options is in this post here: Upload files to EPIC or RIO from any browser

BTW, on a personal note, I track my solar system output vs solar radiation via my SNAP and EPIC system.
Here are the curves from the past few days…

I’ve attached the CSV file from this groov View graph if you need something to test on.
solarRadationCurve.zip (10.0 KB)

Sounds like a really cool project you are working on.