GetVariablesEx

Gets the list of user-defined variables from a specified folder.

Syntax

KsError GetVariablesEx(
     int BufferLength,
     int* VariableCount,
     UserVariable* Buffer,
     HANDLE Parent
);

Parameters

BufferLength: the length of the buffer that stores the variables.

VariableCount: the number of the variables read.

Buffer: pointer to the buffer where the variable list will be read. See the UserVariable structure.

Parent: the parent folder of UserVariable. Input NULL if you want to get the variable list from the root folder. Use GetVariablesEx(BUFFER_SIZE, &GET_VAR_COUNT, &BUFFER, DIR.Id) if you want to get the variable list from a specific folder.

Return value

If the function succeeds, it returns errNoError, otherwise an error code. For more information about the error code, see the KsError list.

Remarks

The variables can be used in KINGSTAR Scope and a real-time log.

Usable EtherCAT states

ecatOffline, ecatInit, ecatBoot, ecatPreOP, ecatSafeOP, ecatOP

Requirements

  RT Win32
Minimum supported version 4.4 4.4
Header ksapi.h ksapi.h
Library KsApi_Rtss.lib KsApi.lib

See also

AddVariable

AddVariableEx

GetVariable

GetVariableEx

GetVariables

RemoveVariable