Back to top

Loading and saving application parameters (recipes) to NVRAM memory.

The attached KAS project adds a program (LoadSaveParams) to one of the standard 2 axis startup templates to store

and retrieve parameter settings from the PDMM’s NVRAM memory.An Array of Structures with the following elements

was setup:

MotorParameter[x].Position

MotorParameter[x].Velocity

MotorParameter[x].Acceleration

MotorParameter[x].Deceleration

 

 

A Control Panel was added to the project to enter values and perform the save or to retrieve values already save.

 

 

Comments

ABA's picture
ABA
Carroll:

 Carroll:  We are developing a programming for a pick and place robot, we have some structures a little bit more complex,  we have to management 10 models   each model has 4 secuensie,  Called takeout, unload, reject, and sample.

Each secuencie can be have 1 to "n" steps  ( as example n= 25)  each step contain X,Y,Z positions, 2 timers values, 12 outputs (control to set on/off), and 12 inputs states,   

image


image

 
ABA's picture
ABA
image


So how can i write/read thoses sctructures to NVRAM 

thanks in advances 



 
ABA's picture
ABA
image
cwontrop's picture
cwontrop
Create the top level variable (Inst_MODELO_OM)  in the Retain section of the IDE Dictionary. Here is example in which the array of structure variable Inst_NewStruct1 is created in the Retain variable

image

 
ABA's picture
ABA
Hi Carrol:  we are trying  to declare structures  as you recommend, but we have NVRAM problem is not big enough to handle total amount of variables, 

 attached are picture and crash report  

  is there any way to write structure to disk and only read or retrieve an one structure member when at programing is needing





 
ABA's picture
ABA
image 
cwontrop's picture
cwontrop
It would be possible to store and retrieve recipes in the PxMM flash memory, the SD card, or remote drive. Storing and retrieving recipe would be done using the file management function blocks:

http://curvegen.kollmorgen.com/webhelp/kas/Content/PLC_library/files.htm
http://curvegen.kollmorgen.com/webhelp/kas/Content/11.TechRefs/FileMgt_Functions.htm?Highlight=seek 

The pointer function (F_SEEK) could be used for quick location of a specific date or recipe element in the file. A seperate  file could be created for each management model for ease of storing and retrieval.

Attach is a .kas project containing 2 uDFBs, one for saving data to an SD card and another for retrieving data from the SD card.