Jump to content
OMRON Forums

saving user variables


Omron Forums Support

Recommended Posts

Davis,

 

Do you mean save the values of certain variables?

 

Check out fsave/fload on page 1055 / 1489 of the PPMAC SRM or FastSave() if you want to do it through C. Reckon you can check FastSave() through the F1 Help menu in the IDE.

 

I also posted a totally custom fsave function a couple years ago on the Forum, but it's better to go with the "factory-approved" method now that it exists.

Link to comment
Share on other sites

Do you mean save the values of certain variables?

 

Yes. I know about fsave, and have told him how to use that, but the client would like it if when he does a 'save' during development he also has a list of user variables saved. Is there any way to set it up so that the 'save' command automatically executes the pp_custom_save.tpl as well as the pp_save.tpl?

 

 

Thanks,

 

Davis

Link to comment
Share on other sites

  • 5 years later...
On 2/6/2017 at 7:19 PM, steve.milici said:

The function of "pp_custom_save.tpl " is also executed on a "save" command.

Steve, I hope it's not too late for some clarification on this. Wouldn't your statement imply that any "fsave'd" variables get overwritten when a "save" command is issued? Or am I reading it wrong?

In practice this doesn't seem to be the case. In our recently converted application I'm using "fsave" to save calibration values for our machines whenever they need to be modified. When downloading our project I issue "$$$***", download, then "save" and "$$$" to get everything initialized properly. In the one machine I've got converted this doesn't seem to overwrite the variables specified in my "pp_custom_save.tpl", and a PLC program performs "fload" and everything seems to work great. But after reading your statement a few times I'm concerned that I've missed something.

I suppose the root question is, do "fsave'd" variables survive a full reset and re-download? (which is how Turbo PMAC "FSAVE" worked)

Link to comment
Share on other sites

Yes the function of "pp_custom_save.tpl " is executed on a "save" command.

 

On a “Build and Download” the function of "pp_custom_save.tpl " is executed but exists only in the volatile memory side (“/var/ftp/usrflash/Project/Configuration”). It is not yet in the FLASH memory (non-volatile memory at “/opt/ppmac/usrflash/Project/Configuration”) until a “save” command nor is it yet uploaded to the currently opened project in the IDE. If the project is not opened in the IDE at the time of the “save” (or “fsave”) it will not be uploaded but will be in both the “volatile memory” and “non-volatile memory” of the PMAC.

 

This could be different on older FW due to implementation updates. I have tested this on FW vs 2.6.1.0 and IDE vs 4.6.x.x.

 

  • Thanks 1
Link to comment
Share on other sites

  • 1 month later...

Steve,

Even though I previously indiciated that this works as I hoped, the drawback to this seems to be that there are fairly easy ways to wipe out any previously fsaved variables. Right now I'm trying to track down a ConfigLoadErr and after that comes up it seems all my fsaved variables have been reset to 0 (this is at least the 2nd time).

I'm assuming when the ConfigLoadErr occurs and it loads a blank project due to the error, when I save and reset to try to clear the error it saves the empty fsave variables. I'm not really sure what value fsave-ing during save-ing has. On Clipper (Turbo) I never saw that behavior; the FSAVE command in Turbo seemed to be completely separate from the SAVE command. If I want that independent persistent variable functionality that isn't affected by a save command, will I need to implement one of the user data-saving functions (from the App Notes mentioned elsewhere in these forums)? Or should I be able to achieve this with the existing fsave command somehow?

I'm on FW 2.6.1.0 and IDE 4.5.2.9.

Link to comment
Share on other sites

A “ConfigLoadErr” puts PMAC into a “default” condition and project, effectively “deleting” "pp_custom_save.tpl".

 

Yes, the behavior is different with Power PMAC. The FW developers are looking at adding a “switch” to the function of "pp_custom_save.tpl" to “disable” it on the fly.

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...