Programming – Lenze E94P PositionServo with MVOB User Manual

Page 40

Advertising
background image

38

L

PM94H201B_13xxxxxx_EN

Programming

2.7

System Variables Storage Organization

The PositionServo drive contains dual variable storage locations, the operational memory (RAM), that is the volatile
operating memory, and the EPM memory, that is the non-volatile configuration memory. When the PositionServo is
turned on it copies the retained settings from the EPM non-volatile memory into the RAM memory for use during
program execution.

When a system variable is changed during normal program execution its value is changed only in the RAM memory and
subsequently these values are lost following power down. System variables that are changed through the MotionView
parameter set are stored in both EPM and RAM memory so changes have both immediate effect and are retained after
power down. The StoreVars command (Refer to section 3.1) can be used to store the user variables (V0-V31) from
RAM memory into the EPM memory during program execution so the programmer has the oppertunity to retain these
after power down.

Host Interfaces have the capability of changing all of the system variable values through any one of the adopted
communications protocols available for PositionServo. Communications protocols contain mechanisms to write to RAM
memory only, or to RAM memory and EPM memory.

NOTE:
EPM memory is specified for a limited number of write cycles (approximately 1 million). Care must
be taken not to excessively write to the EPM memory or not to exceed the maximum write cycle
count.

2.7.1 RAM File for User’s Data Storage

In addition to the standard user variables (V0-V31 & NV0-NV31) MotionView OnBoard drives have a section of RAM
memory (256k) allocated as data storage space and available to the programmer for storage of program data.

The RAM file data storage is often required in systems where it is desirable to store large amounts of data prepared by
a host controller ( PLC, HMI, PC, etc). This data might represent more complex Pick and Place coordinates, complicated
trajectory coordinates, or sets of gains/limits specific for given motion segments.

RAM memory is also utilized in applications that require data collection during system operation. At the end of a period
of time the collected data can be acquired by the host controller for analysis. For example, position errors and phase
currents collected during the move are then analyzed by the host PLC/PC to qualify system tolerance to error free
operation.

Implementation

There are 256K (262,144) bytes provided as RAM file for data storage. Since the basic data type in the drive is 64 bit
(8 bytes) 32,768 data elements can be stored in the RAM file. The file is accessible from within the User’s program
or through any external communications interface (Ethernet, ModBus, CAN etc.). Two statements and three system
variables are provided for accessing the RAM file memory. The RAM file is volatile storage and is intended for “per
session” usage. The data saved in the RAM file will be lost when the drive is powered off.

The three system variables provided to support file access are:
VAR_MEM_VALUE

(PID = 4)

VAR_MEM_INDEX

(PID = 5)

VAR_MEM_INDEX_INCREMENT

(PID = 6)

In addition, two statements are provided to allow access and storage to the RAM file direct from the user program. The
statements MEMSET, MEMGET are described in paragraph 2.7.3 and Tables 44 & 45.

Advertising