Vektor/Matrix Save

Attention! Some kinds of memory media (e.q. flash cards) only allow a limited number of writing operations!

This function block saves the data from a matrix (vector, single value) into a file.

The elements at the input VX will be saved to the file FName, when a positive going edge occurs at the Trigger input. Additional information like data type and dimension will be stored in the file header to be able to check at load.

The output Num gives the number of saved elements. A negative value indicates an error or shows that the function block is not operating:

-1 Function block does not operate
-2 No file name given
-3 Could not open file
-4 Number of saved elements differs from elements at VX
-1000 Target function not available

Trigger -> change to HIGH = Save date

Signals

Name I/O Type(s) Function
VX I Data type independent Input vector/matrix
FName I TEXT File name
Trigger I BIT Trigger to save date
Num O LONG Number of saved elements of status information

Visualization

The selected data type will be displayed by the assorted color.

Comments

Existing files will be overwritten!

The file name must follow the principles of the target system. This covers the conventions for the name itself (e.q. accepted characters) and the use of relative or absolute path information. This function block does not generate sub directories, so trying to create a file in a non existing sub directory will lead to an error.

Some memory media only allow a limited number of writing operations. Heavy use of this function block may destroy such media!