Please enable JavaScript to view this site.

IDS Software Suite 4.96.1

Windows_Logo
Linux_Logo

USB 2.0

USB 3.x

GigE

USB 2.0

USB 3.x

GigE

Syntax

is_PersistentMemory(HIDS hCam, UINT nCommand, void* pParam, UINT cbSizeOfParam)

Description

Using this function, you can read or write the non-volatile user memory of the camera. Besides the hard-coded factory information, the user memory of the uEye camera can hold additional user data which is not to be stored cyclically but permanently, e. g. camera parameters for camera opening, one-time determined, permanent calibration data, etc.

hint_info

Note that images may be lost if you write to the non-volatile user memory during image acquisition.

Depending on the camera model, an additional extended 64 kB memory is provided beside the old 64 Byte user memory, which can also be used storing user data. The following overview shows which memories are supported by each camera family.

Camera family

User memory

uEye LE USB 3.1 Gen 1

64 Byte + 64 kB extended memory

uEye SE USB 3.1 Gen 1

64 Byte + 64 kB extended memory

USB 3 uEye CP Rev. 2

64 Byte + 64 kB extended memory

USB 3 uEye CP

64 Byte

USB 3 uEye LE

64 Byte + 64 kB extended memory

USB 3 uEye ML

64 Byte + 64 kB extended memory

GigE uEye CP Rev. 2

64 Byte

GigE uEye CP

64 Byte

GigE uEye FA

64 Byte

GigE uEye LE

64 Byte

GigE uEye RE PoE

64 Byte

GigE uEye SE Rev. 4

64 Byte

GigE uEye SE

64 Byte

USB uEye LE

64 Byte

USB uEye ML

64 Byte

USB uEye SE

64 Byte

USB uEye XS

64 Byte

The nCommand input parameter is used to select the function mode. The pParam input parameter depends on the selected function mode. If you select functions for setting or returning a value, pParam contains a pointer to a variable of the UINT type. The size of the memory area to which pParam refers is specified in the cbSizeOfParam input parameter.

Input parameters

hCam

Camera handle

pParam

Pointer to a function parameter, whose function depends on nCommand.

cbSizeOfParam

Size (in bytes) of the memory area to which pParam refers.

Contents of the IS_PERSISTENT_MEMORY structure

UINT

u32Offset

Adress offset within the range

UINT

u32Count

Number of characters to read/written

char*

pu8Memory

Pointer to the buffer with the data to be read/written.

Return values

IS_INVALID_CAMERA_HANDLE

Invalid camera handle

IS_INVALID_PARAMETER

One of the submitted parameters is outside the valid range or is not supported for this sensor or is not available in this mode.

IS_NO_SUCCESS

General error message

IS_NOT_SUPPORTED

The camera model used here does not support this function or setting.

IS_SUCCESS

Function executed successfully

Example

UINT nSize = 0;
nRet = is_PersistentMemory(hCam, IS_PERSISTENT_MEMORY_GET_SIZE_USER, &nSize, sizeof(nSize));
 
// 1 byte termination added to memory size
char* pMemWrite = new char[nSize + 1];
ZeroMemory(pMemWrite, nSize + 1);
 
// Fill the array with random numbers, except termination
for (int i = 0; i < (INT)nSize; i++)
{
pMemWrite [i] = rand();
}
 
// Initialize peristent memory structure. Write from offset 0 nSize bytes into memory.
IS_PERSISTENT_MEMORY nPersistentMemory;
ZeroMemory(&nPersistentMemory, sizeof(nPersistentMemory));
nPersistentMemory.pu8Memory = pMemWrite;
nPersistentMemory.u32Count = nSize;
nPersistentMemory.u32Offset = 0;
 
// Write memory
nRet = is_PersistentMemory(m_hCam, IS_PERSISTENT_MEMORY_WRITE_USER, &nPersistentMemory, sizeof(nPersistentMemory));
delete[]pMemWrite;
 
// Read memory back into new buffer
char* pMemRead = new char[nSize + 1];
ZeroMemory(pMemRead, nSize + 1);
nPersistentMemory.pu8Memory = pMemRead;
nRet = is_PersistentMemory(m_hCam, IS_PERSISTENT_MEMORY_READ_USER, &nPersistentMemory, sizeof(nPersistentMemory));
delete[]pMemRead;

© 2022 IDS Imaging Development Systems GmbH