This method reads the configuration from the hardware device.
Note: This function is only to be used for neoVI Blue and ValueCAN. For neoVI Fire and neoVI Red use theGetFireSettingsmethod. For ValueCAN3 use theGetVCAN3Settingsmethod.
int _stdcall icsneoGetConfiguration(int hObject,unsignedchar*pData,int*plNumBytes);
Public Declare Function icsneoGetConfiguration Lib "icsneo40.dll" (ByVal hObject As Int32, ByRef pData As Byte, ByRef lNumBytes As Int32) As Int32
[in] Specifies the driver object created with the OpenNeoDevice method.
pData
[out] Pointer to an array of 1024 bytes. Each index of the array corresponds to a configuration value. For a list of configuration values to change, please see the Configuration Array topic.
plNumBytes
[out] This will return the number of bytes written to the array. For the current version of the API this will be 1024 bytes.
Return Values
Returns 1 if successful, 0 if an error occurred. GetLastAPIError must be called to obtain the specific error. The errors that can be generated by this function are:
NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75
Remarks
None.
Examples
Displays the Value of CNF1 of ValueCAN/neoVI HSCAN
byte[] bConfigBytes =newbyte[1024]; //Storage for Data Bytes from Deviceint iNumBytes =1204; //Storage for Number of Bytesint lResult; //Storage for Result of Called Functionint Counter;//Clear listboxlstConfigInformation.Items.Clear();//Call Get ConfigurationlResult =icsNeoDll.icsneoGetConfiguration(m_hObject,refbConfigBytes[0],ref iNumBytes);//Fill ListBox with Data From function Callfor(Counter=0;Counter<1024;Counter++){lstConfigInformation.Items.Add("Byte Number-"+ Counter +" Byte Data-"+bConfigBytes[Counter]);}
byte[] bConfigBytes = new byte[1024]; //Storage for Data Bytes from Device
int iNumBytes = 1204; //Storage for Number of Bytes
int lResult; //Storage for Result of Called Function
int Counter;
//Clear listbox
lstConfigInformation.Items.Clear();
//Call Get Configuration
lResult = icsNeoDll.icsneoGetConfiguration(m_hObject, ref bConfigBytes[0],ref iNumBytes);
//Fill ListBox with Data From function Call
for(Counter=0;Counter<1024;Counter++)
{
lstConfigInformation.Items.Add("Byte Number-" + Counter + " Byte Data-" + bConfigBytes[Counter]);
}