Jump to content

Recommended Posts

Posted

Hello Ray,

It seems that you can't have the struct retain on its own.

Alternatively, you should be able to STORE the information you want retained into placeholders. You could use the startup bit "General.Ladder Initial Cycle" and move that info back into the PID Config struct values you want to retain.

I hope this helps!

Best,

Ryan

Posted

Hi,

For PID there are 2 structs:

PID Config - This is non retained struct which will be used for running the PID.

PID AT Parmas - This struct can be marked as retained.

Once you completed your manual tune or autotune, you need to use the Ladder element "save PID Autotune data" from the PID Config  struct to the PID AT Parmas struct.- This will save the PID data into the retained struct.

On power up you will use the ladder element "Load PID autotune data" from the PID AT Parmas struct to the PID Config  struct.

  • Upvote 1
  • 3 weeks later...
Posted

Hi Ofir and all

 

My problem is the the PID AT Parmas struct is not retaining  although it is marked as retain.

I am trying to find a workaround for that, and in addition to  be able to save/load PID parameters from SD card.

I define a user struct with exactly the same members like the system struct . this i wanted to use for indexed data-table that i can write one row into and save it as a UDTF file on the SD.

my problem with that solution is that Copy struct function is not working with the system struct . The only thing is to to is to use  few Store functions each for one PID value.

My questions:

Why the system struct PID AT Parmas struct is not retained as its set to be?

Any way to copy a system struck valued to a user struct as a whole?

Thanks

Ofer

 

Posted

Hi,

PID Config struct is non retained. Running PID  will use PID Config struct.

Once completing Autotune or manual tune, you can use the Save PID Autotune data ladder element. This will save the PID config struct to a PID AT params struct.

Then on power up you can use the Ladder element Load PID Autotune data from PID AT params struct to PID config struct.

Please make sure that the PID AT Params struct is checked as retained.

  • 4 months later...
Posted

Hello Ofir.

I have a client system using a PID loop for temperature control. To investigate a separate problem (as in D Green's recent FTP post) I would like to download and run a new, different, temporary project; and subsequently restore the original. I believe however this will destroy the original retained PID AT settings, which I would like to restore, possibly from a file, to avoid having to run the (lengthy) PID Autotune again.

Is it possible save the PID AT params to a file on the SD card, as it is with any user-defined structure using a data table?

Thanks

Robin

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.