NI-IMAQdx Function Reference



rval = IMAQdxError ResetEthernetCameraAddress(const char* name, const char* address, const char* subnet, const char* gateway, u32 timeout)


Force a new static IP address for the specified camera. Use IMAQdxResetEthernetCameraAddress when the camera is configured for a different subnet than your network. The code execution will suspend for the current thread and will resume after the specified timeout or as soon as it completes. Call this function before calling IMAQdxDiscoverEthernetCameras. Resetting the Ethernet Address is optional for cameras not on the local subnet.


Parameter Type Description
name const char * The name of the camera you want to open. name (cam0, cam1, ..., camN) must match the configuration file name you used to configure the camera in MAX. You can also open a camera using its 64-bit serial number (uuid:XXXXXXXXXXXXXXXX), where the number following uuid must be a 64-bit hexadecimal number representing the internal serial number of the camera.
Note   Specify "uuid:serial number in hexadecimal representation" for the camera name when opening in listening mode. The serial number must match the serial number used in MAX.
address const char* Network address for the camera.
subnet const char* Subnet mask for the camera.
gateway const char* Gateway for the camera.
timeout unsigned int Time, in milliseconds, allowed for the Ethernet camera to reset its network address. The default timeout is 1000 ms.

Return Value

On success, this function returns IMAQdxErrorSuccess. On failure, this function returns an error code. You can obtain a more detailed error message with IMAQdxGetErrorString or, if you are using Microsoft Visual Basic, IMAQdxGetErrorStringCW.