This method releases system resources used by the neoVI device.
Parameters
hObject
**** [in] Specifies the driver object created by OpenNeoDevice.
Return Values
None.
Remarks
This method is used to release any resources that were allocated by OpenNeoDevice. Applications that create neoVI handles should release them using this method, however, the intrepidCS API will release any resources that it created for the client application when the client application ends and the API is unloaded. The LabVIEW neoClosePort.vi will call the FreeObject API.
This method returns the neoVI hardware devices connected to the PC.
Parameters
pNeoDevice
[in] A valid NeoDevice structure filled with information about a specific neoVI device. For C++ a “void*” can be used. For .NET, “IntPtr” is used. This must be obtained by calling FindNeoDevices.
hObject
[out] This parameter needs to be 32 bit in a 32 bit program and 64 bit in a 64 bit program. This will be set to the handle of the neoVI driver object that is created. It is needed as an input parameter to other API function calls. Every time you create a new neoVI object you must call ClosePort and FreeObject to avoid creating a memory and resource leak.
bNetworkIDs
[in] This is an array of number IDs which specify the NetworkID parameter of each network. This allows you to assign a custom network ID to each network. Normally, you will assign consecutive IDs to each of the networks. See NetworkIDList for a list of current network ID’s. _ You may also set this parameter to NULL (zero) and the default network ID’s will be used._
bConfigRead
[in] Specifies whether the DLL should read the neoVI’s device configuration before enabling the device. It is recommended that this value be set to 1.
bSyncToPC
[in] Specifies whether timestamps for messages should be adjusted to the PC’s clock to compensate for time drift. This drift is caused by differences that occur over time between the clocks on the neoVI device and the PC.
Return Values
If the port has been opened successfully, the return value will be 1. Otherwise the return value will be zero.
Remarks
To connect to more than one piece of hardware, multiple calls to OpenNeoDevice can be made. The key is to provide a different NeoDevice for each device you want to open. For other function calls, use the returned hObject to talk to that device.
Each successful call to OpenNeoDevice should be matched with a call to a ClosePort when you are finished accessing the hardware. FreeObject methods.
Name | Description |
---|---|
Used to locate connected neoVI devices.
Used to open a communication link with a specific neoVI device.
Closes the communication link with the neoVI device.
Releases system resources used by the neoVI device.
This method closes the communication link with the neoVI hardware.
Parameters
hObject
[in] Specifies the driver object created by OpenNeoDevice.
pNumberOfErrors
[out] Specifies the number of errors in the neoVI DLL error queue. You can read out the errors by calling the GetErrorMessages method.
Return Values
If the port has been closed successfully the return value will be 1. Otherwise, it will return zero. It will also return zero if the port is already closed.
Remarks
Must be called once for each successful call to OpenNeoDevice or memory and resource leaks will occur.
This method returns the neoVI hardware devices connected to the PC.
Parameters
pNeoDeviceEx [out] This is the address of the first element of an array of NeoDeviceEx structure. This array can be as big as 255 devices. You must specify the size of the pNeoDeviceEx array in the pNumDevices parameter. The number of devices found will be limited to the value of pNumberofDevices or 255, whichever is lower. Each returned NeoDevice structure will contain information for each device such as its type, device ‘handle’ and serial number.
pNumberOfDevices [in/out] In: Specifies the size of the pNeoDevices array. Must be in the range 0 to 255. Out: Specifies the number of neo devices that were found. This can be in the range 0 to 255. DeviceTypes __ [in] This is an array of device types to look for. Specifies the types of neoVI devices to find. Each element in the array need to have a value for the device type to look for. Currently supported values are:
NEODEVICE_UNKNOWN = 0x00000000
NEODEVICE_BLUE = 0x00000001
NEODEVICE_ECU_AVB = 0x00000002
NEODEVICE_RADSUPERMOON = 0x00000003
NEODEVICE_DW_VCAN = 0x00000004
NEODEVICE_RADMOON2 = 0x00000005
NEODEVICE_RADGIGALOG = 0x00000006
NEODEVICE_VCAN41 = 0x00000007
NEODEVICE_FIRE = 0x00000008
NEODEVICE_RADPLUTO = 0x00000009
NEODEVICE_VCAN42_EL = 0x0000000a
NEODEVICE_RADIO_CANHUB = 0x0000000b
NEODEVICE_NEOECU12 = 0x0000000c
NEODEVICE_OBD2_LCBADGE = 0x0000000d
NEODEVICE_RAD_MOON_DUO = 0x0000000e
NEODEVICE_VCAN3 = 0x00000010
NEODEVICE_RADJUPITER = 0x00000011
NEODEVICE_VCAN4_IND = 0x00000012
NEODEVICE_GIGASTAR = 0x00000013
NEODEVICE_ECU22 = 0x00000015
NEODEVICE_RED = 0x00000040
NEODEVICE_ECU = 0x00000080
NEODEVICE_IEVB = 0x00000100
NEODEVICE_PENDANT = 0x00000200
NEODEVICE_OBD2_PRO = 0x00000400
NEODEVICE_PLASMA = 0x00001000
NEODEVICE_NEOANALOG = 0x00004000
NEODEVICE_CT_OBD = 0x00008000
NEODEVICE_ION = 0x00040000
NEODEVICE_RADSTAR = 0x00080000
NEODEVICE_VCAN44 = 0x00200000
NEODEVICE_VCAN42 = 0x00400000
NEODEVICE_CMPROBE = 0x00800000
NEODEVICE_EEVB = 0x01000000
NEODEVICE_VCANRF = 0x02000000
NEODEVICE_FIRE2 = 0x04000000
NEODEVICE_FLEX = 0x08000000
NEODEVICE_RADGALAXY = 0x10000000
NEODEVICE_RADSTAR2 = 0x20000000
NEODEVICE_VIVIDCAN = 0x40000000
NEODEVICE_OBD2_SIM = 0x80000000
NEODEVICE_ALL = = 0xFFFFBFFF
Constants are defined in appropriate header or module. pNumDevicTypes
[in] In: Specifies the size of the DeviceTypes array. Must be in the range 0 to 255.
pOptionsNeoEx
[in] CAN netowork ID for connecting to devices over CAN. Set to null for USB or Ethernet connections.
Return Values
1 if the function succeeded. 0 if it failed for any reason. If the function succeeds but no devices are found 1 will still be returned and pNumberOfDevices will equal 0.
Remarks
The NeoDevice array elements that are returned with this function may be passed to OpenNeoDevice so that individual neoVI devices can be opened.