LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to load files and selecting data using "read measurement files.vi"?

Hi there,

 

I have a problem on how to construct a VI to read the PID values from a .txt file for temperature controller PID setting. I was thinking that using the "read measurement file" vi to get the data, but don't know how to select the correct group of PID for a given temperature.

 

I have attached the VI and also the PID file.

 

I really need your help. Thank you in advance.

 

Download All
0 Kudos
Message 1 of 3
(2,940 Views)

I would just use the Read From Spreadsheet File.vi to read the file as an array of numerics.  Then you just do your search on the temperature channel to find your PID coefficients.

 

Additional notes:

You should initialize your serial port before the loop and close it after the loop.  This will leave the port open for all of your writes inside of the loop.

You should read this file before the loop.  File IO tends to be slow and you don't need to repeatedly read that file.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(2,928 Views)

Thank you for your reply.

 

Could you please tell me more details on how to search and find the PID coefficients from the array?

 

Thanks 

0 Kudos
Message 3 of 3
(2,916 Views)