Function Block MEMDB

The Function Block MEMDB is a multiple storage function.

This Function Block can be used to store several data directly in the application.

Database

The database stores all data in the background. If the name is changed later in the program, data may be lost.

Input IN

Defines the data that should be stored. The format does not matter.

Input NAME

The input defines the name of the storage location as a string. This must not be empty and must not contain a semicolon ";". Otherwise, saving will fail.

If the name is changed, the storage location changes immediately. This means that the previous value at the output is no longer available.

Input SAVE

On a positive edge, the value at input IN is copied to memory and output at Q.

Input DELETE

On a positive edge, the memory of the selected name is deleted. The value NULL is again present at output Q.

Input RESET

On a positive edge, the entire memory is reset. The value NULL is again present at output Q.

Output Q

Returns the storage of the database for the selected name. This value is NULL during initialization.

Output ERR

The output is true if an error occurs. This is the case when the name was incorrectly defined.

Output NAMES

The output returns all storage banks as a string separated by a semicolon.

Output COUNT

The output returns the number of storage banks.