Only this pageAll pages
Powered by GitBook
Couldn't generate the PDF for 167 pages, generation stopped at 100.
Extend with 50 more pages.
1 of 100

neoVI API Docs

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

The neoVI API - Create your own software applications

Overview

Included with neoVI is the "icsneo40.dll" DLL. This DLL is a high performance multi-threaded DLL, capable of supporting many neoVI devices simultaneously. The DLL is through dynamic linkage.

Getting Started

The neoVI API provides a simple way to access the neoVI hardware with WIN32 development tools. This documentation describes how to use the API for custom applications. Each API has an example targeted for both C/C++, C#, and Visual Basic (VB). Operational examples are included for Visual C++, LabVIEW, LabWindows CVI, C++ Builder, Delphi, and Visual Basic.

For applications using neoVI and ValueCAN devices which do not use Windows, a is available. Intrepid Control Systems also has a with APIs and projects for a verity of different system configurations. Code here can be built to fit the needed system.

To get started, review the topic and the topics describing how to use the API in , , , , , , , and .

Microsoft
National Instruments
National Instruments
Borland
Borland
Microsoft
Linux interface
Github page
Basic Operation
Visual Basic .NET
Visual C++
Visual C#
LabWindows CVI
LabVIEW
Borland C++ Builder
Unity Engine
Borland Delphi

Using the neoVI API in Visual Studio: 32 bit DLL and 64 bit OS - neoVI API

Visual Studio 2005 and newer contain different options to compile an application. By default, new programs or programs upgraded from earlier versions of Visual Studio will be configured as "ANY CPU". This option will run as a 32 bit program (x86) on a 32 bit version of Windows and as a 64 bit program (x64) in a 64 bit version of Windows. Projects can also be directly specified as 32 bit (x86) or 64 bit (x64). Starting with icsneo40.dll version 3.7.1.73 and newer, a 64 bit dll was introduced. Using software installs from Intrepid Control Systems, the two dlls are installed to their proper locations on the system. The compiler settings will dictate which of the two dlls is used. Windows will map to the proper one.

The folder location for the icsneo40.dll depends on the Windows install. On a 32 bit (x86) PC, just the 32 bit version is installed to the System32 folder. On a 64 bit system (x64) the 32 bit version is stored in the SysWoW64 folder and the 64 bit version is in the System32 folder. Again the operating system will take care of this based on your settings in the compiler. In either case, the application would need to reference System32, or not specify the location at all. Windows will search the application folder followed by the proper system folder locations to access the correct dll based on your compile options

Once in Configuration Manager, the Active solution platform can be selected. If you do not have the required option, select "<New...>" (figure 2).

After a new Platform has be created, it can be selected from the Standard tool bar (figure 4)

Using the API in LabVIEW - neoVI API

Overview

The intrepidcs API packages all of the WIN32 methods into LabVIEW LLB. Inside the LLB the sub VIs can be accessed to make it easy for you to use neoVI with National Instruments LabVIEW.

Steps to use neoVI in LabVIEW

Example

The example shows how to open and close communication to the driver, send messages and read messages on the networks.

The configuration manager is used to set which compile type needed. The following are steps for changing the compile options Visual Studio 2010. For help with your version and level of Visual Studio, consult Visual Studio help or . It is possible to change the compile options. The first step is to open the "Configuration Manager". This can be found by right clicking on your Solution and choosing "Configuration Manager" (figure 1).

Open the “NEO VI Example.llb” found in the file. When you first access the main VI or sub VI’s you may receive a warning regarding a Dependency missing. Make sure that your project is pointing to the icsneo40.dll. This is normally installed to the system32 or SysWOW64 directories.

A LabVIEW example (Figure 1) is included to show how the API all works together. An example project can be found here: .

MSDN
Nlabv_neo.zip (546kB)
Nlabv_neo.zip (546kB)

Using the neoVI API in C# - neoVI API

Example

The example shows how to open and close communication to the driver, send messages and read messages on the networks.

To use the neoVI API in C# add the Class into the C# project (figure 1). Right click on the solution and select “Add Existing Item” from the “Add” menu. Then, call the methods as defined in the Section of this document.

A C# Dot Net 2010 example (Figure 1) is included to show how the API all works together. The main project files are as follows: 1) the project file: IcsApiDotNetCSharp.sln 2) the form file : Form1.cs, and 3) the neoVI module : icsNeoClass.cs. All project files are included in the following file . This project will open in Visual Studio 2010, 2012, 2013, 2015 and 2017.

icsNeoClass.cs
WIN32 API Functions and Types
CSnet2010.zip

Using the neoVI API in Borland C++ Builder - neoVI API

Do the following steps to use neoVI in Borland C++ Builder:

2) Add a #include "icsneo40DLLAPI.h" to your project

3) Use the Functions "LoadDLLAPI" to load the functions and "UnloadDLLAPI" to unload the functions. Examples are below.

 //-----Load the DLL
 if(!LoadDLLAPI(hDLL))
 {
 //problem, close the application
 printf("Problem loading Library\r\nMake sure icsneo40.dll is installed and accessable\r\nPress any key to Exit");
 }

 //-----Unload the DLL
 UnloadDLLAPI(hDLL);

Example

The example shows how to open and close communication to the driver, send messages and read messages on the networks.

1) Start your new project and add the to your project.

4) Finally, call the methods as defined in the he document.

A Borland C++ Builder example (Figure 1) is included to show how the API all works together. The example files are included in the following file:

Dynamic link helper files
Basic Operation
BCBneoVI.zip (31kB)

Using the neoVI API in Visual C++ - neoVI API

To use neoVI in Visual C++:

  1. Add a #include “icsneo40DLLAPI.h” to your project

3. Use the Functions “LoadDLLAPI” to load the functions and “UnloadDLLAPI” to unload the functions. Examples are below.

 HINSTANCE hDLL;

 //-----Load the DLL
 if(!LoadDLLAPI(hDLL))
 {
 //problem, close the application

 printf("Problem loading Library\r\nMake sure icsneo40.dll is installed and accessable\r\nPress any key to Exit");

 }

 //-----Unload the DLL

 UnloadDLLAPI(hDLL);

The example shows how to open and close communication to the driver, send messages and read messages on the networks.

Start your new project and add the to your project.

4. Finally, call the methods as defined in the document.

A Visual C++ example (Figure 1) is included to show how the API all works together. The example files are included in the following file:

Dynamic link helper files
Basic Operation
VCNewneoVI.zip

Using the neoVI API in Delphi - neoVI API

Do the following steps to use neoVI in Borland Delphi:

  1. Link to icsn40.pas import library via the “Add to Project…” option (Figure 1). This dialog is accessible via the “Project” pull down menu in Delphi. When the file dialog appears, select the icsn40.pas.

3. Your project manager will now show the import library icsn40.pas (Figure 2).

4. Include icsn40 and icsSpyData in your interface Uses (Figure 3).

Example

The example shows how to open and close communication to the driver, send messages, and read messages on the networks.

Copy the import library , and data structure file to your project directory.

5. Finally, call the methods as defined in the document.

A Borland Delphi example (Figure 1) is included to show how the API all works together. The example files are included in the following file:

icsn40.pas
icsSpyData.pas
Basic Operation
icsnDelphiSample.zip (14kB)

Unity3D Graphic Display API

Do the following steps to use Unity3D Graphic Display:

First set the scene for running an .exe file, then an explanation of how the scripts work.

Example

Open Unity3D. Locate and open the project folder called “Unity Graphic display API”. (Figure 1)

In the project panel open the Unity scene called Unity_API_Demo. Once opened, in the game view is a place holder for the graphical display. This is where all the data will be visually displayed upon execution of the application. (Figure 2)

Next, locate the icsNeoClass.cs and make sure it is in the correct folder, this imports the .DLL into the project panel (cannot be in any other folder, other then the main “project asset folder”).

Locate IcsNeoClassUnity.cs, located in the Scripts folder. This example script handles the functions of the Intrepid Hardware; open, close, transmit, receive, ect… Then attach the IcsNeoClassUnity.cs on the Main Camera. (refer to figure 3)

The demo should be all set up and ready to play out at this point. Press the play button near the top of the Unity3D windows to enter play mode and begin the demo. (Figure 4)

This is the Unity3D Demo in its entirety included to show how the API all works together; The example files are included in the following file:

Unity3d Graphics Panel Demo (1537kB)
Figure 1 - include for “icsneo40DLLAPI.h”
Figure 2 - “icsneo40DLLAPI.cpp” added to project
Figure 1 - The Borland C++ Builder Example.
Figure 1 - Link to the “icsnVC40.lib”
Figure 1 - The Visual C++ Example.

OpenNeoDevice Method - neoVI API

This method returns the neoVI hardware devices connected to the PC.

int _stdcall icsneoOpenDevice(NeoDeviceEx* pNeoDeviceEx, void* hObject, unsigned char* bNetworkIDs, int bConfigRead, int iOptions, OptionsOpenNeoEx* stOptionsOpenNeoEx, unsigned long reserved)
Public Declare Function icsneoOpenDevice Lib "icsneo40.dll" (ByRef pNeoDeviceEx As NeoDeviceEx, ByRef hObject As IntPtr, ByRef bNetworkIDs As Byte, ByVal bConfigRead As Int32, ByVal iOptions As Int32, ByRef stOptionsOpenNeoEx As OptionsOpenNeoEx, ByVal Reserved As UInt32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoOpenDevice(ref NeoDeviceEx pNeoDeviceEx, ref IntPtr hObject, ref byte bNetworkIDs, Int32 bConfigRead, Int32 iOptions,ref OptionsOpenNeoEx stOptionsOpenNeoEx, UInt32 uiReserved);

Parameters

pNeoDevice

hObject

bNetworkIDs

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

Examples

void * hObject;  // holds a handle to the neoVI object
int iRetVal;
int iCount;
NeoDevice ndNeoToOpen; //created previously

iRetVal = icsneoOpenDevice(&ndNeoToOpen, &hObject, NULL, 1, 0);
Dim m_hObject As IntPtr '//handle for device
Dim iResult As Integer '//Holds the results from function call
Dim ndNeoToOpen As NeoDevice '//Struct holding detected hardware information
Dim bNetwork(255) As Byte '//List of hardware IDs
Dim iCount As Integer '//counter

'//File NetworkID array
For iCount = 0 To 255
    bNetwork(iCount) = CByte(iCount)
Next iCount
'//Open the first found device, ndNeoToOpen acquired from FindNeoDevices
iResult = icsneoOpenDevice(ndNeoToOpen(0), m_hObject, bNetwork(0), 1, 0)
If CBool(iResult) Then
    MsgBox("Port Opened OK!")
Else
    MsgBox("Problem Opening Port")
    Exit Sub
End If
IntPtr m_hObject; //handle for device
int iResult; //Holds the results from function call
NeoDevice ndNeoToOpen = new NeoDevice(); //Struct holding detected hardware information
byte[] bNetwork = new byte[255]; //List of hardware IDs
int iCount; //counter

//File NetworkID array
for (iCount = 0; iCount < 255; iCount++)
{
    bNetwork[iCount] = Convert.ToByte(iCount);
}
//Open the first found device, ndNeoToOpen acquired from FindNeoDevices
iResult = icsNeoDll.icsneoOpenDevice(ref ndNeoToOpen, ref m_hObject, ref bNetwork[0], 1, 0);
if (iResult == 1)
{
    MessageBox.Show("Port Opened OK!");
}
else
{
    MessageBox.Show("Problem Opening Port");
    return;
}

[in] A valid 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 .

[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 and to avoid creating a memory and resource leak.

[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 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._

To connect to more than one piece of hardware, multiple calls to can be made. The key is to provide a different for each device you want to open. For other function calls, use the returned hObject to talk to that device.

Each successful call to should be matched with a call to a when you are finished accessing the hardware. methods.

NeoDevice
FindNeoDevices
ClosePort
FreeObject
NetworkIDList
OpenNeoDevice
NeoDevice
OpenNeoDevice
ClosePort
FreeObject

Using the neoVI API in Excel - neoVI API

Example

The example shows how to open and close communication to the driver, send messages and read messages on the networks.

Basic Operation - neoVI API

Working with the neoVI API, the folloing steps and functions will be used.

  1. Start the application.

  2. Open the driver and find a neoVI or ValueCAN device.

  3. Optionally readout any errors using the GetErrorMessages method.

  4. Repeat steps 3 through 5 while your application is monitoring the network.

  5. To start monitoring again go back to step 2.

Using the intrepidcs API in Visual Basic - neoVI API

Example

The example shows how to open and close communication to the driver, send messages and read messages on the networks.

Basic Functions Overview - neoVI API

To use the intrepidcs API in Excel or other VBA supported application add the module into your project (figure 1) by right clicking on the Project in the VBA Editor and selecting Insert and then Module. Open the bas_neoVI.vb. Then, call the methods as defined in the document. The function calls for use in VBA are the same as the calls in Visual Basic 6.

A VBA Excel example (Figure 1) is included to show how the API all works together. This project only has 1 file, NeoVIExample.XlS. Make sure macros are enabled to run this example. All the needed project files are included in the following file:

Create the neoVI object using the method.

Transmit messages using the method.

Read messages on the network using the method.

Close the driver when not monitoring by calling the method.

When the application exits the neoVI object must freed (destroyed) by calling the method.

To use the neoVI API in Visual Basic add the Download the file module into the VB project (figure 1) by right clicking on the Solution and selecting Add Existing Item from the Add menu. Open the bas_neoVI.vb. Then, call the methods as defined in the Section of this document.

A Visual Basic Dot Net 2010 example (Figure 1) is included to show how the API all works together. The main project files are as follows: 1) the project file: IcsNeoDotNet.sln 2) the form file : Form1.vb, and 3) the neoVI module : bas_neoVI.vb. All project files are included in the following file . This project will open in Visual Studio 2010, 2012, 2013, 2015, and 2017.

Name
Description
bas_neoVI.vb
Basic Operation
ExcelVBA.zip
OpenNeoDevice
TxMessages
GetMessages
ClosePort
FreeObject
bas_neoVI.vb
WIN32 API Functions and Types
VBnet2010.zip
Figure 1 - Add Module Command From the VB.NET Menu.
Figure 2 - The VBA Excel Example.
Figure 1 - Add Module Command From the VB.NET Menu.
Figure 2 - The Visual Basic Dot Net 2010 Example.
Figure 1 - Add the Link to the “icsn40.pas”
Figure 2 - The import library “icsn40.pas” is loaded.
Figure 3 - Adding to Interface Uses
Figure 4 - The Borland Delphi Example.
Figure 1 - Opening the Unity 3D Graphics Panel Demo
Figure 2 - Checking to see if the correct scene is open
Figure 3 - Placing scripts in the correct window
Figure 4 - The play button in Unity 3D when in play mode
Figure 5 - This is how your Graphics Panel should look in play mode

FreeObject Method - neoVI API

This method releases system resources used by the neoVI device.

void _stdcall icsneoFreeObject(void * hObject);
Public Declare Function icsneoFreeObject Lib “icsneo40.dll” (ByVal hObject As IntPtr)
[DllImport(“icsneo40.dll”)] public static extern void icsneoFreeObject(IntPtr hObject);

Parameters

hObject

Return Values

None.

Remarks

Examples

icsneoFreeObject(hObject);  //Free the memory associated with our driver object
icsNeoDll.icsneoFreeObject(m_hObject); //Free the memory associated with our driver object
Call icsneoFreeObject(m_hObject)   '//Free the memory associated with our driver object

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.

**** [in] Specifies the driver object created by .

This method is used to release any resources that were allocated by . 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.

FindDevices
OpenNeoDevice
ClosePort
FreeObject
OpenNeoDevice
OpenNeoDevice

Using the neoVI API in LabWindows CVI - neoVI API

Do the following steps to use neoVI in LabWindows CVI:

  1. Link to icsnLW40.lib import library by selecting Add Files To Project from the Edit pull down menu. In the “Add Files To Project” dialog select the icsnLW40.lib file (figure 1). You can also the headers from step 1 if you wish. Your project should now list the files you added (figure 2).

3. Include the header icsnLW40.h in your C module (Figure 3).

Example

The example shows how to open and close communication to the driver, send messages and read messages on the networks.

WaitForRxMessagesWithTimeOut Method - neoVI API

This method is used to wait a specified amount of time for received messages from the neoVI hardware.

Parameters

hObject

iTimeOut

[in] Specifies the amount of time in milliseconds that the function will wait for a received message before returning.

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

This function allows an application to avoid ‘polling’ for received messages. It will return as soon as a message is received or when the timeout specified has been reached.

Examples

Copy the import library , header file , and data structure file to your project directory.

Figure 1 - Link to the “icsnLW40.lib”
Figure 2 - The project window with the library added.
Figure 3 - The #include statement in the C module.

4. Finally, call the methods as defined in the document.

A National Instruments LabWindows example (Figure 1) is included to show how the API all works together. The example files are included in the following file:

Figure 4 - The LabWindows CVI Example.

[in] Specifies the driver object created by .

0 if no message was received during the wait period. 1 if a message was received. -1 will be returned if there is an error condition. must be called to obtain the specific error. The errors that can be generated by this function are:

icsnLW40.lib
icsnLW40.h
icsspyData.h
Basic Operation
LWneoVI.zip (10kB)
int _stdcall icsneoWaitForRxMessagesWithTimeOut(void * hObject, unsigned int iTimeOut);
Public Declare Function icsneoWaitForRxMessagesWithTimeOut Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByVal iTimeOut As UInt32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoWaitForRxMessagesWithTimeOut(IntPtr hObject, UInt32 iTimeOut);
void * hObject = 0; // holds a handle to the neoVI object
icsSpyMessage stMessages[19999]; // holds the received messages
int iResult;
int iNumberOfErrors;
int iNumberOfMessages;
unsigned int iTimeOut = 5; //milliseconds
bool bDone = false;

while(!bDone)
{
    iResult = icsneoWaitForRxMessagesWithTimeOut(hObject, iTimeOut);

    if(iResult == 0)
        continue; //no messages received

    iResult = icsneoGetMessages(hObject,stMessages,&iNumberOfMessages,&iNumberOfErrors);

    if(iResult == 0)
        MessageBox(hWnd,TEXT("Problem Reading Messages"),TEXT("neoVI Example"),0);
    else
        MessageBox(hWnd, TEXT("Messages Read Successfully"),TEXT("neoVI Example"),0);
}

return 0;
Private m_hObject As IntPtr '// Declared at form level and previously open with a call to OpenNeoDevice

Dim iResult As Integer
Dim iTimeOut As UInt32

iTimeOut = Convert.ToUInt32(5000)

lblWaitForRxMessageWithTimeOutResult.Text = "Status"
Application.DoEvents()

'//This function will block until, A: A Message is received by the hardware, or B: the timeout is reached
iResult = icsneoWaitForRxMessagesWithTimeOut(m_hObject, iTimeOut)
If iResult = 1 Then
    'Message received before timeout
    lblWaitForRxMessageWithTimeOutResult.Text = "Message received"
    Call cmdReceive_Click(sender, e)
    '//Do something with the messages received
Else
    'Timeout reached and no messages received
    lblWaitForRxMessageWithTimeOutResult.Text = "Message Not received"
    '//Take action if no messages were received
End If
//Declared at form level and previously open with a call to OpenNeoDevice
IntPtr m_hObject; //handle for device

int iResult;
UInt32 iTimeOut = 5000; //Set timeout to 5 seconds

lblWaitForRxMessageWithTimeOutResult.Text = "Status";
Application.DoEvents();

//This function will block until, A: A Message is received by the hardware, or B: the timeout is reached
iResult = icsNeoDll.icsneoWaitForRxMessagesWithTimeOut(m_hObject, iTimeOut);
if (iResult == 1)
{
    //Message received before timeout
    lblWaitForRxMessageWithTimeOutResult.Text = "Message received";
    //Do something with the messages received
    cmdReceive_Click(sender, e);
}
else
{
    //Timeout reached and no messages received
    lblWaitForRxMessageWithTimeOutResult.Text = "Message Not received";
    //Take action if no messages were received
}
OpenNeoDevice
GetLastAPIError

ISO15765 Message Functions Overview - neoVI API

Name
Description

Enables ISO15765 functions. Must be called before Tx and RX functions.

Sends a ISO15765 message on CAN.

Looks for specified frames and responds with specified flow control on CAN.

ISO15765EnableNetworks
ISO15765TxMessage
ISO15765RxMessage

TxMessagesEx Method - neoVI API

This method transmits longer messages asynchronously to vehicle networks using the neoVI hardware. Method supports CAN FD and Ethernet networks.

int _stdcall icsneoTxMessagesEx(void * hObject, icsSpyMessage *pMsg, int lNetworkID, int lNumMessages, int *NumTxed, int reserved);
Public Declare Function icsneoTxMessagesEx Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pMsg As icsSpyMessage, ByVal lNetworkID As Int32, ByVal lNumMessages As Int32, ByRef NumTxed As Int32, ByVal reserved As Int32) As Int32int _stdcall icsneoTxMessagesEx(void * hObject, icsSpyMessage *pMsg, int lNetworkID, int lNumMessages, int *NumTxed, int reserved);
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoTxMessagesEx(IntPtr hObject, ref icsSpyMessage pMsg, Int32 lNetworkID, Int32 lNumMessages, ref Int32 NumTxed, Int32 reserved);

Parameters

hObject

pMsg

lNetworkID

lNumMessages

NumTxed

[out] Specifies the number of messages that have been transmitted.

reserved

[in] Reserved parameter for future use. Set to 0.

Return Values

NEOVI_ERROR_DLL_ISOTX_DATA_BUFFER_ALLOC = 13

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

NEOVI_ERROR_DLL_ILLEGAL_TX_NETWORK= 90

NEOVI_ERROR_DLL_3G_DEVICE_LICENSE_NEEDS_TO_BE_UPGRADED = 190

Remarks

This function call adds a transmit message to the transmit queue for CAN FD (more than 8 bytes) and Ethernet. The message will be transmitted when the network is free and all previously transmitted messages have been transmitted.

Transmit Report

You can also identify a particular transmitted message with DescriptionID field. This two byte field (only 14 bits are used) allows the programmer to assign an arbitrary number to a message. This number is then returned in the transmit report.

Examples

long lResult;
icsSpyMessage stMessagesTx;
int lNetworkID;
unsigned int iNumberTxed;
unsigned char iDataBytes[]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63}; //Data to send

//Send on HS CAN
lNetworkID = NETID_HSCAN;

//Set the ID
stMessagesTx.ArbIDOrHeader = 0x123;
stMessagesTx.NumberBytesHeader = 0;
stMessagesTx.StatusBitField = 0; //11 bit ID
stMessagesTx.Protocol = SPY_PROTOCOL_CANFD;
stMessagesTx.StatusBitField3 = 16; //Enable bitrate switch

// The number of Data Bytes
//NOTE: CAN FD is limited to lengths of 0,1,2,3,4,5,6,7,8,12,16,20,24,32,48,64
stMessagesTx.NumberBytesData = 64;

//Enable Extra Data Pointer
stMessagesTx.ExtraDataPtrEnabled = 1;
stMessagesTx.ExtraDataPtr = &iDataBytes;
lResult = icsneoTxMessagesEx(m_hObject, &stMessagesTx, lNetworkID, 1, &iNumberTxed, 0);

if (iResult == 0)
    MessageBox(hWnd,TEXT("Problem Transmitting Messages"),TEXT("neoVI Example"),0);
Dim lResult As Long
Dim stMessagesTx As New icsSpyMessage
Dim lNetworkID As Integer
Dim iNumberTxed As Int32
Dim sSplitString() As String
Dim iDataBytes() As Byte = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63}
Dim iCounter As Int32


'//Get pointer to data
Dim gcHandle As System.Runtime.InteropServices.GCHandle = System.Runtime.InteropServices.GCHandle.Alloc(iDataBytes, System.Runtime.InteropServices.GCHandleType.Pinned)
Dim CanFDptr As IntPtr = gcHandle.AddrOfPinnedObject

'//Send on HS CAN
lNetworkID = GetNetworkIDfromString(lstCANFDNetwork.Text)

'//Set the ID
stMessagesTx.ArbIDOrHeader = &h7E0

'// The number of Data Bytes
'//NOTE: CAN FD is limited to lengths of 0,1,2,3,4,5,6,7,8,12,16,20,24,32,48,64
stMessagesTx.NumberBytesData = 64

stMessagesTx.NumberBytesHeader = 0
stMessagesTx.iExtraDataPtr = CanFDptr
stMessagesTx.Protocol = SPY_PROTOCOL_CANFD

'//Use Normal ID
stMessagesTx.StatusBitField = 0
stMessagesTx.StatusBitField2 = 0
stMessagesTx.StatusBitField3 = 16 '//Enable bitrate switch

'// Transmit the assembled message
'//CAN FD More than 8 bytes
'//Enable Extra Data Pointer
stMessagesTx.ExtraDataPtrEnabled = 1
lResult = icsneoTxMessagesEx(m_hObject, stMessagesTx, lNetworkID, 1, iNumberTxed, 0)

If Not CBool(lResult) Then
    MsgBox("Problem Transmitting Message")
End If
gcHandle.Free()
//Hardware must have CAN FD support for this tor work.

int lResult;
icsSpyMessage stMessagesTx = new icsSpyMessage();
int lNetworkID;
uint iNumberTxed = 0;
byte[] iDataBytes = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63};
int iCounter;

//Get pointer to data (could also be done with Unsafe code)
System.Runtime.InteropServices.GCHandle gcHandle = System.Runtime.InteropServices.GCHandle.Alloc(iDataBytes, System.Runtime.InteropServices.GCHandleType.Pinned);
IntPtr CanFDptr = gcHandle.AddrOfPinnedObject();

//Send on HS CAN

string sNetIDToUse = 1;
lNetworkID = icsNeoDll.GetNetworkIDfromString(ref sNetIDToUse);

//Set the ID
stMessagesTx.ArbIDOrHeader = 0x7E0;

// The number of Data Bytes
//NOTE: CAN FD is limited to lengths of 0,1,2,3,4,5,6,7,8,12,16,20,24,32,48,64
stMessagesTx.NumberBytesData = 64;
stMessagesTx.NumberBytesHeader = 0;
stMessagesTx.iExtraDataPtr = CanFDptr;
stMessagesTx.Protocol = Convert.ToByte(CSnet.ePROTOCOL.SPY_PROTOCOL_CANFD);

//Use Normal ID
stMessagesTx.StatusBitField = 0;
stMessagesTx.StatusBitField2 = 0;
stMessagesTx.StatusBitField3 = 16; //Enable bitrate switch

//CAN FD More than 8 bytes
//Enable Extra Data Pointer
stMessagesTx.ExtraDataPtrEnabled = 1;
lResult = icsNeoDll.icsneoTxMessagesEx(m_hObject, ref stMessagesTx, Convert.ToUInt32(lNetworkID), 1, ref iNumberTxed, 0);

// Test the returned result
if (lResult != 1)
{
    MessageBox.Show("Problem Transmitting Message");
}
gcHandle.Free();

FindDevices Method

This method returns the neoVI hardware devices connected to the PC.

Parameters

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

Examples

ISO15765_EnableNetworks Method - neoVI API

This method enables the use of ISO15765-2 on a CAN network. icsneoISO15765_EnableNetwroks must be called before using icsneoISO15765_TransmitMessage or icsneoISO15765_ReceiveMessage.

Parameters

hObject

[in] Handle which specifies the driver object created with the OpenPort method.

lNetwork

[in] Specifies which CAN network the status is requested for. Can be one of the following values:

Return Values

None.

Remarks

None.

Examples

[in] Handle which specifies the driver object created by

[in] This is the address of the first element of an array of structures. This array will be loaded by the application software with messages that are to be transmitted by the hardware.

[in] Specifies the network to transmit the message on. See for a list of valid Network ID values. Network support varies by neoVI device. NETID_DEVICE transmits on to the neoVI Device Virtual Network (see users manual).

[in] Specifies the number of messages to be transmitted. This parameter should always be set to one unless you are transmitting a long Message. Transmitting long messages on ISO or J1708 is described in a .

Returns 1 if successful, 0 if an error occurred. must be called to obtain the specific error. The errors that can be generated by this function are:

After the messages has been transmitted there will be a transmit report message returned from the device. The transmit report will be read out with . Any message read which has the SPY_STATUS_TX_MSG (icsSpyStatusTx) bit set in the is a transmit report.

The transmit report does not necessarily mean the message was transmitted successfully. For example, the Ford SCP network will return a Transmit Report if it had tried to send a message. Therefore, the programmer should always check the GlobalError Flag in the .

To transmit different messages, set the appropriate bits in the . For example, there are bits for init waveforms, extended identifiers and remote frames.

pNeoDeviceEx [out] This is the address of the first element of an array of 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.

The NeoDevice array elements that are returned with this function may be passed to so that individual neoVI devices can be opened.

Network
Value
OpenNeoDevice
icsSpyMessage
NetworkID List
different topic
GetLastAPIError
GetMessages
status bitfield
status bitfield
status bitfield
int _stdcall icsneoFindDevices(NeoDeviceEx* pNeoDeviceEx, int* pNumDevices ,unsigned int* DeviceTypes,unsigned int numDeviceTypes,POptionsFindNeoEx* pOptionsNeoEx,unsigned int* reserved); 
Public Declare Function icsneoFindDevices Lib "icsneo40.dll" (ByRef pNeoDevice As NeoDeviceEx, ByRef pNumDevices As Int32, ByRef DeviceTypes As UInt32, ByVal numDeviceTypes As UInt32, ByRef pOptionsFindNeoEx As OptionsNeoEx, ByVal reserved As UInt32) As Int32
[DllImport("icsneo40.dll")]
public static extern Int32 icsneoFindDevices(ref NeoDeviceEx pNeoDevice, ref Int32 pNumDevices, UInt32 DeviceTypes, UInt32 numDeviceTypes, ref OptionsNeoEx pOptionsNeoEx, UInt32 reserved);
NeoDeviceEx Devices[255];
unsigned long lDevTypes;
int iNumDevices = 255;
int iRetVal = 0;
int lDevTypes;

lDevTypes = NEODEVICE_ALL;

iRetVal = icsneoFindDevices(Devices, &iNumberOfDevices,NULL,0,NULL,0);
int iResult;//Holds the results from function call
NeoDeviceEx ndNeoToOpen = new NeoDeviceEx(); ; //Struct holding detected hardware information
int iNumberOfDevices; //Number of hardware devices to look for
int lDevTypes; //Holds the device types to look for
lDevTypes = NEODEVICE_ALL;

//Set the number of devices to find
iNumberOfDevices = 1;
//Search for connected hardware
iResult = icsNeoDll.icsneoFindDevices(ref ndNeoToOpenex[0],ref iNumberOfDevices, 0, 0,ref neoDeviceOption, 0);
if (iResult == 0)
{
    MessageBox.Show("Problem finding devices");
    return;
}
Dim iResult As Integer '//Holds the results from function call
Dim ndNeoToOpenex As NeoDeviceEx '//Struct holding detected hardware information
Dim iNumberOfDevices As Integer '//Number of hardware devices to look for
Dim lDevTypes As Integer '//Holds the device types to look for
Dim neoDeviceOption As OptionsNeoEx = New OptionsNeoEx '//Not using CAN 0 out


'//Set the devices to look for
lDevTypes = NEODEVICE_ALL
'//Set the number of devices to find
iNumberOfDevices = 1
'//Search for connected hardware
iResult = icsneoFindDevices(ndNeoToOpenex(0), iNumberOfDevices, 0, 0, neoDeviceOption, 0)
If (iResult = 0) Then MsgBox("Problem finding devices")
void _stdcall icsneoISO15765_EnableNetworks(void * hObject, unsigned int iNetwork);
Public Declare Function icsneoISO15765_EnableNetworks Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByVal Network As UInt32) As Int32
[DllImport(“icsneo40.dll”)]
public static extern Int32 icsneoISO15765_EnableNetworks (IntPtr hObject, UInt32 Network);

HS CAN

1

MS CAN

2

HS CAN 2

4

HS CAN 3

8

SW CAN

16

HS CAN 4

20

HS CAN 5

24

HS CAN 6

28

HS CAN 7

32

SW CAN 2

36

lResult = icsneoISO15765_EnableNetworks(m_hObject,NETID_HSCAN);
lResult = icsNeoDll.icsneoISO15765_EnableNetworks(m_hObject,(int)eNETWORK_ID.NETID_HSCAN);
lResult = icsneoISO15765_EnableNetworks(m_hObject, NETID_HSCAN)
NeoDeviceEx
OpenNeoDevice

ClosePort Method - neoVI API

This method closes the communication link with the neoVI hardware.

int _stdcall icsneoClosePort(void * hObject, int * pNumberOfErrors);
Public Declare Function icsneoClosePort Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pNumberOfErrors As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoClosePort(IntPtr hObject, ref Int32 pNumberOfErrors);

Parameters

hObject

pNumberOfErrors

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

Examples

int lNumberOfErrors;    // used to get the number of errors
int iResult;

// Close Communication
iResult = icsneoClosePort(hObject, &iNumberOfErrors);
// Test the Result
if (iResult== 0)
    MessageBox(hWnd,TEXT("Problem Closing Port"),TEXT("neoVI Example"),0);
else
    MessageBox(hWnd,TEXT("Port Closed Successfully"),TEXT("neoVI Example"),0);
//Declared at form level and previously open with a call to OpenNeoDevice
IntPtr m_hObject; //handle for device,

int iResult;
int iNumberOfErrors = 0;

//close the port
iResult = icsNeoDll.icsneoClosePort(m_hObject, ref iNumberOfErrors);
if (iResult == 1)
{
    MessageBox.Show("Port Closed OK!");
}
else
{
    MessageBox.Show("Problem ClosingPort");
}
m_bPortOpen = false;
Private m_hObject As IntPtr '// Declared at form level and previously open with a call to OpenNeoDevice

Dim iResult As Integer
Dim iNumberOfErrors As Integer

'//close the port
iResult = icsneoClosePort(m_hObject, iNumberOfErrors)
If CBool(iResult) Then
    MsgBox("Port Closed OK!")
Else
    MsgBox("Problem Closing Port")
End If

GetMessages Method - neoVI API

Parameters

hObject

pMsg

pNumberOfMessages

[out] Specifies the number of messages the driver has loaded in the pMsg array. This number can be up to 20,000 messages.

pNumberOfErrors

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

Examples

Transmitting Long Messages - neoVI API

Overview

For ISO9141 and Keyword 2000 Networks, a long message transmission option is allowed. Long message transmission is necessary when the message length exceeds twelve bytes (including checksum if used).

You must setup the long message data properly. For the first message, both the 3 byte Header and the 8 byte data section are filled in. For consecutive messages only the 8 byte data section is filled in.

VB Example to Send a 16 byte message

Message Functions Overview - neoVI API

[in] Specifies the driver object created by .

[out] Specifies the number of errors in the neoVI DLL error queue. You can read out the errors by calling the method.

Must be called once for each successful call to or memory and resource leaks will occur.

[in] Specifies the driver object created by .

[out] This is the address of the first element of an array of structures. This array will be loaded with messages received by the hardware. This array must be sized to fit 20,000 structures.

[out] Specifies the number of errors in the neoVI DLL error queue. Errors are obtained using .

Returns 1 if successful, 0 if an error occurred. must be called to obtain the specific error. This function will return 1 even if no messages were received, provided there are no errors. The errors that can be generated by this function are:

The driver object will hold 20,000 received messages before it will generate an rx buffer overflow error (indicated by a error message in the error queue). It is the job of the application software to read this buffer at regular intervals. The rate that the application needs to read these messages is dependant on the rate messages are received on the bus. For example, a high bandwidth CAN bus can generate 5000 messages per second. In this case you must read out the messages at least every four seconds or overflow errors will result.

You can transmit a long message by calling the method with modified arguments. First, you will pass an array of icsSpyMessage structures which contain the long message data. This data in the array must be set properly. Finally, you must set the lNumMessages argument to the number of structures.

Name
Description
OpenNeoDevice
GetErrorMessages
OpenNeoDevice
int _stdcall icsneoGetMessages(void * hObject, icsSpyMessage *pMsg, int *pNumberOfMessages, int *pNumberOfErrors);
Public Declare Function icsneoGetMessages Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pMsg As icsSpyMessage, ByRef pNumberOfMessages As Int32, ByRef pNumberOfErrors As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoGetMessages(IntPtr hObject, ref icsSpyMessage pMsg, ref Int32 pNumberOfMessages, ref Int32 pNumberOfErrors);
void * hObject = 0;                 // holds a handle to the neoVI object
icsSpyMessage stMessages[20000]; // holds the received messages
int iResult;
int iNumberOfErrors;
int iNumberOfMessages;

// read out the messages
iResult = icsneoGetMessages(hObject,stMessages,&iNumberOfMessages,&iNumberOfErrors);
if (iResult == 0)
    MessageBox(hWnd,TEXT("Problem Reading Messages"),TEXT("neoVI Example"),0);
else
    MessageBox(hWnd, TEXT("Messages Read Successfully"),TEXT("neoVI Example"),0);
Dim lResult As Long ''Storage for Result of Call
Dim iNumberOfErrors As Long ''Storage for number of errors
Dim lNumberOfMessages As Long ''Storage for number of messages
Dim stMessages(20000) As icsSpyMessage '// Array of message structures to hold the received data

lResult = icsneoGetMessages(m_hObject, stMessages(0), lNumberOfMessages, iNumberOfErrors) ''Call get message function
If Not CBool(lResult) Then ''See if Call was successful
    MsgBox("Problem Getting Messages")
    Exit Sub
End If
long lResult; //Storage the Result for the function call
int lNumberOfErrors = 0; //Storage for the number of Errors
int lNumberOfMessages = 0; //Storage for the number of messages

//Call Get messages
lResult = icsNeoDll.icsneoGetMessages(m_hObject, ref stMessages[0],ref lNumberOfMessages,ref lNumberOfErrors);
if(lResult == 0) //Check the Results to see if there is a problem
{
    MessageBox.Show ("Problem Getting Messages");
    return;
}
'// Declared at form level
Private m_hObject As intptr '// Holds the object for the state of the application


Dim stMsgJ1850(0 To 3) As icsSpyMessageJ1850
Dim lResult As Long

'//Fill in first header
stMsgJ1850(0).Header1 = &H1
stMsgJ1850(0).Header2 = &H2
stMsgJ1850(0).Header3 = &H0
stMsgJ1850(0).NumberBytesHeader = 3

'//Fill in data
stMsgJ1850(0).Data1 = &H4
stMsgJ1850(0).Data2 = &H5
stMsgJ1850(0).Data3 = &H6
stMsgJ1850(0).Data4 = &H7
stMsgJ1850(0).Data5 = &H8
stMsgJ1850(0).Data6 = &H9
stMsgJ1850(0).Data7 = &H10
stMsgJ1850(0).Data8 = &H11
stMsgJ1850(0).NumberBytesData = 8

'//Fill in data
stMsgJ1850(1).NumberBytesHeader = 0
stMsgJ1850(1).Data1 = &H12
stMsgJ1850(1).Data2 = &H13
stMsgJ1850(1).Data3 = &H14
stMsgJ1850(1).Data4 = &H15
stMsgJ1850(1).Data5 = &H16
stMsgJ1850(1).NumberBytesData = 5

'// Transmit the assembled message
lResult = icsneoTxMessages(m_hObject, stMsgJ1850(0), NETID_ISO, 2)

'// Test the returned result
If Not CBool(lResult) Then
    MsgBox("Problem Transmitting Message")
End If
OpenNeoDevice
icsSpyMessage
icsSpyMessage
GetErrorMessages
GetLastAPIError
NEOVI_ERROR_DLL_RX_MSG_BUFFER_OVERFLOW
TxMessages

GetConfiguration Method - neoVI API

int _stdcall icsneoGetConfiguration(int hObject, unsigned char *pData, int *plNumBytes);
Public Declare Function icsneoGetConfiguration Lib "icsneo40.dll" (ByVal hObject As Int32, ByRef pData As Byte, ByRef lNumBytes As Int32) As Int32
[DllImport("icsneo40.dll")]
public static extern Int32 icsneoGetConfiguration(Int32 hObject, ref byte pData, ref Int32 lNumBytes);

Parameters

hObject

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

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

None.

Examples

Displays the Value of CNF1 of ValueCAN/neoVI HSCAN

unsigned char bConfigBytes[1024];

int iNumConfigBytes = 1024;

lResult  =  icsneoGetConfiguration(hObject, bConfigBytes, &iNumConfigBytes);
if (lResult == 0)
    MessageBox(hWnd,TEXT("Problem Reading Configuration"),TEXT("neoVI Example"),0);
else
{
    wsprintf(szOut,TEXT("HSCAN CNF1 = %x"),bConfigBytes[NEO_CFG_MPIC_HS_CAN_CNF1]);
    MessageBox(hWnd,szOut,TEXT("neoVI Example"),0);
} 
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]);
}
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]);
} 

Reads messages from the neoVI device.

Transmits messages to vehicle networks using a neoVI device.

Transmits messages to vehicle networks using a neoVI device. Used with CAN FD and Ethernet

Waits a specified amount of time in milliseconds for a received message

Calculates and returns the timestamp for a message

Functions for ISO15765 transactions.

Example for sending longer (<12 bytes) ISO9141/KW2K Messages

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 the method. For ValueCAN3 use the method.

[in] Specifies the driver object created with the method.

Returns 1 if successful, 0 if an error occurred. must be called to obtain the specific error. The errors that can be generated by this function are:

GetMessages
TxMessages
TxMessagesEx
WaitForRxMessagesWithTimeOut
GetTimeStampForMsg
ISO15765 Functions
Transmitting Long Messages
GetFireSettings
GetVCAN3Settings
OpenNeoDevice
GetLastAPIError

WIN32 API Overview - neoVI API

Basic Operations

Name
Description

Used to locate connected neoVI and ValueCAN devices.

Used to open a communication link with a specific neoVI or ValueCAN device.

Closes the communication link with the neoVI device.

Releases system resources used by the neoVI device.

Message Functions

Name
Description

Reads messages from the neoVI or ValueCAN device.

Transmits messages to vehicle networks using a neoVI or ValueCAN device.

Transmits messages longer than 8 bytes to vehicle networks using a neoVI or ValueCAN device. Used with Ethernet and CAN FD

Waits a specified amount of time in milliseconds for a received message

Calculates the timestamp for a message given the handle to the device and a Message Structure

Enables ISO15765 for the selective CAN/CANFD network

Configures an outgoing ISO15765 transaction

Configures the hardware to listen for a ISO15765 transaction

In formation on sending longer frames on ISO9171 and Keyword 2000 networks

Device Settings Functions

Name
Description

Reads the configuration bytes for a neoVI Blue or ValueCAN device

Sends configuration bytes to a neoVI Blue or ValueCAN device

Gets device and network parameters for a neoVI Fire device

Sets device and network parameters for a neoVI Fire device

Gets device and network parameters for a neoVI Fire 2 device

Sets device and network parameters for a neoVI Fire 2 device

Gets device and network parameters for a ValueCAN3 device

Sets device and network parameters for a ValueCAN3 device

Gets device and network parameters for a ValueCAN4-1 and ValueCAN4-2 device

Sets device and network parameters for a ValueCAN4-1 and ValueCAN4-2 device

Gets device and network parameters for a ValueCAN RF device

Sets device and network parameters for a ValueCAN RF device

Gets device and network parameters for a RAD Galaxy device

Sets device and network parameters for a RAD Galaxy device

Set the baud or bit rate for a specific neoVI network

Gets the firmware version of a neoVI device

Gets the firmware version stored in the DLL API

Forces the firmware to updated on a neoVI device

Gets individual parameters for a neoVI device

Sets individual parameters for a neoVI device

Sets callback function pointers for flashing a neoVI

Clears callback function pointers for flashing a neoVI

Gets the current real-time clock value from a connect neoVI device

Sets the current real-time clock value in a connected neoVI device

Error Functions

Name
Description

Returns the error generated by the last intrepidcs API call

Returns the intrepidcs API error message queue

Returns a text description of an intrepidcs API error

General Utility Functions

Name
Description

Used to determine if an hObject reference is valid

Returns DLL version information

Starts the TCP/IP socket server at a specified port.

Stops the TCP/IP socket server

Returns information on performance of dll and hardware

CoreMini Functions

Function
Description

Starts execution of a script that has been downloaded to a neoVI device

Stops execution of a script running on a neoVI device

Downloads a script to a connected neoVI device into a specified location

Clears a script from a specific location on a neoVI device

Starts a function block within a script on a neoVI device

Returns the run status of a function block within a script on a neoVI device

Stops the execution of a function block within a script on a neoVI device

Stops the execution of a function block within a script on a neoVI device

Read an application signal from a script running on a neoVI device

Set the value of an application signal in a script running on a neoVI device

ScriptReadISO15765TxMessage

Read parameters of an ISO15765-2 long transmit message in a script on a neoVI device

ScriptWriteISO15765TxMessage

Change the parameters for an ISO15765-2 long transmit message defined in a script on a neoVI device

Deprecated Functions

Name
Description

OpenPort

It is no longer necessary to call this before and after calling SendConfiguration

No longer supported. It is present in the API but will always return 0

ScriptReadRxMessage

Reads parameters for a receive message defined in a script on a neoVI device

ScriptReadTxMessage

Reads parameters for a transmit message defined within a script on a neoVI device

ScriptWriteRxMessage

Alter a receive message defined within script on a neoVI device

ScriptWriteTxMessage

Alter a transmit message defined within a script on a neoVI device

neoVI Fire - neoVI API

Device Settings Functions Overview - neoVI API

GetTimeStampForMsg Method - neoVI API

This method calculates the timestamp for a message, based on the connected hardware type, and converts it to a usable variable.

Parameters

hObject

pMsg

[in] The message to be used for calculating timestamp.

pTimeStamp

[out] The calculated timestamp.

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

Different models of neoVI devices have different time resolutions. This function uses the proper formula to calculate a timestamp based on the connected device type.

Examples

ISO15765_ReceiveMessage Method - neoVI API

This method configures a receive message using ISO15765-2 on a CAN network. icsneoISO15765_EnableNetwroks must be called before using icsneoISO15765_ReceiveMessage. PCI bytes and Flow control decoding is taken care of by the dll for the transaction.

Parameters

hObject

[in] Handle which specifies the driver object created with the OpenPort method.

ulIndex [in] Specifies the Index to configure, 10 elements 0-9.

stCM_ISO157652_RxMessage

Return Values

None.

Remarks

None.

Examples

ISO15765_TransmitMessage Method - neoVI API

This method transmits a message using ISO15765-2 on a CAN network. icsneoISO15765_EnableNetwroks must be called before using icsneoISO15765_TransmitMessage. PCI bytes and Flow control decoding is taken care of by the dll for the transaction.

Parameters

hObject

[in] Handle which specifies the driver object created with the OpenPort method.

ulNetwork

stCM_ISO157652_TxMessage

ulBlockingTimeout

[in] Amount of time in ms to wait for flow controls before timing out.

Return Values

None.

Remarks

None.

Examples

SendConfiguration Method - neoVI API

This method sends configuration information to the hardware.

Parameters

hObject

pData

lNumBytes

[in] This must always be set to 1024.

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

This method will only update the configuration defined in the Configuration Array topic. It will also apply checking to the data so that a neoVI is not programmed to an illegal state. For example, setting the CAN controller to an illegal operating mode.

Examples

GetFireSettings Method - neoVI API

This method reads the configuration settings from a neoVI Fire device.

Parameters

hObject

pSettings

iNumBytes

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

Examples

neoVI FIRE 2 - neoVI API

GetFIRE2Settings Method - neoVI API

This method reads the configuration settings from a neoVI FIRE 2 device.

Parameters

hObject

pSettings

iNumBytes

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

Examples

ValueCAN3 - neoVI API

SetFire2Settings Method - neoVI API

Parameters

hObject

pSettings

iNumBytes

bSaveToEEPROM

[in] If set to 0, the settings changes will revert to the values stored in EEPROM when the neoVI FIRE 2 is power-cycled. If set to 1, the values will overwrite the EEPROM settings and become persistent across power-cycles of the neoVI FIRE 2.

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

Examples

Use instead

Use instead

Name
Description

Gets device and network parameters for a neoVI Fire device

Sets device and network parameters for a neoVI Fire device

Name
Description

[in] Specifies the driver object created by .

Returns 1 if successful, 0 if an error occurred. must be called to obtain the specific error. The errors that can be generated by this function are:

[in] This is the address of the structure. The structure contains the properties for the multi frame message transaction.

[in] Specifies the network to transmit the message on. See for a list of valid Network ID values. Network support varies by neoVI device. NETID_DEVICE transmits on to the neoVI Device Virtual Network (see users manual).

[in] This is the address of the structure. The structure contains the properties for the multi frame message transaction.

[in] Specifies the driver object created by .

[in] This is an array configuration bytes. The format of this array is defined in the Configuration Array help topic. This data should be filled in with a call to before calling SendConfiguration. The size of this array must always be 1024 bytes.

Returns 1 if successful, 0 if an error occurred. must be called to obtain the specific error. The errors that can be generated by this function are:

[in] Specifies the driver object created by .

[out] Pointer to an structure.

[in] This value is always the size, in bytes, of the structure.

Returns 1 if successful, 0 if an error occurred. must be called to obtain the specific error. The errors that can be generated by this function are:

After getting the current settings, you may change the parameters defined in the structure and write the settings back to the neoVI Fire using .

Name
Description

[in] Specifies the driver object created by .

[out] Pointer to a structure.

[in] This value is always the size, in bytes, of the structure.

Returns 1 if successful, 0 if an error occurred. must be called to obtain the specific error. The errors that can be generated by this function are:

After getting the current settings, you may change the parameters defined in the structure and write the settings back to the neoVI FIRE 2 using .

Name
Description

[in] Specifies the driver object created by .

[in] The address of an allocated structure.

[in] This value is always the size, in bytes, of the structure.

Returns 1 if successful, 0 if an error occurred. must be called to obtain the specific error. The errors that can be generated by this function are:

Before using this function, the structure must be initialized with the current neoVI settings using .

int _stdcall icsneoGetTimeStampForMsg(void * hObject, icsSpyMessage *pMsg, icsSpyMessage *pMsg, double *pTimeStamp);
Public Declare Function icsneoGetTimeStampForMsg Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pMsg As icsSpyMessage, ByRef pTimeStamp As Double) As Int32
[DllImport(“icsneo40.dll”)] public static extern IntPtr icsneoGetTimeStampForMsg(Int32 hObject, ref icsSpyMessage pMsg, ref double pTimeStamp);
int hObject;
int iResult;
double dTimeStamp;
icsSpyMessage Msg;

iResult = icsneoGetTimeStampForMsg(m_hObject, &Msg, &dTimeStamp);
Dim iResult As Integer
Dim dTimeStamp As Double
icsSpyMessage Msg;

iResult = icsneoGetTimeStampForMsg(m_hObject, Msg, dTimeStamp)
int iResult;
long lTimeStamp;
icsSpyMessage Msg;

iResult = icsNeoDll.icsneoGetTimeStampForMsg(m_hObject, ref Msg, ref dTimeStamp);
void _stdcall icsneoISO15765_ReceiveMessage(void * hObject, unsigned long ulNetworkID,stCM_ISO157652_RxMessage *pMsg);
Public Declare Function icsneoISO15765_ReceiveMessage Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByVal ulNetworkID As Integer, ByRef pMsg As stCM_ISO157652_RxMessage) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoISO15765_ReceiveMessage(IntPtr hObject,Int32 ulNetworkID,ref stCM_ISO157652_RxMessage pMsg);
int lResult;
stCM_ISO157652_RxMessage flow_cntrl_msg;

memset(&flow_cntrl_msg,0,sizeof(flow_cntrl_msg));
lResult = icsneoISO15765_EnableNetworks(m_hObject, NETID_HSCAN);

//Build structure for message
flow_cntrl_msg.vs_netid = NETID_HSCAN;
flow_cntrl_msg.padding = 0xAA; //Set Padding Byte
flow_cntrl_msg.id = 0x7E0; //ArbID of the message
flow_cntrl_msg.id_mask = 0xFFF; //The flow control arb filter mask (response id from receiver)
flow_cntrl_msg.fc_id = 0x7E8; //ArbID for the flow control Frame
flow_cntrl_msg.blockSize = 100;
flow_cntrl_msg.stMin = 100;
flow_cntrl_msg.cf_timeout = 1000;

//Set flags for Padding and ID information.
flow_cntrl_msg.paddingEnable = true;
flow_cntrl_msg.id_29_bit_enable = false;
flow_cntrl_msg.fc_id_29_bit_enable = false;
flow_cntrl_msg.ext_address_enable = false;
flow_cntrl_msg.fc_ext_address_enable = false;
flow_cntrl_msg.overrideSTmin = false;
flow_cntrl_msg.overrideBlockSize = false;

lResult = icsneoISO15765_ReceiveMessage(m_hObject, 0, &flow_cntrl_msg);
int lResult;
String sTempNetwork;
stCM_ISO157652_RxMessage flow_cntrl_msg = new stCM_ISO157652_RxMessage();

lResult = icsNeoDll.icsneoISO15765_EnableNetworks(m_hObject, Convert.ToInt32(eNETWORK_ID.NETID_HSCAN));

//Build structure for message
flow_cntrl_msg.vs_netid = Convert.ToInt16(eNETWORK_ID.NETID_HSCAN);
flow_cntrl_msg.padding = 0xAA; //Set Padding Byte
flow_cntrl_msg.id = 0x7E0 //ArbID of the message
flow_cntrl_msg.id_mask = 0xFFF; //The flow control arb filter mask (response id from receiver)
flow_cntrl_msg.fc_id = 0x7E8; //ArbID for the flow control Frame
flow_cntrl_msg.blockSize = 100;
flow_cntrl_msg.stMin = 100;
flow_cntrl_msg.cf_timeout = 1000;

//Set flags for Padding and ID information.
flow_cntrl_msg.flags = 0;
int iFlags = Convert.ToInt32(stCM_ISO157652_RxMessage_Flags.enableFlowControlTransmission);
iFlags = (iFlags | Convert.ToInt32(CSnet.stCM_ISO157652_TxMessage_Flags.paddingEnable));
flow_cntrl_msg.flags = Convert.ToUInt16(iFlags);

lResult = icsNeoDll.icsneoISO15765_ReceiveMessage(m_hObject, 0, ref flow_cntrl_msg);
Dim lResult As Integer
Dim flow_cntrl_msg As stCM_ISO157652_RxMessage

lResult = icsneoISO15765_EnableNetworks(m_hObject, NETID_HSCAN)

'//Build structure for message
flow_cntrl_msg.vs_netid = NETID_HSCAN
flow_cntrl_msg.padding = &HAA '//Set Padding Byte
flow_cntrl_msg.id = &H7E0 '//ArbID of the message
flow_cntrl_msg.id_mask = &HFFF '//The flow control arb filter mask (response id from receiver)
flow_cntrl_msg.fc_id = &H7E8 '//ArbID for the flow control Frame
flow_cntrl_msg.blockSize = 100
flow_cntrl_msg.stMin = 100
flow_cntrl_msg.cf_timeout = 1000

'//Set flags for Padding and ID information.
flow_cntrl_msg.flags = Convert.ToUInt32(stCM_ISO157652_RxMessage_Flags.enableFlowControlTransmission)
flow_cntrl_msg.flags = CUShort(flow_cntrl_msg.flags Or stCM_ISO157652_TxMessage_Flags.paddingEnable)

lResult = icsneoISO15765_ReceiveMessage(m_hObject, 0, flow_cntrl_msg)
void _stdcall icsneoISO15765_TransmitMessage(void * hObject, unsigned long ulNetworkID,stCM_ISO157652_TxMessage *pMsg,unsigned long ulBlockingTimeout);
Public Declare Function icsneoISO15765_TransmitMessage Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByVal ulNetworkID As Integer, ByRef pMsg As stCM_ISO157652_TxMessage, ByVal ulBlockingTimeout As Integer) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoISO15765_TransmitMessage(IntPtr hObject,Int32 ulNetworkID,ref stCM_ISO157652_TxMessage pMsg,Int32 ulBlockingTimeout);
long lResult;
int iNetwork = 1;
int iCounter = 0;

//Create Message and adjust array to proper size
stCM_ISO157652_TxMessage tx_msg;
::ZeroMemory(&tx_msg,sizeof(stCM_ISO157652_TxMessage));
//enable ISO15765 on HS CAN
lResult = icsneoISO15765_EnableNetworks(m_hObject,NETID_HSCAN);
tx_msg.id = 0x7E0; //ArbID of the message
tx_msg.vs_netid = NETID_HSCAN; //Network to use
tx_msg.num_bytes = 64; //The number of data bytes to use
tx_msg.padding = 0xAA;//Set Padding Byte

//Set the Flags
tx_msg.flags = 0;
tx_msg.paddingEnable = true;

//Set Flow control message
tx_msg.fc_id = 0x7E8; //ArbID for the flow control Frame
tx_msg.fc_id_mask = 0xFFF; //The flow control arb filter mask (response id from receiver)
tx_msg.flowControlExtendedAddress = 0xFE; //Extended ID
tx_msg.fs_timeout = 0x100; //Flow Control Time out in ms
tx_msg.fs_wait = 0x3000; //Flow Control FS=Wait Timeout ms
tx_msg.blockSize = 0; //Block size (for sending flow Control)
tx_msg.stMin = 0;
//Fill data
for(iCounter = 0;iCounter<64;iCounter++)
{
    tx_msg.data[iCounter] = iCounter;
}

lResult = icsneoISO15765_TransmitMessage(m_hObject, NETID_HSCAN, &tx_msg, 3000);
int lResult;
int iCounter;
int iNetwork = 1;
byte[] DataBytes = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63};

//Create Message and adjust array to proper size
stCM_ISO157652_TxMessage tx_msg = new stCM_ISO157652_TxMessage();
tx_msg.data = new byte[4096];

//enable ISO15765
lResult = icsNeoDll.icsneoISO15765_EnableNetworks(m_hObject, 1);
tx_msg.id = 0x7E0; //ArbID of the message
tx_msg.vs_netid = 1; //Network to use
tx_msg.num_bytes = 64; //The number of data bytes to use
tx_msg.padding = 0xAA; //Set Padding Byte

//Set Flags
int iFlags=0;
iFlags = (iFlags | Convert.ToInt32(CSnet.stCM_ISO157652_TxMessage_Flags.paddingEnable)); //Enable Padding
tx_msg.flags = Convert.ToUInt16(iFlags);

//Set up Flow control
tx_msg.fc_id = 0x7E8; //ArbID for the flow control Frame
tx_msg.fc_id_mask = 0xFFF; //The flow control arb filter mask (response id from receiver)

tx_msg.fs_timeout = 0x100; //Flow Control Time out in ms
tx_msg.fs_wait = 0x3000; //Flow Control FS=Wait Timeout ms
tx_msg.blockSize = 0;//Block size (for sending flow Control)
tx_msg.stMin = 0;
//Fill data

for (iCounter = 0; iCounter < DataBytes.GetUpperBound(0);iCounter ++)
{
    tx_msg.data[iCounter] = DataBytes[iCounter];
}
lResult = icsNeoDll.icsneoISO15765_TransmitMessage(m_hObject, iNetwork,ref tx_msg, 3000);
Dim lResult As Integer
Dim iCounter As Integer
Dim iNetwork As Integer = 1
Dim DataIn() As Byte = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63}

'//Create Message and adjust array to proper size
Dim tx_msg As stCM_ISO157652_TxMessage
tx_msg.data = New Byte(4096) {}

'//Create Flow Control Receive filter
Dim flow_cntrl_msg As New stCM_ISO157652_RxMessage

'//enable ISO15765
lResult = icsneoISO15765_EnableNetworks(m_hObject, GetNetworkIDfromString(lstISO15765Network.Text))

tx_msg.id = &H7E0 '//ArbID of the message
tx_msg.vs_netid = NETID_HSCAN '//Network to use
tx_msg.num_bytes = 64 '//The number of data bytes to use
tx_msg.padding = &HAA '//Set Padding Byte

tx_msg.flags = 0 '//Clear Flags
tx_msg.flags = CUShort(tx_msg.flags Or stCM_ISO157652_TxMessage_Flags.paddingEnable)'//Enable Padding

'//Configure Flow Control
tx_msg.fc_id = &H7E8 '//ArbID for the flow control Frame
tx_msg.fc_id_mask = &HFFF '//The flow control arb filter mask (response id from receiver)
tx_msg.flowControlExtendedAddress = 0 '//Extended ID
tx_msg.fs_timeout = &H100 '//Flow Control Time out in ms
tx_msg.fs_wait = &H3000 '//Flow Control FS=Wait Timeout ms
tx_msg.blockSize = 0 '//Block size (for sending flow Control)
tx_msg.stMin = 0

'//Fill data
For iCounter = 0 To UBound(DataIn)
    tx_msg.data(iCounter) = DataIn(iCounter)
Next iCounter
lResult = icsneoISO15765_TransmitMessage(m_hObject, iNetwork, tx_msg, 3000)
int _stdcall icsneoSendConfiguration(int hObject, unsigned char *pData, int lNumBytes);
[DllImport("icsneo40.dll")]
public static extern Int32 icsneoSetFireSettings(Int32 hObject, ref SFireSettings pSettings, Int32 iNumBytes, Int32 bSaveToEEPROM);
Public Declare Function icsneoSendConfiguration Lib “icsneo40.dll” (ByVal hObject As Int32, ByRef pData As Byte, ByVal lNumBytes As Int32) As Int32
unsigned char bConfigBytes[1024];
int iNumConfigBytes = 1024;

if(m_bPortOpen)
{
   lResult = icsneoGetConfiguration(hObject, bConfigBytes, &iNumConfigBytes);
   if (lResult == 0)
       MessageBox(hWnd,TEXT("Problem Reading Configuration"),TEXT("neoVI Example"),0);
   else
   {
       iOldCNF1=bConfigBytes[NEO_CFG_MPIC_HS_CAN_CNF1];
       iOldCNF2=bConfigBytes[NEO_CFG_MPIC_HS_CAN_CNF2];
       iOldCNF3=bConfigBytes[NEO_CFG_MPIC_HS_CAN_CNF3];


       // 250 K for Value CAN 500k for neoVI (neoVI and valuecan use different CAN controller rates)
       bConfigBytes[NEO_CFG_MPIC_HS_CAN_CNF1] = 0x03;
       bConfigBytes[NEO_CFG_MPIC_HS_CAN_CNF2] = 0xB8;
       bConfigBytes[NEO_CFG_MPIC_HS_CAN_CNF3] = 0x05;

       lResult = icsneoSendConfiguration(hObject, bConfigBytes, iNumConfigBytes);

       if (lResult == 0)
           MessageBox(hWnd,TEXT("Problem Updating Configuration"),TEXT("neoVI Example"),0);
        else
       {
           wsprintf(szOut,TEXT("Old Values: HSCAN CNF1 = %x HSCAN CNF2 = %x HSCAN CNF3 = %x \n\nNew Values HSCAN CNF1 = %x HSCAN CNF2 = %x HSCAN CNF3 = %x "),
           iOldCNF1,
           iOldCNF2,
           iOldCNF3,
           bConfigBytes[NEO_CFG_MPIC_HS_CAN_CNF1],
           bConfigBytes[NEO_CFG_MPIC_HS_CAN_CNF2],
           bConfigBytes[NEO_CFG_MPIC_HS_CAN_CNF3]);
           MessageBox(hWnd,szOut,TEXT("neoVI Example"),0);
       }
   }
}
else
   MessageBox(hWnd,TEXT("Port Not Open"),TEXT("neoVI Example"),0);
Dim bConfigBytes(1024) As Byte ''Storage for Data bytes from device
Dim iNumBytes As Integer ''Storage for Number of Bytes
Dim lResult As Integer ''Storage for Result of Called Function
Dim Counter As Integer
Dim iNumberOfErrors As Long ''Storage for Number of Errors Received

''Clear ListBox
lstConfigInformation.Items.Clear()
''Call Get Configuration
lResult = icsneoGetConfiguration(m_hObject, bConfigBytes(0), iNumBytes)
''Fill Listbox with Data From Function Call
For Counter = 0 To 1024
   lstConfigInformation.Items.Add("Byte Number-" & Counter & " Byte Data-" & bConfigBytes(Counter))
Next Counter

'/---------------------READ CONFIGURATION -----------------------------------------------

''Set HS CAN Baud Rate Information
bConfigBytes(NEO_CFG_MPIC_HS_CAN_CNF1) = Val("&H" & txtCNF1.Text)
bConfigBytes(NEO_CFG_MPIC_HS_CAN_CNF2) = Val("&H" & txtCNF2.Text)
bConfigBytes(NEO_CFG_MPIC_HS_CAN_CNF3) = Val("&H" & txtCNF3.Text)

'/---------------------SEND CONFIGURATION -----------------------------------------------
''Call Sned configuration
lResult = icsneoSendConfiguration(m_hObject, bConfigBytes(0), iNumBytes)

'// make sure the read was successful
If Not CBool(lResult) Then
   MsgBox("Problem sending configuration")
   lResult = icsneoClosePort(m_hObject, iNumberOfErrors)
   Exit Sub
Else
   MsgBox("Configuration Successfull")
End If
byte[] bConfigBytes= new byte[1024]; //Storage for Data bytes from device
int iNumBytes = 0; //Storage for Number of Bytes
int lResult = 0; //Storage for Result of Called Function
int Counter;
int lNumberOfErrors = 0; //Storage for Number of Errors Received

//Clear ListBox
lstConfigInformation.Items.Clear();

//---------------------READ CONFIGURATION -----------------------------------------------

//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]);
}

//Set HS CAN Baud Rate Information
bConfigBytes[Convert.ToInt32(icsConfigSetup.NEO_CFG_MPIC_HS_CAN_CNF1)] = Convert.ToByte(ConvertFromHex(txtCNF1.Text));
bConfigBytes[Convert.ToInt32(icsConfigSetup.NEO_CFG_MPIC_HS_CAN_CNF2)] = Convert.ToByte(ConvertFromHex(txtCNF2.Text));
bConfigBytes[Convert.ToInt32(icsConfigSetup.NEO_CFG_MPIC_HS_CAN_CNF3)] = Convert.ToByte(ConvertFromHex(txtCNF3.Text));

//---------------------SEND CONFIGURATION -----------------------------------------------
//Call Sned configuration
lResult = icsNeoDll.icsneoSendConfiguration(m_hObject, ref bConfigBytes[0], iNumBytes);

// make sure the read was successful
if(lResult==0)
{
   MessageBox.Show("Problem sending configuration");
   lResult = icsNeoDll.icsneoClosePort(m_hObject, ref lNumberOfErrors);
}
else
{
   MessageBox.Show("Configuration Successfull");
}
int _stdcall icsneoGetFireSettings(void * hObject, SFireSettings *pSettings, int iNumBytes);
Public Declare Function icsneoGetFireSettings Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pSettings As SFireSettings , ByVal iNumBytes As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoSetFireSettings(IntPtr hObject, ref SFireSettings pSettings, Int32 iNumBytes, Int32 bSaveToEEPROM);
SFireSettings FireReadSettings;
int iNumberOfBytes;
int iResult;

//Get the settings
iNumberOfBytes=sizeof(SFireSettings);
iResult = icsneoGetFireSettings(m_hObject, &FireReadSettings, iNumberOfBytes);
if(iResult == 0)
{
    MessageBox::Show("Problem reading FIRE configuration");
    return;
}
//Declared at form level and previously open with a call to OpenNeoDevice
IntPtr m_hObject; //handle for device,
SFireSettings FireReadSettings= new SFireSettings();
int iNumberOfBytes;
int iResult;

//Get the settings
iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(FireReadSettings);
iResult = icsNeoDll.icsneoGetFireSettings(m_hObject,ref FireReadSettings, iNumberOfBytes);
if (iResult == 0)
{
    MessageBox.Show("Problem reading FIRE configuration");
    return;
}
Private m_hObject As IntPtr '// Declared at form level and previously open with a call to OpenNeoDevice

Dim FireReadSettings As SFireSettings
Dim iNumberOfBytes As Integer
Dim iResult As Integer

'//Get the settings
iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(FireReadSettings)
iResult = icsneoGetFireSettings(m_hObject, FireReadSettings, iNumberOfBytes)
If iResult = 0 Then
    MsgBox("Problem reading FIRE configuration")
    Exit Sub
End If
int _stdcall icsneoGetFIRE2Settings(void * hObject, SFIRE2Settings *pSettings, int iNumBytes);
Public Declare Function icsneoGetFIRE2Settings Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pSettings As SFIRE2Settings , ByVal iNumBytes As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoGetFIRE2Settings(IntPtr hObject, ref SFIRE2Settings pSettings, Int32 iNumBytes);
SFIRE2Settings Fire2ReadSettings;
int iNumberOfBytes;
int iResult;

//Get the settings
iNumberOfBytes=sizeof(Fire2ReadSettings );
iResult = icsneoGetFIRE2Settings(m_hObject, &Fire2ReadSettings , iNumberOfBytes);
if(iResult == 0)
{
    MessageBox::Show("Problem reading configuration");
    return;
}
//Declared at form level and previously open with a call to OpenNeoDevice
IntPtr m_hObject; //handle for device,
SFIRE2Settings Fire2ReadSettings = new SFIRE2Settings ();
int iNumberOfBytes;
int iResult;

//Get the settings
iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(Fire2ReadSettings);
iResult = icsNeoDll.icsneoGetFIRE2Settings(m_hObject,ref Fire2ReadSettings , iNumberOfBytes);
if (iResult == 0)
{
    MessageBox.Show("Problem reading configuration");
    return;
}
Private m_hObject As IntPtr '// Declared at form level and previously open with a call to OpenNeoDevice

Dim Fire2ReadSettings As SFIRE2Settings
Dim iNumberOfBytes As Integer
Dim iResult As Integer

'//Get the settings
iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(Fire2ReadSettings)
iResult = icsneoGetFIRE2Settings(m_hObject, Fire2ReadSettings , iNumberOfBytes)
If iResult = 0 Then
    MsgBox("Problem reading configuration")
    Exit Sub
End If
int _stdcall icsneoSetFire2Settings(void * hObject, SFIRE2Settings *pSettings, int iNumBytes, int bSaveToEEPROM);
Public Declare Function icsneoSetFire2SettingsLib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pSettings As SFIRE2Settings, ByVal iNumBytes As Int32, ByVal bSaveToEEPROM As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoSetFire2Settings(IntPtr hObject, ref SFIRE2Settings pSettings, Int32 iNumBytes, Int32 bSaveToEEPROM);
SFIRE2Settings Fire2ReadSettings;
int iNumberOfBytes;
int iResult;

//################################
//Fire2ReadSettings struct is read
//and changed as needed before
//Setting the new values
//################################

iNumberOfBytes=sizeof(Fire2ReadSettings);
iResult = icsneoSetFIRE2Settings(m_hObject, &Fire2ReadSettings , iNumberOfBytes, 1);
if(iResult == 0)
{
    MessageBox::Show("Problem Sending FIRE2 configuration");
    return;
}
SFIRE2Settings = new Fire2ReadSettings();
int iNumberOfBytes;
int iResult;

//################################
//Fire2ReadSettings struct is read
//and changed as needed before
//Setting the new values
//################################

iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(Fire2ReadSettings);
iResult = icsNeoDll.icsneoSetFIRE2Settings(m_hObject, ref Fire2ReadSettings , iNumberOfBytes, 1);

if(iResult == 0)
{
    MessageBox.Show("Problem Sending FIRE2 configuration");
    return;
}
Dim Fire2ReadSettings As SFIRE2Settings
Dim iNumberOfBytes As Integer
Dim iResult As Integer

'//################################
'//Fire2ReadSettings struct is read
'//and changed as needed before
'//Setting the new values
'//################################

iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(Fire2ReadSettings)
iResult = icsneoSetFIRE2Settings(m_hObject, Fire2ReadSettings , iNumberOfBytes, 1)

If iResult = 0 Then
    MsgBox("Problem Sending FIRE2 configuration")
    Exit Sub
End If
FindDevices
OpenNeoDevice
ClosePort
FreeObject
GetMessages
TxMessages
TxMessagesEx
WaitForRxMessagesWithTimeOut
GetTimeStampForMSG
ISO15765EnableNetworks
ISO15765TxMessage
ICS15765RxMessage
Transmitting Long Messages
GetConfiguration
SendConfiguration
GetFireSettings
SetFireSettings
GetFIRE2Settings
SetFIRE2Settings
GetVCAN3Settings
SetVCAN3Settings
GetVCAN412Settings
SetVCAN412Settings
GetVCANRFSettings
SetVCANRFSettings
GetRADGalaxySettings
SetRADGalaxySettings
SetBitRate
GetHWFirmwareInfo
GetDLLFirmwareInfo
ForceFirmwareUpdate
GetDeviceParameters
SetDeviceParameters
SetReflashDisplayCallbacks
ClearReflashDisplayCallbacks
GetRTC
SetRTC
GetLastAPIError
GetErrorMessages
GetErrorInfo
ValidateHObject
GetDLLVersion
StartSockServer
StopSockServer
GetPerformanceParameters
ScriptStart
ScriptStop
ScriptLoad
ScriptClear
ScriptStartFBlock
ScriptGetFBlockStatus
ScriptStopFBlock
ScriptGetScriptStatus
ScriptReadAppSignal
ScriptWriteAppSignal
OpenPortEx
OpenNeoDevice
OpenNeoDevice
EnableNetworkCom
FindAllUSBDevices
GetFireSettings
SetFireSettings
OpenNeoDevice
GetLastAPIError
stCM_ISO15765_RxMessage
NetworkID List
stCM_ISO15765_TxMessage
OpenNeoDevice
GetConfiguration
GetLastAPIError
OpenNeoDevice
SFireSettings
SFireSettings
GetLastAPIError
SFireSettings
SetFireSettings
OpenNeoDevice
SFIRE2Settings
SFIRE2Settings
GetLastAPIError
SFIRE2Settings
SetFIRE2Settings
OpenNeoDevice
SFIRE2Settings
SFIRE2Settings
GetLastAPIError
SFIRE2Settings
GetFIRE2Settings

SetVCAN3Settings Method - neoVI API

This method reads the configuration settings from a ValueCAN3 device.

int _stdcall icsneoSetVCAN3Settings(void * hObject, SVCAN3Settings *pSettings, int iNumBytes, int bSaveToEEPROM);
Public Declare Function icsneoSetVCAN3Settings Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pSettings As SVCAN3Settings, ByVal iNumBytes As Int32, ByVal bSaveToEEPROM As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoSetVCAN3Settings(IntPtr hObject, ref SVCAN3Settings pSettings, Int32 iNumBytes, Int32 bSaveToEEPROM);

Parameters

hObject

pSettings

iNumBytes

bSaveToEEPROM

[in] If set to 0, the settings changes will revert to the values stored in EEPROM when the ValueCAN3 is power-cycled. If set to 1, the values will overwrite the EEPROM settings and become persistent across power-cycles of the ValueCAN3.

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

Examples

SVCAN3Settings VCANReadSettings;
int iNumberOfBytes;
int iResult;

//################################
//VCANReadSettings struct is read
//and changed as needed before
//Setting the new values
//################################

iNumberOfBytes=sizeof(VCANReadSettings );
iResult = icsneoSetVCAN3Settings(m_hObject, &VCANReadSettings , iNumberOfBytes, 1);
if(iResult == 0)
{
    MessageBox::Show("Problem Sending VCAN configuration");
    return;
}
SVCAN3Settings VCANReadSettings = new VCANReadSettings();
int iNumberOfBytes;
int iResult;

//################################
//VCANReadSettings struct is read
//and changed as needed before
//Setting the new values
//################################

iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(VCANReadSettings);
iResult = icsNeoDll.icsneoSetVCAN3Settings(m_hObject, ref VCANReadSettings , iNumberOfBytes, 1);

if(iResult == 0)
{
    MessageBox.Show("Problem Sending VCAN configuration");
    return;
}
Dim VCANReadSettings As SVCAN3Settings
Dim iNumberOfBytes As Integer
Dim iResult As Integer

'//################################
'//VCANReadSettings struct is read
'//and changed as needed before
'//Setting the new values
'//################################

iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(VCANReadSettings)
iResult = icsneoSetVCAN3Settings(m_hObject, VCANReadSettings , iNumberOfBytes, 1)

If iResult = 0 Then
    MsgBox("Problem Sending VCAN configuration")
    Exit Sub
End If

GetVCAN3Settings Method - neoVI API

This method reads the configuration settings from a ValueCAN3 device.

int _stdcall icsneoGetVCAN3Settings(void * hObject, SVCAN3Settings *pSettings, int iNumBytes);
Public Declare Function icsneoGetVCAN3Settings Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pSettings As SVCAN3Settings, ByVal iNumBytes As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoGetVCAN3Settings(IntPtr hObject, ref SVCAN3Settings pSettings, Int32 iNumBytes);

Parameters

hObject

pSettings

iNumBytes

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

Examples

SVCAN3Settings VcanReadSettings;
int iNumberOfBytes;
int iResult;

//Get the settings
iNumberOfBytes=sizeof(VcanReadSettings );
iResult = icsneoGetVCAN3Settings(m_hObject, &VcanReadSettings , iNumberOfBytes);
if(iResult == 0)
{
    MessageBox::Show("Problem reading VCAN configuration");
    return;
}
//Declared at form level and previously open with a call to OpenNeoDevice
IntPtr m_hObject; //handle for device,
SVCAN3Settings VcanReadSettings = new SVCAN3Settings();
int iNumberOfBytes;
int iResult;

//Get the settings
iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(VcanReadSettings);
iResult = icsNeoDll.icsneoGetVCAN3Settings(m_hObject,ref VcanReadSettings , iNumberOfBytes);
if (iResult == 0)
{
    MessageBox.Show("Problem reading VCAN configuration");
    return;
}
Private m_hObject As IntPtr '// Declared at form level and previously open with a call to OpenNeoDevice

Dim VcanReadSettings As SVCAN3Settings
Dim iNumberOfBytes As Integer
Dim iResult As Integer

'//Get the settings
iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(VcanReadSettings)
iResult = icsneoGetVCAN3Settings(m_hObject, VcanReadSettings , iNumberOfBytes)
If iResult = 0 Then
    MsgBox("Problem reading VCAN configuration")
    Exit Sub
End If

ValueCAN 4-1 and 4-2 - neoVI API

SetVCAN412Settings Method - neoVI API

This method writes configuration settings to a ValueCAN4-1 and ValueCAN4-2 device.

int _stdcall icsneoSetVCAN412Settings(void * hObject, SVCAN412Settings *pSettings, int iNumBytes, int bSaveToEEPROM);
Public Declare Function icsneoSetVCAN412Settings Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pSettings As SVCAN412Settings, ByVal iNumBytes As Int32, ByVal bSaveToEEPROM As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoSetVCAN412Settings(IntPtr hObject, ref SVCAN412Settings pSettings, Int32 iNumBytes, Int32 bSaveToEEPROM);

Parameters

hObject

pSettings

iNumBytes

bSaveToEEPROM

[in] If set to 0, the settings changes will revert to the values stored in EEPROM when the ValueCAN3 is power-cycled. If set to 1, the values will overwrite the EEPROM settings and become persistent across power-cycles of the ValueCAN4-1 and ValueCAN4-2.

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

Examples

SVCAN412Settings VCANReadSettings;
int iNumberOfBytes;
int iResult;

//################################
//VCANReadSettings struct is read
//and changed as needed before
//Setting the new values
//################################

iNumberOfBytes=sizeof(VCANReadSettings );
iResult = icsneoSetVCAN412Settings(m_hObject, &VCANReadSettings , iNumberOfBytes, 1);
if(iResult == 0)
{
    MessageBox::Show("Problem Sending VCAN configuration");
    return;
}
SVCAN412Settings VCANReadSettings = new VCANReadSettings();
int iNumberOfBytes;
int iResult;

//################################
//VCANReadSettings struct is read
//and changed as needed before
//Setting the new values
//################################

iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(VCANReadSettings);
iResult = icsNeoDll.icsneoSetVCAN412Settings(m_hObject, ref VCANReadSettings , iNumberOfBytes, 1);

if(iResult == 0)
{
    MessageBox.Show("Problem Sending VCAN configuration");
    return;
}
Dim VCANReadSettings As SVCAN412Settings
Dim iNumberOfBytes As Integer
Dim iResult As IntPtr

'//################################
'//VCANReadSettings struct is read
'//and changed as needed before
'//Setting the new values
'//################################

iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(VCANReadSettings)
iResult = icsneoSetVCAN412Settings(m_hObject, VCANReadSettings , iNumberOfBytes, 1)

If iResult = 0 Then
    MsgBox("Problem Sending VCAN configuration")
    Exit Sub
End If

ValueCAN 4-4 - neoVI API

GetVCAN412Settings Method - neoVI API

This method reads the configuration settings from a ValueCAN4-1 and ValueCAN4-2 device.

Parameters

hObject

pSettings

iNumBytes

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

Examples

SetFireSettings Method - neoVI API

This method writes configuration settings to a neoVI Fire device.

Parameters

hObject

pSettings

iNumBytes

bSaveToEEPROM

[in] If set to 0, the settings changes will revert to the values stored in EEPROM when the neoVI is power-cycled. If set to 1, the values will overwrite the EEPROM settings and become persistent across power-cycles of the neoVI.

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

Examples

Gets device and network parameters for a neoVI Fire device

Sets device and network parameters for a neoVI Fire device

Gets device and network parameters for a ValueCAN3 device

Sets device and network parameters for a ValueCAN3 device

Set the baud or bit rate for a specific neoVI network

Gets the firmware version of a neoVI device

Gets the firmware version stored in the DLL API

Forces the firmware to updated on a neoVI device

Gets individual parameters for a neoVI device

Sets individual parameters for a neoVI device

Sets callback function pointers for use when flashing a neoVI

Clears callback function pointers for flashing a neoVI

Gets the current real-time clock value from a connect neoVI device

Sets the current real-time clock value in a connected neoVI device

Gets device and network parameters for a neoVI FIRE 2 device

Sets device and network parameters for a neoVI FIRE 2 device

Gets device and network parameters for a ValueCAN3 device

Sets device and network parameters for a ValueCAN3 device

[in] Specifies the driver object created by .

[in] The address of an allocated structure.

[in] This value is always the size, in bytes, of the structure.

Returns 1 if successful, 0 if an error occurred. must be called to obtain the specific error. The errors that can be generated by this function are:

Before using this function, the structure must be initialized with the current neoVI settings using .

[in] Specifies the driver object created by .

[out] Pointer to a structure.

[in] This value is always the size, in bytes, of the structure.

Returns 1 if successful, 0 if an error occurred. must be called to obtain the specific error. The errors that can be generated by this function are:

After getting the current settings, you may change the parameters defined in the structure and write the settings back to the ValueCAN3 using .

Name
Description

Gets device and network parameters for a ValueCAN 4-1 and 4-2 device

Sets device and network parameters for a ValueCAN 4-1 and 4-2 device

[in] Specifies the driver object created by .

[in] The address of an allocated structure.

[in] This value is always the size, in bytes, of the structure.

Returns 1 if successful, 0 if an error occurred. must be called to obtain the specific error. The errors that can be generated by this function are:

Before using this function, the structure must be initialized with the current neoVI settings using .

Name
Description

Gets device and network parameters for a ValueCAN 4-4 device

Sets device and network parameters for a ValueCAN 4-4 device

[in] Specifies the driver object created by .

[out] Pointer to a structure.

[in] This value is always the size, in bytes, of the structure.

Returns 1 if successful, 0 if an error occurred. must be called to obtain the specific error. The errors that can be generated by this function are:

After getting the current settings, you may change the parameters defined in the structure and write the settings back to the ValueCAN 4-1 and ValueCAN 4-2 using .

[in] Specifies the driver object created by .

[out] Pointer to an structure.

[in] This value is always the size, in bytes, of the structure.

Returns 1 if successful, 0 if an error occurred. must be called to obtain the specific error. The errors that can be generated by this function are:

Before using this function, the structure must be initialized with the current neoVI settings using .

GetFireSettings
SetFireSettings
GetVCAN3Settings
SetVCAN3Settings
SetBitRate
GetHWFirmwareInfo
GetDLLFirmwareInfo
ForceFirmwareUpdate
GetDeviceParameters
SetDeviceParameters
SetReflashDisplayCallbacks
ClearReflashDisplayCallbacks
GetRTC
SetRTC
GetFIRE2Settings
SetFIRE2Settings
GetVCAN3Settings
SetVCAN3Settings
OpenNeoDevice
SVCAN3Settings
SVCAN3Settings
GetLastAPIError
SVCAN3Settings
GetVCAN3Settings
OpenNeoDevice
SVCAN3Settings
SVCAN3Settings
GetLastAPIError
SVCAN3Settings
SetVCAN3Settings
OpenNeoDevice
SVCAN412Settings
SVCAN412Settings
GetLastAPIError
SVCAN412Settings
GetVCAN412Settings
int _stdcall icsneoGetVCAN412Settings(void * hObject, SVCAN412Settings *pSettings, int iNumBytes);
Public Declare Function icsneoGetVCAN412Settings Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pSettings As SVCAN412Settings, ByVal iNumBytes As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoGetVCAN412Settings(IntPtr hObject, ref SVCAN412Settings pSettings, Int32 iNumBytes);
SVCAN412Settings VcanReadSettings;
int iNumberOfBytes;
int iResult;

//Get the settings
iNumberOfBytes=sizeof(VcanReadSettings );
iResult = icsneoGetVCAN412Settings(m_hObject, &VcanReadSettings , iNumberOfBytes);
if(iResult == 0)
{
    MessageBox::Show("Problem reading configuration");
    return;
}
//Declared at form level and previously open with a call to OpenNeoDevice
IntPtr m_hObject; //handle for device,
SVCAN412Settings VcanReadSettings = new SVCAN412Settings();
int iNumberOfBytes;
int iResult;

//Get the settings
iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(VcanReadSettings);
iResult = icsNeoDll.icsneoGetVCAN412Settings(m_hObject,ref VcanReadSettings , iNumberOfBytes);
if (iResult == 0)
{
    MessageBox.Show("Problem reading configuration");
    return;
}
Private m_hObject As IntPtr '// Declared at form level and previously open with a call to OpenNeoDevice

Dim VcanReadSettings As SVCAN412Settings
Dim iNumberOfBytes As Integer
Dim iResult As Integer

'//Get the settings
iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(VcanReadSettings)
iResult = icsneoGetVCAN412Settings(m_hObject, VcanReadSettings , iNumberOfBytes)
If iResult = 0 Then
    MsgBox("Problem reading configuration")
    Exit Sub
End If
int _stdcall icsneoSetFireSettings(void * hObject, SFireSettings *pSettings, int iNumBytes, int bSaveToEEPROM);
Public Declare Function icsneoSetFireSettings Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pSettings As SFireSettings , ByVal iNumBytes As Int32, ByVal bSaveToEEPROM As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoSetFireSettings(IntPtr hObject, ref SFireSettings pSettings, Int32 iNumBytes, Int32 bSaveToEEPROM);
SFireSettings FireReadSettings;
int iNumberOfBytes;
int iResult;

//################################
//FireReadSettings struct is read
//and changed as needed before
//Setting the new values
//################################

iNumberOfBytes=sizeof(SFireSettings);
iResult = icsneoSetFireSettings(m_hObject, &FireReadSettings, iNumberOfBytes, 1);
if(iResult == 0)
{
    MessageBox::Show("Problem Sending FIRE configuration");
    return;
}
SFireSettings FireReadSettings = new SFireSettings();
int iNumberOfBytes;
int iResult;

//################################
//FireReadSettings struct is read
//and changed as needed before
//Setting the new values
//################################

iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(VcanReadSettings);
iResult = icsNeoDll.icsneoSetFireSettings(m_hObject, ref FireReadSettings, iNumberOfBytes, 1);
if(iResult == 0)
{
    MessageBox.Show("Problem Sending FIRE configuration");
    return;
}
Dim FireReadSettings As SFireSettings
Dim iNumberOfBytes As Integer
Dim iResult As Integer

'//################################
'//FireReadSettings struct is read
'//and changed as needed before
'//Setting the new values
'//################################

iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(VcanReadSettings)
iResult = icsneoSetFireSettings(m_hObject, FireReadSettings, iNumberOfBytes, 1)
If iResult = 0 Then
    MsgBox("Problem Sending FIRE configuration")
    Exit Sub
End If
GetVCAN412Settings
SetVCAN412Settings
GetVCAN4Settings
SetVCAN4Settings
OpenNeoDevice
SVCAN412Settings
SVCAN412Settings
GetLastAPIError
SVCAN412Settings
SetVCAN412Settings
OpenNeoDevice
SFireSettings
SFireSettings
GetLastAPIError
SFireSettings
GetFireSettings

ValueCAN RF - neoVI API

GetVCAN4Settings Method - neoVI API

This method reads the configuration settings from a ValueCAN4-4 device.

int _stdcall icsneoGetVCAN4Settings(void * hObject, SVCAN4Settings *pSettings, int iNumBytes);
Public Declare Function icsneoGetVCAN4Settings Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pSettings As SVCAN4Settings, ByVal iNumBytes As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoGetVCAN4Settings(IntPtr hObject, ref SVCAN4Settings pSettings, Int32 iNumBytes);

Parameters

Return Values

Remarks

Examples

SVCAN4Settings VcanReadSettings;
int iNumberOfBytes;
int iResult;

//Get the settings
iNumberOfBytes=sizeof(VcanReadSettings );
iResult = icsneoGetVCAN4Settings(m_hObject, &VcanReadSettings , iNumberOfBytes);
if(iResult == 0)
{
    MessageBox::Show("Problem reading configuration");
    return;
}
//Declared at form level and previously open with a call to OpenNeoDevice
IntPtr m_hObject; //handle for device,
SVCAN4Settings VcanReadSettings = new SVCAN4Settings();
int iNumberOfBytes;
int iResult;

//Get the settings
iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(VcanReadSettings);
iResult = icsNeoDll.icsneoGetVCAN4Settings(m_hObject,ref VcanReadSettings , iNumberOfBytes);
if (iResult == 0)
{
    MessageBox.Show("Problem reading configuration");
    return;
}
Private m_hObject As IntPtr '// Declared at form level and previously open with a call to OpenNeoDevice

Dim VcanReadSettings As SVCAN4Settings
Dim iNumberOfBytes As Integer
Dim iResult As Integer

'//Get the settings
iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(VcanReadSettings)
iResult = icsneoGetVCAN4Settings(m_hObject, VcanReadSettings , iNumberOfBytes)
If iResult = 0 Then
    MsgBox("Problem reading configuration")
    Exit Sub
End If

SetVCAN4Settings Method - neoVI API

This method writes configuration settings to a ValueCAN4-4 device.

int _stdcall icsneoSetVCAN4Settings(void * hObject, SVCAN4Settings *pSettings, int iNumBytes, int bSaveToEEPROM);
Public Declare Function icsneoSetVCAN4Settings Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pSettings As SVCAN4Settings, ByVal iNumBytes As Int32, ByVal bSaveToEEPROM As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoSetVCAN4Settings(IntPtr hObject, ref SVCAN4Settings pSettings, Int32 iNumBytes, Int32 bSaveToEEPROM);

Parameters

hObject

pSettings

iNumBytes

bSaveToEEPROM

[in] If set to 0, the settings changes will revert to the values stored in EEPROM when the ValueCAN3 is power-cycled. If set to 1, the values will overwrite the EEPROM settings and become persistent across power-cycles of the ValueCAN4-4.

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

Examples

SVCAN4Settings VCANReadSettings;
int iNumberOfBytes;
int iResult;

//################################
//VCANReadSettings struct is read
//and changed as needed before
//Setting the new values
//################################

iNumberOfBytes=sizeof(VCANReadSettings );
iResult = icsneoSetVCAN4Settings(m_hObject, &VCANReadSettings , iNumberOfBytes, 1);
if(iResult == 0)
{
    MessageBox::Show("Problem Sending VCAN configuration");
    return;
}
SVCAN4Settings VCANReadSettings = new SVCAN4Settings();
int iNumberOfBytes;
int iResult;

//################################
//VCANReadSettings struct is read
//and changed as needed before
//Setting the new values
//################################

iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(VCANReadSettings);
iResult = icsNeoDll.icsneoSetVCAN4Settings(m_hObject, ref VCANReadSettings , iNumberOfBytes, 1);

if(iResult == 0)
{
    MessageBox.Show("Problem Sending VCAN configuration");
    return;
}
Dim VCANReadSettings As SVCAN4Settings
Dim iNumberOfBytes As Integer
Dim iResult As Integer

'//################################
'//VCANReadSettings struct is read
'//and changed as needed before
'//Setting the new values
'//################################

iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(VCANReadSettings)
iResult = icsneoSetVCAN4Settings(m_hObject, VCANReadSettings , iNumberOfBytes, 1)

If iResult = 0 Then
    MsgBox("Problem Sending VCAN configuration")
    Exit Sub
End If

SetVCANRFSettings Method - neoVI API

int _stdcall icsneoSetVCANRFSettings(void * hObject, SVCANRFSettings *pSettings, int iNumBytes, int bSaveToEEPROM);
Public Declare Function icsneoSetVCANRFSettings Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pSettings As SVCANRFSettings, ByVal iNumBytes As Int32, ByVal bSaveToEEPROM As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoSetVCANRFSettings(IntPtr hObject, ref SVCANRFSettings pSettings, Int32 iNumBytes, Int32 bSaveToEEPROM);

Parameters

hObject

pSettings

iNumBytes

bSaveToEEPROM

[in] If set to 0, the settings changes will revert to the values stored in EEPROM when the ValueCAN RF is power-cycled. If set to 1, the values will overwrite the EEPROM settings and become persistent across power-cycles of the ValueCAN RF.

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

Examples

SVCANRFSettings VCANReadSettings;
int iNumberOfBytes;
int iResult;

//################################
//VCANReadSettings struct is read
//and changed as needed before
//Setting the new values
//################################

iNumberOfBytes=sizeof(VCANReadSettings );
iResult = icsneoSetVCANRFSettings(m_hObject, &VCANReadSettings , iNumberOfBytes, 1);
if(iResult == 0)
{
    MessageBox::Show("Problem Sending VCAN configuration");
    return;
}
SVCANRFSettings VCANReadSettings = new VCANReadSettings();
int iNumberOfBytes;
int iResult;

//################################
//VCANReadSettings struct is read
//and changed as needed before
//Setting the new values
//################################

iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(VCANReadSettings);
iResult = icsNeoDll.icsneoSetVCANRFSettings(m_hObject, ref VCANReadSettings , iNumberOfBytes, 1);

if(iResult == 0)
{
    MessageBox.Show("Problem Sending VCAN configuration");
    return;
}
Dim VCANReadSettings As SVCANRFSettings
Dim iNumberOfBytes As Integer
Dim iResult As Integer

'//################################
'//VCANReadSettings struct is read
'//and changed as needed before
'//Setting the new values
'//################################

iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(VCANReadSettings)
iResult = icsneoSetVCANRFSettings(m_hObject, VCANReadSettings , iNumberOfBytes, 1)

If iResult = 0 Then
    MsgBox("Problem Sending VCAN configuration")
    Exit Sub
End If

GetVCANRFSettings Method - neoVI API

This method reads the configuration settings from a ValueCAN RF device.

int _stdcall icsneoGetVCANRFSettings(void * hObject, SVCANRFSettings *pSettings, int iNumBytes);
Public Declare Function icsneoGetVCANRFSettings Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pSettings As SVCANRFSettings, ByVal iNumBytes As Int32) As Int32e
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoGetVCANRFSettings(IntPtr hObject, ref SVCANRFSettings pSettings, Int32 iNumBytes);

Parameters

hObject

pSettings

iNumBytes

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

Examples

SVCANRFSettings VcanReadSettings;
int iNumberOfBytes;
int iResult;

//Get the settings
iNumberOfBytes=sizeof(VcanReadSettings );
iResult = icsneoGetVCANRFSettings(m_hObject, &VcanReadSettings , iNumberOfBytes);
if(iResult == 0)
{
    MessageBox::Show("Problem reading VCAN configuration");
    return;
}
//Declared at form level and previously open with a call to OpenNeoDevice
IntPtr m_hObject; //handle for device,
SVCANRFSettings VcanReadSettings = new SVCANRFSettings();
int iNumberOfBytes;
int iResult;

//Get the settings
iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(VcanReadSettings);
iResult = icsNeoDll.icsneoGetVCANRFSettings(m_hObject,ref VcanReadSettings , iNumberOfBytes);
if (iResult == 0)
{
    MessageBox.Show("Problem reading VCAN configuration");
    return;
}
Private m_hObject As IntPtr '// Declared at form level and previously open with a call to OpenNeoDevice

Dim VcanReadSettings As SVCANRFSettings
Dim iNumberOfBytes As Integer
Dim iResult As Integer

'//Get the settings
iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(VcanReadSettings)
iResult = icsneoGetVCANRFSettings(m_hObject, VcanReadSettings , iNumberOfBytes)
If iResult = 0 Then
    MsgBox("Problem reading VCAN configuration")
    Exit Sub
End If

TxMessages Method - neoVI API

This method transmits messages asynchronously to vehicle networks using the neoVI hardware.

int _stdcall icsneoTxMessages(void * hObject, icsSpyMessage *pMsg, int lNetworkID, int lNumMessages);c+
Public Declare Function icsneoTxMessages Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pMsg As icsSpyMessage, ByVal lNetworkID As Int32, ByVal lNumMessages As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoTxMessages(IntPtr hObject, ref icsSpyMessage pMsg, Int32 lNetworkID, Int32 lNumMessages);

Parameters

hObject

pMsg

lNetworkID

lNumMessages

Return Values

NEOVI_ERROR_DLL_ISOTX_DATA_BUFFER_ALLOC = 13

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

NEOVI_ERROR_DLL_ILLEGAL_TX_NETWORK= 90

NEOVI_ERROR_DLL_3G_DEVICE_LICENSE_NEEDS_TO_BE_UPGRADED = 190

Remarks

Transmit Report

You can also identify a particular transmitted message with DescriptionID field. This two byte field (only 14 bits are used) allows the programmer to assign an arbitrary number to a message. This number is then returned in the transmit report.

Examples

void * hObject = 0; // holds a handle to the neoVI object


icsSpyMessage stMsg;
int iResult;

// Load the message to be transmitted ArbID = FF standard data 0x22 0x52 0x12 0x28
stMsg.ArbIDOrHeader = 0xFF;
stMsg.NumberBytesData = 4;
stMsg.Data[0] = 0x22;
stMsg.Data[1] = 0x52;
stMsg.Data[2] = 0x12;
stMsg.Data[3] = 0x28;

// Status Bitfield standard ID no remote frame
stMsg.StatusBitField = 0;
stMsg.StatusBitField2 = 0;


// Transmit the message on high speed can
iResult = icsneoTxMessages(hObject,&stMsg,NETID_HSCAN,1);
if (iResult == 0)
    MessageBox(hWnd,TEXT("Problem Transmitting Messages"),TEXT("neoVI Example"),0);
Dim lResult As Long
Dim stMessagesTx As icsSpyMessage
Dim lNumberBytes As Long
Dim sDataArray(7) As String

sDataArray(0) = txtDataByte1.Text ''Put data from form in
sDataArray(1) = txtDataByte2.Text ''form of Array
sDataArray(2) = txtDataByte3.Text
sDataArray(3) = txtDataByte4.Text

stMessagesTx.ArbIDOrHeader = Val("&H" & txtArbID.Text) ''Set ArbID in structur

stMessagesTx.NumberBytesData = 4 ''Set the number of Data bytes

stMessagesTx.Data1 = Val("&H" & sDataArray(0)) ''Set data bytes in structure
stMessagesTx.Data2 = Val("&H" & sDataArray(1))
stMessagesTx.Data3 = Val("&H" & sDataArray(2))
stMessagesTx.Data4 = Val("&H" & sDataArray(3))

lResult = icsneoTxMessages(m_hObject, stMessagesTx, 1, 1) ''Send message
If Not CBool(lResult) Then ''Check the status of sent message
    MsgBox("Problem Transmitting Message")
End If
int iResult; //Storage for the Result from function call
icsSpyMessage stMessagesTx = new icsSpyMessage(); //Storage for TXMessage


//Set the ArbID information for TX message
stMessagesTx.ArbIDOrHeader = ConvertFromHex(txtArbID.Text);

//Set the number of Data Bytes and set the Data Bytes values
stMessagesTx.NumberBytesData = Convert.ToByte(4);
stMessagesTx.Data1=Convert.ToByte(ConvertFromHex(txtDataByte1.Text));
stMessagesTx.Data2=Convert.ToByte(ConvertFromHex(txtDataByte2.Text));
stMessagesTx.Data3=Convert.ToByte(ConvertFromHex(txtDataByte3.Text));
stMessagesTx.Data4=Convert.ToByte(ConvertFromHex(txtDataByte4.Text));

//Clear the Status BitFields
stMessagesTx.StatusBitField = 0;
stMessagesTx.StatusBitField2 = 0;

//Call the Tx funciton
iResult=icsNeoDll.icsneoTxMessages(m_hObject,ref stMessagesTx,1,0);

if(iResult== 0) //Check the status of the Function Call
{
    MessageBox.Show ("Problem Transmitting Message");
}

RAD Galaxy - neoVI API

GetRADGalaxySettings Method - neoVI API

This method reads the configuration settings from a RAD Galaxy device.

int _stdcall icsneoGetRADGalaxySettings(void * hObject, SRADGalaxySettings *pSettings, int iNumBytes);
Public Declare Function icsneoGetRADGalaxySettings Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pSettings As SRADGalaxySettings, ByVal iNumBytes As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoGetRADGalaxySettings(IntPtr hObject, ref SRADGalaxySettings pSettings, Int32 iNumBytes);

Parameters

hObject

pSettings

iNumBytes

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

Examples

SRADGalaxySettings RadGalaxyReadSettings;
int iNumberOfBytes;
int iResult;

//Get the settings
iNumberOfBytes=sizeof(RadGalaxyReadSettings );
iResult = icsneoGetRADGalaxySettings(m_hObject, &RadGalaxyReadSettings , iNumberOfBytes);
if(iResult == 0)
{
    MessageBox::Show("Problem reading configuration");
    return;
}
//Declared at form level and previously open with a call to OpenNeoDevice
IntPtr m_hObject; //handle for device,
SRADGalaxySettings RadGalaxyReadSettings = new SRADGalaxySettings();
int iNumberOfBytes;
int iResult;

//Get the settings
iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(RadGalaxyReadSettings);
iResult = icsNeoDll.icsneoGetRADGalaxySettings(m_hObject,ref RadGalaxyReadSettings , iNumberOfBytes);
if (iResult == 0)
{
    MessageBox.Show("Problem reading configuration");
    return;
}
Private m_hObject As IntPtr '// Declared at form level and previously open with a call to OpenNeoDevice

Dim RadGalaxyReadSettings As SRADGalaxySettings
Dim iNumberOfBytes As Integer
Dim iResult As Integer

'//Get the settings
iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(RadGalaxyReadSettings)
iResult = icsneoGetRADGalaxySettings(m_hObject, RadGalaxyReadSettings , iNumberOfBytes)
If iResult = 0 Then
    MsgBox("Problem reading configuration")
    Exit Sub
End If
Name
Description

Gets device and network parameters for a ValueCAN RF device

Sets device and network parameters for a ValueCAN RF device

hObject __ [in] Specifies the driver object created by .

pSettings [out] Pointer to a structure.

iNumBytes [in] This value is always the size, in bytes, of the structure.

Returns 1 if successful, 0 if an error occurred. 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

After getting the current settings, you may change the parameters defined in the structure and write the settings back to the ValueCAN 4-4 using .

[in] Specifies the driver object created by .

[in] The address of an allocated structure.

[in] This value is always the size, in bytes, of the structure.

Returns 1 if successful, 0 if an error occurred. must be called to obtain the specific error. The errors that can be generated by this function are:

Before using this function, the structure must be initialized with the current neoVI settings using .

[in] Specifies the driver object created by .

[in] The address of an allocated structure.

[in] This value is always the size, in bytes, of the structure.

Returns 1 if successful, 0 if an error occurred. must be called to obtain the specific error. The errors that can be generated by this function are:

Before using this function, the structure must be initialized with the current neoVI settings using .

[in] Specifies the driver object created by .

[out] Pointer to a structure.

[in] This value is always the size, in bytes, of the structure.

Returns 1 if successful, 0 if an error occurred. must be called to obtain the specific error. The errors that can be generated by this function are:

After getting the current settings, you may change the parameters defined in the structure and write the settings back to the ValueCAN RF using .

[in] Handle which specifies the driver object created by .

[in] This is the address of the first element of an array of structures. This array will be loaded by the application software with messages that are to be transmitted by the hardware.

[in] Specifies the network to transmit the message on. See List for a list of valid Network ID values. Network support varies by neoVI device. NETID_DEVICE transmits on to the neoVI Device Virtual Network (see users manual).

[in] Specifies the number of messages to be transmitted. This parameter should always be set to one unless you are transmitting a long Message. Transmitting long messages on ISO or J1708 is described in a .

Returns 1 if successful, 0 if an error occurred. must be called to obtain the specific error. The errors that can be generated by this function are:

This function call adds a transmit message to the transmit queue. The message will be transmitted when the network is free and all previously transmitted messages have been transmitted. Transmitting long messages which are greater than 12 bytes on ISO or J1708 is described in a .

After the messages has been transmitted there will be a transmit report message returned from the device. The transmit report will be read out with . Any message read which has the SPY_STATUS_TX_MSG (icsSpyStatusTx) bit set in the is a transmit report.

The transmit report does not necessarily mean the message was transmitted successfully. For example, the Ford SCP network will return a Transmit Report if it had tried to send a message. Therefore, the programmer should always check the GlobalError Flag in the .

To transmit different messages, set the appropriate bits in the . For example, there are bits for init waveforms, extended identifiers and remote frames.

Name
Description

Gets device and network parameters for a RAD Galaxy device

Sets device and network parameters for a RAD Galaxy device

[in] Specifies the driver object created by .

[out] Pointer to a structure.

[in] This value is always the size, in bytes, of the structure.

Returns 1 if successful, 0 if an error occurred. must be called to obtain the specific error. The errors that can be generated by this function are:

After getting the current settings, you may change the parameters defined in the structure and write the settings back to the RAD Galaxy using .

OpenNeoDevice
SVCAN4Settings
SVCAN4Settings
GetLastAPIError
SVCAN4Settings
SetVCAN4Settings
OpenNeoDevice
SVCAN4Settings
SVCAN4Settings
GetLastAPIError
SVCAN4Settings
GetVCAN4Settings
OpenNeoDevice
SVCANRFSettings
SVCANRFSettings
GetLastAPIError
SVCANRFSettings
GetVCANRFSettings
OpenNeoDevice
SVCANRFSettings
SVCANRFSettings
GetLastAPIError
SVCANRFSettings
SetVCANRFSettings
OpenNeoDevice
icsSpyMessage
NetworkIDList
different topic
GetLastAPIError
different topic
GetMessages
status bitfield
status bitfield
status bitfields
OpenNeoDevice
SRADGalaxySettings
SRADGalaxySettings
GetLastAPIError
SRADGalaxySettings
SetRADGalaxySettings
GetVCANRFSettings
SetVCANRFSettings
GetRADGalaxySettings
SetRADGalaxySettings

SetBitRate Method - neoVI API

This method sets bit rates for networks on neoVI devices

int _stdcall icsneoSetBitRate(void * hObject, int iBitRate, int iNetworkID);
Public Declare Function icsneoSetBitRate Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByVal BitRate As Int32, ByVal NetworkID As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoSetBitRate(IntPtr hObject, Int32 BitRate, Int32 NetworkID);

Parameters

hObject

iBitRate

[in] Specifies bit rate setting. Valid values depend on the network specified.

For the networks NETID_HSCAN, NETID_MSCAN, NETID_SWCAN, NETID_FIRE_HSCAN2, NETID_HSCAN3, NETID_LSFTCAN, valid bit rates are 2000, 33333, 50000, 62500, 83333, 100000, 125000, 250000, 500000, 800000, 1000000

For the networks NETID_LIN, NETID_ISO2, NETID_FIRE_LIN2, NETID_FIRE_LIN3, NETID_FIRE_LIN4, valid bit rates are

For the network NETID_FIRE_CGI valid bit rates are 625000 and 115200

iNetworkID

[in] Specifies the network. The valid values are:

NETID_HSCAN, NETID_MSCAN, NETID_SWCAN, NETID_FIRE_HSCAN2, NETID_HSCAN3, NETID_LSFTCAN, NETID_LIN, NETID_ISO2, NETID_FIRE_LIN2, NETID_FIRE_LIN3, NETID_FIRE_LIN4, NETID_FIRE_CGI

These values are defined in the icsnVC40.h file

Return Values

NEOVI_ERROR_DLL_INVALID_NETID = 8

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

NEOVI_ERROR_DLL_RED_INVALID_BAUD_SPECIFIED = 122

NEOVI_ERROR_DLL_SEND_DEVICE_CONFIG_ERROR = 229

NEOVI_ERROR_DLL_GET_DEVICE_CONFIG_ERROR = 230

NEOVI_ERROR_DLL_UNKNOWN_NEOVI_TYPE = 231

Remarks

The specified network must exist on the connected neoVI device.

Examples

int iRetVal;

iRetVal = icsneoSetBitrate(hObject,  500000, NETID_HSCAN);
if(iRetVal == 0)
{
    printf("\nFailed to set the bit rate");
}
else
{
    printf("\nSuccessfully set the bit rate");
}
int iResult;

//Set the bit rate
iResult = icsNeoDll.icsneoSetBitRate(m_hObject, 500000, NETID_HSCAN);
if (iResult == 0)
{
    MessageBox.Show("Problem setting bit rate");
}
Dim iResult As Integer
'//Set the bit rate
iResult = icsneoSetBitRate(m_hObject, 500000, NETID_HSCAN)
If (iResult = 0) Then MsgBox("Problem setting bit rate")

GetDeviceSettings Method - neoVI API

This method reads the configuration settings from various devices.

int _stdcall icsneoGetDeviceSettings(void * hObject, SDeviceSettings *pSettings, int iNumBytes, int VnetChan);
Public Declare Function icsneoGetDeviceSettingsLib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pSettings As SDeviceSettings , ByVal iNumBytes As Int32, ByVal VnetChan As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoGetDeviceSettings(IntPtr hObject, rref SDeviceSettings pSettings, Int32 iNumBytes, Int32 VnetChan);

Parameters

hObject

pSettings

iNumBytes

VnetChan

[in] This value is indicates which Vnet to set the settings to. This parameter is intended for neoVI ION and neoVI Plasma which have more than one Vnet Slot. For all other devices set this to 0.

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

Examples

SDeviceSettings DeviceReadSettings;
int iNumberOfBytes;
int iResult;

//Get the settings
iNumberOfBytes=sizeof(DeviceReadSettings);
DeviceReadSettings.DeviceSettingType = DeviceFireSettingsType;
iResult = icsneoGetDeviceSettings(m_hObject, &DeviceReadSettings , iNumberOfBytes, 0);
if(iResult == 0)
{
    MessageBox::Show("Problem reading configuration");
    return;
}
SDeviceSettings DeviceReadSettings = new SDeviceSettings ();
int iNumberOfBytes;
int iResult;

//Get the settings
iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(DeviceReadSettings);
DeviceReadSettings.uiDevice = EDeviceSettingsType.DeviceFireSettingsType;
iResult = icsNeoDll.icsneoGetDeviceSettings(m_hObject,ref DeviceReadSettings, iNumberOfBytes, 0);
if (iResult == 0)
{
    MessageBox.Show("Problem reading configuration");
    return;
}
Dim DeviceReadSettings As SDeviceSettings
Dim iNumberOfBytes As Integer
Dim iResult As Integer

'//Get the settings
iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(DeviceReadSettings)
DeviceReadSettings.uiDevice = EDeviceSettingsType.DeviceFireSettingsType
iResult = icsneoGetDeviceSettings(m_hObject, DeviceReadSettings, iNumberOfBytes, 0)
If iResult = 0 Then
    MsgBox("Problem reading configuration")
    Exit Sub
End If

SetFDBitRate Method - neoVI API

This method sets bit rates for networks on neoVI devices

int _stdcall icsneoSetFDBitRate(void * hObject, int iBitRate, int iNetworkID);
Public Declare Function icsneoSetFDBitRate Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByVal BitRate As Int32, ByVal NetworkID As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoSetFDBitRate(IntPtr hObject, Int32 BitRate, Int32 NetworkID);

Parameters

hObject

iBitRate

[in] Specifies bit rate setting. Valid values depend on the network specified.

For the networks HSCAN, MSCAN, HSCAN2, HSCAN3, HSCAN4, HSCAN5, HSCAN6, and HSCAN7 valid bit rates are 1000000, 2000000, 4000000, 5000000, 8000000,and 10000000

iNetworkID

[in] Specifies the network. The valid values are:

NETID_HSCAN, NETID_MSCAN, NETID_HSCAN2, NETID_HSCAN3, NETID_HSCAN4, NETID_HSCAN5, NETID_HSCAN6, and NETID_HSCAN7

These values are defined in the icsnVC40.h file

Return Values

NEOVI_ERROR_DLL_INVALID_NETID = 8

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

NEOVI_ERROR_DLL_RED_INVALID_BAUD_SPECIFIED = 122

NEOVI_ERROR_DLL_SEND_DEVICE_CONFIG_ERROR = 229

NEOVI_ERROR_DLL_GET_DEVICE_CONFIG_ERROR = 230

NEOVI_ERROR_DLL_UNKNOWN_NEOVI_TYPE = 231

Remarks

The specified network must exist on the connected neoVI device.

Examples

int iRetVal;

iRetVal = icsneoSetFDBitrate(hObject, 5000000, NETID_HSCAN);
if(iRetVal == 0)
{
    printf("\nFailed to set the bit rate");
}
else
{
    printf("\nSuccessfully set the bit rate");
}
int iResult;

//Set the bit rate
iResult = icsNeoDll.icsneoSetFDBitRate(m_hObject, 5000000, NETID_HSCAN);
if (iResult == 0)
{
    MessageBox.Show("Problem setting bit rate");
}
Dim iResult As Integer
'//Set the bit rate
iResult = icsneoSetFDBitRate(m_hObject, 5000000, NETID_HSCAN)
If (iResult = 0) Then MsgBox("Problem setting bit rate")

ForceFirmwareUpdate Method - neoVI API

This method forces the firmware on neoVI device to be updated.

Parameters

hObject

Return Values

int.

Remarks

This method is used to force the firmware on a neoVI device to be updated to the version stored in the DLL API.

Examples

GetHWFirmwareInfo Method - neoVI API

This method returns the firmware version of the open neoVI device.

Parameters

hObject

pInfo

Return Values

Returns 1 if successful, 0 if an error occurred.

Remarks

This method returns the firmware version stored in the open neoVI device.

Examples

General Device Settings - neoVI API

These functions are designed to work for both 2G and 3G devices

GetDLLFirmwareInfo Method - neoVI API

Parameters

hObject

pInfo

Return Values

Returns 1 if successful, 0 if an error occurred.

Remarks

Examples

SetRADGalaxySettings Method - neoVI API

This method reads the configuration settings from a RAD Galaxy device.

Parameters

hObject

pSettings

iNumBytes

bSaveToEEPROM

[in] If set to 0, the settings changes will revert to the values stored in EEPROM when the ValueCAN3 is power-cycled. If set to 1, the values will overwrite the EEPROM settings and become persistent across power-cycles of the ValueCAN3.

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

Examples

SetDeviceSettings Method - neoVI API

This method writes configuration settings to various devices.

Parameters

hObject

pSettings

iNumBytes

bSaveToEEPROM

[in] If set to 0, the settings changes will revert to the values stored in EEPROM when the neoVI FIRE 2 is power-cycled. If set to 1, the values will overwrite the EEPROM settings and become persistent across power-cycles of the neoVI FIRE 2.

VnetChan

[in] This value is indicates which Vnet to set the settings to. This parameter is intended for neoVI ION and neoVI Plasma which have more than one Vnet Slot. For all other devices set this to 0.

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

Examples

[in] Specifies the driver object created by .

1 if the function succeeded. 0 if it failed for any reason. must be called to obtain the specific error. The errors that can be generated by this function are:

[in] Specifies the driver object created by .

[out] Pointer to a structure.

[in] This value is always the size, in bytes, of the structure.

Returns 1 if successful, 0 if an error occurred. must be called to obtain the specific error. The errors that can be generated by this function are:

After getting the current settings, you may change the parameters defined in the structure and write the settings back to the neoVI FIRE 2 using .

[in] Specifies the driver object created by .

1 if the function succeeded. 0 if it failed for any reason. must be called to obtain the specific error. The errors that can be generated by this function are:

[in] Specifies the driver object created by .

[in] Specifies the driver object created by .

[out] Pointer to an structure.

Name
Description

[in] Specifies the driver object created by .

[out] Pointer to an structure.

This method returns the version information for the neoVI firmware stored within the neoVI DLL API. This is the version that will be written to the neoVI device by the method.

[in] Specifies the driver object created by .

[in] The address of an allocated structure.

[in] This value is always the size, in bytes, of the structure.

Returns 1 if successful, 0 if an error occurred. must be called to obtain the specific error. The errors that can be generated by this function are:

Before using this function, the structure must be initialized with the current neoVI settings using .

[in] Specifies the driver object created by .

[in] The address of an allocated structure.

[in] This value is always the size, in bytes, of the structure.

Returns 1 if successful, 0 if an error occurred. must be called to obtain the specific error. The errors that can be generated by this function are:

Before using this function, the structure must be initialized with the current neoVI settings using .

OpenNeoDevice
GetLastAPIError
OpenNeoDevice
SDeviceSettings
SDeviceSettings
GetLastAPIError
SDeviceSettings
SetDeviceSettings
OpenNeoDevice
GetLastAPIError
void _stdcall icsneoForceFirmwareUpdate(void * hObject);
Public Declare Function icsneoForceFirmwareUpdate Lib “icsneo40.dll” (ByVal hObject As IntPtr)
[DllImport(“icsneo40.dll”)] public static extern void icsneoForceFirmwareUpdate(IntPtr hObject);
icsneoForceFirmwareUpdate(hObject);
icsNeoDll.icsneoForceFirmwareUpdate(m_hObject);
Call icsneoForceFirmwareUpdate(m_hObject)
int _stdcall icsneoGetHWFirmwareInfo(void * hObject, stAPIFirmwareInfo *pInfo);
Public Declare Function icsneoGetHWFirmwareInfo Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pInfo As stAPIFirmwareInfo) As Integer
[DllImport(“icsneo40.dll”)] public static extern int icsneoGetHWFirmwareInfo(intPtr hObject, ref stAPIFirmwareInfo pInfo);
stAPIFirmwareInfo FirmwareInfo;
int iResult;

iResult = icsneoGetHWFirmwareInfo(m_hObject, &FirmwareInfo);
if(iResult == 0)
{
    MessageBox::Show("Problem getting the neoVI's firmware information");
    return;
}
stAPIFirmwareInfo FirmwareInfo = new stAPIFirmwareInfo();
int iResult;

iResult = icsNeoDll.icsneoGetHWFirmwareInfo(m_hObject, ref FirmwareInfo);
if(iResult == 0)
{
    MessageBox.Show("Problem getting the neoVI's firmware information");
    return;
}
Dim FirmwareInfo As stAPIFirmwareInfo
Dim iResult As Integer

iResult = icsneoGetHWFirmwareInfo(m_hObject, FirmwareInfo)
If iResult = 0 Then
    MsgBox("Problem getting the neoVI's firmware information")
    Exit Sub
End If
int _stdcall icsneoGetDLLFirmwareInfo(void * hObject, stAPIFirmwareInfo *pInfo);
Public Declare Function icsneoGetDLLFirmwareInfo Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pInfo As stAPIFirmwareInfo) As Integer
[DllImport(“icsneo40.dll”)] public static extern int icsneoGetDLLFirmwareInfo(IntPtr hObject, ref stAPIFirmwareInfo pInfo);
stAPIFirmwareInfo FirmwareInfo;
int iResult;

iResult = icsneoGetDLLFirmwareInfo(m_hObject, &FirmwareInfo);
if(iResult == 0)
{
    MessageBox::Show("Problem getting the version of the firmware stored within the DLL API");
    return;
}
stAPIFirmwareInfo FirmwareInfo = new stAPIFirmwareInfo();
int iResult;

iResult = icsNeoDll.icsneoGetDLLFirmwareInfo(m_hObject, ref FirmwareInfo);
if(iResult == 0)
{
    MessageBox.Show("Problem getting the version of the firmware stored within the DLL API");
    return;
}
Dim FirmwareInfo As stAPIFirmwareInfo
Dim iResult As Integer

iResult = icsneoGetDLLFirmwareInfo(m_hObject, FirmwareInfo)
If iResult = 0 Then
    MsgBox("Problem getting the version of the firmware stored within the DLL API")
    Exit Sub
End If
int _stdcall icsneoSetRADGalaxySettings(void * hObject, SRADGalaxySettings *pSettings, int iNumBytes, int bSaveToEEPROM);
Public Declare Function icsneoSetRADGalaxySettings Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pSettings As SRADGalaxySettings, ByVal iNumBytes As Int32, ByVal bSaveToEEPROM As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoSetRADGalaxySettings(IntPtr hObject, ref SRADGalaxySettings pSettings, Int32 iNumBytes, Int32 bSaveToEEPROM);
SRADGalaxySettings RADGalaxyReadSettings;
int iNumberOfBytes;
int iResult;

iNumberOfBytes=sizeof(RADGalaxyReadSettings );
iResult = icsneoSetRADGalaxySettings(m_hObject, &RADGalaxyReadSettings , iNumberOfBytes, 1);
if(iResult == 0)
{
    MessageBox::Show("Problem Sending configuration");
    return;
}
SRADGalaxySettings RADGalaxyReadSettings = new RADGalaxyReadSettings();
int iNumberOfBytes;
int iResult;

iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(RADGalaxyReadSettings);
iResult = icsNeoDll.icsneoSetRADGalaxySettings(m_hObject, ref RADGalaxyReadSettings , iNumberOfBytes, 1);

if(iResult == 0)
{
    MessageBox.Show("Problem Sending configuration");
    return;
}
Dim RADGalaxyReadSettings As SRADGalaxySettings
Dim iNumberOfBytes As Integer
Dim iResult As Integer

iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(RADGalaxyReadSettings)
iResult = icsneoSetRADGalaxySettings(m_hObject, RADGalaxyReadSettings , iNumberOfBytes, 1)

If iResult = 0 Then
    MsgBox("Problem Sending configuration")
    Exit Sub
End If
int _stdcall icsneoSetDeviceSettings(void * hObject, SDeviceSettings *pSettings, int iNumBytes, int bSaveToEEPROM, int VnetChan);
Public Declare Function icsneoSetDeviceSettings”icsneo40.dll” (ByVal hObject As IntPtr, ByRef pSettings As SDeviceSettings , ByVal iNumBytes As Int32, ByVal bSaveToEEPROM As Int32, ByVal VnetChan As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoSetDeviceSettings(IntPtr hObject, rref SDeviceSettings pSettings, Int32 iNumBytes, Int32 bSaveToEEPROM, Int32 VnetChan);
SDeviceSettings DeviceReadSettings;
int iNumberOfBytes;
int iResult;

//################################
//Read Settings struct first
//and changed as needed before
//Setting the new values
//################################

iNumberOfBytes=sizeof(DeviceReadSettings);
iResult = icsneoSetDeviceSettings(m_hObject, &DeviceReadSettings, iNumberOfBytes, 1, 0);
if(iResult == 0)
{
    MessageBox::Show("Problem Sending Device configuration");
    return;
}
SDeviceSettings DeviceReadSettings = new SDeviceSettings
int iNumberOfBytes;
int iResult;

//################################
//Read Settings struct first
//and changed as needed before
//Setting the new values
//################################

iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(DeviceReadSettings);
DeviceReadSettings.uiDevice = EDeviceSettingsType.DeviceFireSettingsType;
iResult = icsNeoDll.icsneoSetDeviceSettings(m_hObject, ref DevoceReadSettings, iNumberOfBytes, 1, 0);

if(iResult == 0)
{
    MessageBox.Show("Problem Sending Device configuration");
    return;
}
Dim DeviceReadSettings As SDeviceSettings
Dim iNumberOfBytes As Integer
Dim iResult As Integer

'//################################
'//Read Settings struct first
'//and changed as needed before
'//Setting the new values
'//################################

iNumberOfBytes = System.Runtime.InteropServices.Marshal.SizeOf(DeviceReadSettings)
DeviceReadSettings.uiDevice = EDeviceSettingsType.DeviceFireSettingsType
iResult = icsneoSetDeviceSettings(m_hObject, DeviceReadSettings , iNumberOfBytes, 1, 0)

If iResult = 0 Then
    MsgBox("Problem Sending Device configuration")
    Exit Sub
End If
OpenNeoDevice
OpenNeoDevice
stAPIFirmwareInfo
OpenNeoDevice
stAPIFirmwareInfo
ForceFirmwareUpdate
OpenNeoDevice
SRADGalaxySettings
SRADGalaxySettings
GetLastAPIError
SRADGalaxySettings
GetRADGalaxySettings
OpenNeoDevice
SDeviceSettings
SDeviceSettings
GetLastAPIError
SDeviceSettings
GetDeviceSettings

Set the baud or bit rate for a specific neoVI network

Gets the firmware version of a neoVI device

Gets the firmware version stored in the DLL API

Forces the firmware to updated on a neoVI device

Gets individual parameters for a neoVI device

Sets individual parameters for a neoVI device

Sets callback function pointers for use when flashing a neoVI

Clears callback function pointers for flashing a neoVI

SetBitRate
GetHWFirmwareInfo
GetDLLFirmwareInfo
ForceFirmwareUpdate
GetDeviceParameters
SetDeviceParameters
SetReflashDisplayCallbacks
ClearReflashDisplayCallbacks

SetRTC Method - neoVI API

This method sets the value of the real-time clock on a connected neoVI device.

int _stdcall icsneoSetRTC(void * hObject, icsSpyTime *pTime);
Public Declare Function icsneoSetRTC Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pTime As icsSpyTime) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoSetRTC(IntPtr hObject, ref icsSpyTime pTime);

Parameters

hObject

pTime

[in] The address of a icsSpyTime structure. This structure is defined in the file icsSpyDataCommon.h

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

Examples

Error Functions Overview - neoVI API

[in] Specifies the driver object created by .

1 if the function succeeded. 0 if it failed for any reason. must be called to obtain the specific error. The errors that can be generated by this function are:

Name
Description
OpenNeoDevice
GetLastAPIError

ClearReflashDisplayCallbacks Method - neoVI API

This method is used to clear callback functions that were set using the SetReflashDisplayCallback method.

void _stdcall icsneoClearReflashDisplayCallbacks(void);

Parameters

None

Return Values

None

Remarks

Examples

GetRTC Method - neoVI API

This method returns the value of the real-time clock on a connected neoVI device.

Parameters

hObject

pTime

[in] The address of a icsSpyTime structure. This structure is defined in the file icsSpyDataCommon.h

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

Examples

Returns the error generated by the last intrepidcs API call

Returns the intrepidcs API error message queue

Returns a text description of an intrepidcs API error

[in] Specifies the driver object created by .

1 if the function succeeded. 0 if it failed for any reason. must be called to obtain the specific error. The errors that can be generated by this function are:

GetLastAPIError
GetErrorMessages
GetErrorInfo
int _stdcall icsneoGetRTC(void * hObject, icsSpyTime *pTime);
Public Declare Function icsneoGetRTC Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pTime As icsSpyTime) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoGetRTC(IntPtr hObject, ref icsSpyTime pTime);
long lResult;
icsSpyTime icsTime;

//Call for RTC
lResult = icsneoGetRTC(m_hObject, &icsTime);
long lResult;
icsSpyTime icsTime;

//Call for RTC
lResult = icsNeoDll.icsneoGetRTC(m_hObject,ref icsTime);
Dim lResult As Int32
Dim icsTime As New icsSpyTime

'//Call for RTC
lResult = icsneoGetRTC(m_hObject, icsTime)
OpenNeoDevice
GetLastAPIError

GetDeviceParameters Method - neoVI API

This method forces the firmware on neoVI device to be updated.

int _stdcall icsneoGetDeviceParameters(void * hObject, char *pParameters, char *pValues, short ValuesLength);
Public Declare Function icsneoGetDeviceParameters Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pParameters As Byte, ByRef pValues As Byte, ByVal ValuesLength As short) As Integer
[DllImport(“icsneo40.dll”)] public static extern int icsneoGetDeviceParameters(IntPtr hObject, ref byte pParameters, ref byte pValues, short ValuesLength);

Parameters

hObject

pParameters

[in] This is an array containing parameter names. Each parameter is separated by a comma. The parameter names are matched without regard to case. All spaces are ignored. The size of this array must be 1024 bytes or less. The format of the array is:

ParameterName,ParameterName, , …

See examples below on how to build a parameter string.

pValues

[out] This array will contain the values requested in the pParameters array. The values will be separated by comma’s and in the order of the parameter names specified in the pParameters array. If a parameter name is not recognized the word “Error” will be placed in that value’s location. If the pValues array length (specified by the ValuesLength parameter) is not long enough to store all of the values, the retrieval of parameter values will end and only a portion of the values will have be read and stored. The return value of the function, if greater than 0, will indicate the number of values read.

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

It is ineffecient to use this function to read one parameter value at a time. If multiple parameters need to be read, combine them into a long string and call this function once.

Examples

char pGetFireParms[] = "network_enables,can1/Mode,can1/Baudrate";
char Values[500];
int iRetVal;

iRetVal = icsneoGetDeviceParameters(hObject, pGetFireParms, Values, 499);

[in] Specifies the driver object created by .

See for a list of parameter names for each device and supported network.

-1 if there was an error while reading parameter values from the device. A return value greater than 0 indicates the total number of parameters read. A return value of 0 indicates that ValueLength was greater than 1024. must be called to obtain the specific error. The errors that can be generated by this function are:

OpenNeoDevice
Valid Parameters
GetLastAPIError

SetDeviceParameters Method - neoVI API

This method changes neoVI device parameters.

int _stdcall icsneoSetDeviceParameters(void * hObject, char *pParmValue, int *pErrorIndex, int bSaveToEERPROM);
[DllImport(“icsneo40.dll”)] public static extern int icsneoSetDeviceParameters(IntPtr hObject, ref byte pParmValue, ref int pErrorIndex, int bSaveToEEPROM);
Public Declare Function icsneoSetDeviceParameters Lib “icsneo40.dll”(ByVal hObject As IntPtr, ByVal pParmValue As String, ByRef pErrorIndex As Int32, ByVal bSaveToEEPROM As Int32) As Int32

Parameters

hObject

pParmValue

[in] This is an array containing parameter names and values. Each parameter and value is separated by a equal sign, and each parameter/value pairing is separated by a comma. The parameter names are matched without regard to case. All spaces are ignored. The size of this array must be 1024 bytes or less. The format of the array is:

ParameterName=Value,ParameterName=Value, …

See examples below on how to build a parameter/value string.

pErrorIndex

[out] If there are any errors detected within the pParmValue parameter, this value will indicate index of the parameter where the first error was found. The index is zero-based.

bSaveToEEPROM

[in] This value determines if the parameter changes are permanent or will be lost when the device is power-cycled. Set the value to 1 to write the changes to EEPROM, 0 to keep the changes restricted to RAM.

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

It is ineffecient to use this function to write one parameter change at a time. If multiple parameters need to be changed, combine them into a long string and call this function once.

Examples

char SetFireParms[100];
char Values[500];
int iRetVal;
int iErrorIndex;
unsigned short NetworkEnables = 0xFFFF;

sprintf(SetFireParms, "network_enables=%d,can1/Baudrate=9,can1/Mode=0", NetworkEnables);

iRetVal = icsneoSetDeviceParameters(hObject, SetFireParms, &iErrorIndex, 1);
Dim ReturnVal As Int32
Dim Errors As Int32
Dim sCommand As String

sCommand = "network_enables=0"
ReturnVal = icsneoSetDeviceParameters(m_hObject, sCommand, Errors, 0)

[in] Specifies the driver object created by .

See for a list of parameter names for each device and supported network.

1 if the changes are successful. -1 if there was an error while writing the changes to the device. 0 if there is an error detected within the pParmValue array. If the return value is 0, indicating an error, check the pErrorIndex to get the index of the first error detected within the pParmValue array. must be called to obtain the specific error. The errors that can be generated by this function are:

OpenNeoDevice
Valid Parameters
GetLastAPIError

GetErrorInfo Method - neoVI API

This method returns a text description of an neoVI API error number.

int _stdcall icsneoGetErrorInfo(int lErrorNumber, 
            TCHAR *szErrorDescriptionShort,  
            TCHAR  *szErrorDescriptionLong,
            int *lMaxLengthShort,
            int *lMaxLengthLong,
            int *lErrorSeverity,
            int *lRestartNeeded);
Public Declare Function icsneoGetErrorInfo Lib "icsneo40.dll" _
            (ByVal lErrorNumber As Int32, _
            ByVal sErrorDescriptionShort As String, _
            ByVal sErrorDescriptionLong As String, _
            ByRef lMaxLengthShort As Int32, _
            ByRef lMaxLengthLong As Int32, _
            ByRef lErrorSeverity As Int32, _
            ByRef lRestartNeeded As Int32) As Int32
[DllImport("icsneo40.dll")]
public static extern int icsneoGetErrorInfo(int iErrorNumber,
            StringBuilder sErrorDescriptionShort, 
            StringBuilder sErrorDescriptionLong, 
            ref int iMaxLengthShort, 
            ref int iMaxLengthLong, 
            ref int lErrorSeverity , 
            ref int lRestartNeeded);

Parameters

sErrorDescriptionShort [out] This is short description of the error. This parameter should be sized to include up to 255 characters including the NULL terminator.

sErrorDescriptionLong [out] This is longer more detailed description of the error. This parameter should be sized to include up to 255 characters including the NULL terminator. lMaxLengthShort [in] This is the size in characters of the sErrorDescriptionShort array that is being passed in. This value must be 255 or less. lMaxLengthLong [in] This is the size in characters of the sErrorDescriptionLong array that is being passed in. This value must be 255 or less.

lErrorSeverity [out] This indicates the error severity. This is estimated severity for the application and doesn't have significant meaning. See Table 1 below for more information.

lRestartNeeded [out] If 1 it is recommend that the application close communications with the DLL and reopen it.

Return Values

If the error number was found successfully the return value will be non-zero.

Remarks

None.

Table 1 - Descriptions of Error Severity

Error Severity
Description

const unsigned long icsspyErrCritical=0x10;

A critical error which affects operation or accuracy

const unsigned long icsspyErrExclamation=0x30;

An important error which may be critical depending on the application.

const unsigned long icsspyErrInformation=0x40;

An error which probably does not need attention.

const unsigned long icsspyErrQuestion=0x20;

An error which is not understood.

Examples

// Read the errors from the DLL
lResult = icsneoGetErrorMessages(hObject,iErrors,&lNumberOfErrors);

if (lResult == 0)
    MessageBox(hWnd,TEXT("Problem Reading errors"),TEXT("neoVI Example"),0);

// dump the neoVI errors
if (lNumberOfErrors > 0)
{
    for (lCount=0;lCount <lNumberOfErrors;lCount++)
    {

        wsprintf(szOut,TEXT("Error %d - "),iErrors[lCount]);
            OutputDebugString(szOut);
            icsneoGetErrorInfo(iErrors[lCount],szDescriptionShort,szDescriptionLong,
                        &lMaxLengthShort,&lMaxLengthLong,&lErrorSeverity,&lRestartNeeded);

        OutputDebugString(szDescriptionShort);
        OutputDebugString(TEXT("\n"));
    }
}
else
    OutputDebugString(TEXT("No Errors to report\n"));
Public Function icsneoGetDLLErrorInfo(ByVal lErrorNum As Int32, ByRef sErrorShort As String, ByRef sErrorLong As String, ByRef lSeverity As Int32, ByRef bRestart As Int32) As Boolean

Dim lErrorLongLength As Int32
Dim lErrorShortLength As Int32
Dim lRestart As Int32
Dim lResult As Int32

    sErrorLong = New String(Chr(0), 255)
    sErrorShort = New String(Chr(0), 255)
    lErrorLongLength = 255
    lErrorShortLength = 255
    lResult = icsneoGetErrorInfo(lErrorNum, sErrorShort, sErrorLong, lErrorShortLength, lErrorLongLength, lSeverity, lRestart)

    sErrorShort = Left(sErrorShort, lErrorShortLength)
    sErrorLong = Left(sErrorLong, lErrorLongLength)
    bRestart = CBool(lRestart)
    icsneoGetDLLErrorInfo = CBool(lResult)
End Function

**This function reads errors and loads them into a list box**

Private Sub cmdGetErrors_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdGetErrors.Click

Dim lResult As Integer '//Storage for result of Function Call
Dim lErrors(600) As Int32 '//Array for Error information
Dim lNumberOfErrors As Integer '//Storage for Number of Errors
Dim lCount As Integer '//Counter
Dim sErrorShort As String '//String Holding Short Error Name
Dim sErrorLong As String '//String Holding Long Error Name
Dim iSeverity As Int32 '//Storage for Level of error
Dim bRestart As Int32 '//flag for if Restart is required

    '// Read Out the errors
    lResult = icsneoGetErrorMessages(m_hObject, lErrors(0), lNumberOfErrors)
    '// Test the returned result
    If Not CBool(lResult) Then
        MsgBox("Problem Reading Errors")
    Else
        '//List Error information
        lstErrorHolder.Items.Clear()
        For lCount = 1 To lNumberOfErrors
            Call icsneoGetDLLErrorInfo(lErrors(lCount - 1), sErrorShort, sErrorLong, iSeverity, bRestart)
            lstErrorHolder.Items.Add(sErrorShort + " - Description" + _
                    sErrorLong + " - Errornum: " + Convert.ToString(lErrors(lCount - 1)))
        Next lCount
    End If
End Sub
private void cmdGetErrors_Click(object sender, System.EventArgs e)
{
    int iResult = 0; //Storage for Result of Call
    int[] iErrors = new int[600]; //Array for Error Numbers
    int iNumberOfErrors = 0; // Storage for number of errors
    int iCount= 0; //Counter
    int iSeverity =0; //tells the Severity of Error
    int iMaxLengthShort = 0; //Tells Max length of Error String
    int iMaxLengthLong = 0; //Tells Max Length of Error String
    int lRestart = 0; //tells if a restart is needed
    StringBuilder sErrorShort = new StringBuilder(256); //String for Error
    StringBuilder sErrorLong = new StringBuilder(256); //String for Error
    iMaxLengthShort = 1; //Set initial conditions
    iMaxLengthLong = 1; //Set initial conditions
    // Read Out the errors
    iResult = icsNeoDll.icsneoGetErrorMessages(m_hObject,ref iErrors[0],ref iNumberOfErrors);
    // Test the returned result
    if(iResult == 0)
    {
        MessageBox.Show ("Problem Reading Errors");
    }
    else
    {
        if(iNumberOfErrors != 0)
        {
            for(iCount=0;iCount< iNumberOfErrors;iCount++)
            {
                //Get Text Description of the Error
                iResult = icsNeoDll.icsneoGetErrorInfo(iErrors[iCount],
                    sErrorShort, sErrorLong ,ref iMaxLengthShort , ref iMaxLengthLong, ref iSeverity,ref lRestart);
                lstErrorHolder.Items.Add (sErrorShort + " - Description " + sErrorLong + " - Errornum: " + iErrors[iCount]);
            }
        }
    }
}

lErrorNumber [in] This is the number of the error message returned from . A separate topic describes the possible values for .

GetErrorMessages
error messages

General Utility Functions Overview - neoVI API

Name
Description

Used to determine if an hObject reference is valid

Returns DLL version information

Starts the TCP/IP socket server at a specified port.

Stops the TCP/IP socket server

ValidateHObject
GetDLLVersion
StartSockServer
StopSockServer

GetDLLVersion Method - neoVI API

This method returns the software version of the DLL.

int _stdcall icsneoGetDLLVersion();
Public Declare Function icsneoGetDLLVersion Lib “icsneo40.dll” () As Integer
[DllImport(“icsneo40.dll”)] public static extern int icsneoGetDLLVersion();

Parameters

None.

Return Values

This function returns the version number of the API.

Remarks

None.

Examples

char szOut[200];

// get the DLL version and report it
wsprintf(szOut,TEXT("intrepidcs API DLL Version %d\n"), icsneoGetDLLVersion());
MessageBox(hWnd,szOut,TEXT("Message"),MB_ICONINFORMATION);
'// get the DLL version information and place in Button text
Button1.Text = "Version " + Convert.ToString(icsneoGetDLLVersion)
'// get the DLL version information and place in Button text
Button1.Text = "Version " + Convert.ToString(icsNeoDll.icsneoGetDLLVersion());

GetLastAPIError Method - neoVI API

This method returns the error generated by the last API call.

int _stdcall icsneoGetLastAPIError(void * hObject, int *piErrorNumber);
Public Declare Function icsneoGetLastAPIError Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef piErrorNumber As Integer) As Integer
[DllImport(“icsneo40.dll”)] public static extern int icsneoGetLastAPIError(IntPtr hObject, ref int piErrorNumber);

Parameters

hObject

piErrorNumber

Return Values

Remarks

Examples

SetReflashDisplayCallbacks Method - neoVI API

int _stdcall icsneoSetReflashDisplayCallbacks(void (*OnPrompt)(unsigned long), void (*OnReflashUpdate)(const wchar_t *, unsigned long));

Parameters

void (*OnPrompt)(unsigned long)

[in] Specifies a function pointer that will be called when a message must be displayed instructing the user to disconnect and then re-connect the neoVI from the USZB port. The function receives an unsigned long that will contain the serial number of the neoVI device being flash updated. Before returning from this function call the user of the client application must be prompted to unplug the neoVI from the USB port and then re-connect it before continuing. This is to put the USB chip in the neoVI into bootloader mode so that flashing can begin. This function will not be called when flashing a ValueCAN3 device.

void (*OnReflashUpdate)(const wchar_t *, unsigned long)

[in] Specifies a function pointer that will be called when a flashing status message is ready to be displayed. The function recieves a pointer to a wide character string that contains the status message to display. It also receives an unsigned long that contains the percentage complete for the current chip being flashed. The percentage value will reset to 0 for each new chip. For example, the neoVI Fire has four chips to flash while the ValueCAN3 has only two.

Return Values

1 if successful, 0 if either function pointer is NULL.

Remarks

Examples

[in] Specifies the driver object created by .

[out] The value of the error generated by the previous API call will be returned. The text description of the error can then be obtained by calling .

If an error was generated and stored during the last API call then 1 will be returned. 0 will be returned if no error was generated since the port was opened or the last time that was called. The stored error will be cleared after this call. API errors are generated and stored on a ‘per-thread’ basis. The calling thread will only receive errors generated within it’s own context. If a new API error is generated before the previous error has been retrieved, the previous error will be lost. All errors generated can still be retrieved using . However, will return errors generated in all threads, not just the current thread.

This method is used to set ‘call back’ functions that will be called by the neoVI API when flashing a neoVI device with the function. This overrides the Windows dialog box that normally displays the progress of a neoVI flash update. The use of call back functions allows the client application to receive the status messages and display them as desired.

After calling this function you must call the function to cause the neoVI device firmware to be updated. Once the callbacks have been set they are valid and active until the the DLL is unloaded or until the function is called.

OpenNeoDevice
GetErrorInfo
GetLastAPIError
GetErrorMessages
GetErrorMessages
ForceFirmwareUpdate
ForceFirmwareUpdate
ClearReflashDisplayCallbacks

ValidateHObject Method - neoVI API

This method is used to determine if a driver object is valid.

int _stdcall icsneoValidateHObject(void * hObject);
Public Declare Function icsneoValidateHObject Lib “icsneo40.dll” (ByVal hObject As IntPtr) As Integer
[DllImport(“icsneo40.dll”)] public static extern int icsneoValidateHObject(IntPtr hObject);

Parameters

hObject

Return Values

1 if the hObject is valid. 0 if the object is invalid.

Remarks

Examples

if(Convert::ToBoolean(icsneoValidateHObject(m_hObject)))
{
    cmdCheckHardwareHandle->Text = "Good";
}
else
{
    cmdCheckHardwareHandle->Text = "Lost";
}
if (Convert.ToBoolean (icsNeoDll.icsneoValidateHObject(m_hObject)))
{
    cmdCheckHardwareHandle.Text = "Good";
}
else
{
    cmdCheckHardwareHandle.Text = "Lost";
}
If (CBool(icsneoValidateHObject(m_hObject))) Then
    cmdCheckHardwareHandle.Text = "Good"
Else
    cmdCheckHardwareHandle.Text = "Lost"
End If

GetErrorMessages Method - neoVI API

This method reads the neoVI DLL error message queue.

int _stdcall icsneoGetErrorMessages(void * hObject, int *pErrorMsgs, int *pNumberOfErrors);
Public Declare Function icsneoGetErrorMessages Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pErrorMsgs As Int32, ByRef pNumberOfErrors As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoGetErrorMessages(IntPtr hObject, ref Int32 pErrorMsgs, ref Int32 pNumberOfErrors);

Parameters

hObject

pErrorMsgs

pNumberOfErrors

[out] Specifies the number of errors copied into the pErrorMsgs buffer. The maximum value will be 600.

Return Values

Returns 1 if successful, 0 on failure.

Remarks

The error queue will be reset after this method is called.

Examples

int iErrors[599];
int lResult;
int lNumberOfErrors;
TCHAR szOut[200];
long lCount;

// Read the errors from the DLL
lResult = icsneoGetErrorMessages(hObject,iErrors,&lNumberOfErrors);
if (lResult == 0)
    MessageBox(hWnd,TEXT("Problem Reading errors"),TEXT("neoVI Example"),0);

// dump the neoVI errors to the debug window
if(lNumberOfErrors > 0)
{
    for(lCount=0;lCount <lNumberOfErrors; lCount++)
    {
        wsprintf(szOut,TEXT("Error %d\n"),iErrors[lCount]);
        OutputDebugString(szOut);
    }
}
else
    OutputDebugString(TEXT("No Errors to report\n"));
Dim lResult As Integer '//Storage for result of Function Call
Dim lErrors(600) As Integer '//Array for Error information
Dim lNumberOfErrors As Integer '//Storage for Number of Errors

'// Read Out the errors
lResult = icsneoGetErrorMessages(m_hObject, lErrors(0), lNumberOfErrors)

'// Test the returned result
If Not CBool(lResult) Then
    MsgBox("Problem Reading Errors")
End If
int iResult = 0; //Storage for Result of Call
int[] iErrors = new int[600]; //Array for Error Numbers
int iNumberOfErrors = 0; // Storage for number of errors

// Read Out the errors
iResult = icsNeoDll.icsneoGetErrorMessages(m_hObject,ref iErrors[0],ref iNumberOfErrors);

StartSocketServer Method - neoVI API

This method starts the TCP/IP socket server at a specified port.

int _stdcall icsneoStartSockServer(int hObject, int iPort);
Public Declare Function icsneoStartSockServer Lib “icsneo40.dll” (ByVal hObject As Integer, ByVal iPort As Integer) As Integer
[DllImport(“icsneo40.dll”)] public static extern int icsneoStartSockServer(int hObject, int iPort);

Parameters

hObject

iPort

[in] specifies the TCP/IP Port where the server will be established.

Return Values

If the server was started successfully the return value will be non-zero.

Remarks

Examples

icsneoStartSockServer(hObject, iPort);
bStatus = icsneoStartSockServer(m_hObject, iPort)) '// start the socket server
iStatus = icsNeoDll.icsneoStartSockServer(m_hObject, Convert.ToInt32(txtServerPort.Text));

GetPerformanceParameters Method - neoVI API

Parameters

hObject

[in] Specifies the driver object created with the OpenPort method.

iBufferCount

[out] Specifies the driver object created with the OpenPort method.

IBufferMax

[out] Specifies the size of the buffer.

iOverFlowCount

[out] Indicates the the number of overflows that have occurred since the last successful OpenPort method was called.

iReserved1

[out] Reserved. Set to 0.

iReserved2

[out] Reserved. Set to 0.

iReserved3

[out] Reserved. Set to 0.

iReserved4

[out] Reserved. Set to 0.

iReserved5

[out] Reserved. Set to 0.

Return Values

This function returns the 1 when successful. 0 if otherwise.

Remarks

XX.

Examples

[in] Specifies the driver object created by .

A driver object will be invalid if it was never initialized by . Calling will not invalidate a driver object; only will do so.

[in] Specifies the driver object created with .

[out] This is the address of the first element of an array of long variables of at least 600 elements. This array will be loaded with the current error queue. The error queue will contain errors generated by all threads, not just the current thread. A separate topic describes the possible values for . You can get a text description of this error using .

[in] Handle which specifies the driver object created by

This method creates a TCP/IP server in the DLL. This server can be attached to by any TCP/IP clients using the RAW API or using the DLL by specifying TCP/IP with . Only one server is allowed at a time.

OpenNeoDevice
OpenNeoDevice
ClosePort
FreeObject
OpenNeoDevice
error messages
GetErrorInfo
OpenNeoDevice
OpenNeoDevice
int _stdcall icsneoGetPerformanceParameters(void * hObject, int * iBufferCount, int * iBufferMax, int * iOverFlowCount, int * iReserved1, int * iReserved2,int * iReserved3,int * iReserved4,int * iReserved5)
Public Declare Function icsneoGetPerformanceParameters Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef iBufferCount As Integer, ByRef iBufferMax As Integer, ByRef iOverFlowCount As Integer, ByRef iReserved1 As Integer, ByRef iReserved2 As Integer, ByRef iReserved3 As Integer, ByRef iReserved4 As Integer, ByRef iReserved5 As Integer) As Integer
[DllImport(“icsneo40.dll”)] public static extern int icsneoGetPerformanceParameters(IntPtr hObject,ref int iBufferCount, ref int iBufferMax, ref int iOverFlowCount , ref int iReserved1, ref int iReserved2 , ref int iReserved3, ref int iReserved4 ,ref int iReserved5);
icsneoGetPerformanceParameters(m_hObject, &iBufferCount, &iBufferMax, &iOverFlowCount, &iReserved1, &iReserved2, &iReserved3, &iReserved4, &iReserved5);
lResult = icsneoGetPerformanceParameters(m_hObject, iBufferCount, iBufferMax, iOverFlowCount, iReserved1, iReserved2, iReserved3, iReserved4, iReserved5)

If CBool(lResult) Then
    txtBufferCount.Text = iBufferCount
    txtBufferMax.Text = iBufferMax
    txtOverflowCount.Text = iOverFlowCount
End If
lResult = icsNeoDll.icsneoGetPerformanceParameters(m_hObject, ref iBufferCount, ref iBufferMax, ref iOverFlowCount, ref iReserved1, ref iReserved2, ref iReserved3, ref iReserved4, ref iReserved5);

if(lResult=1)
{
    txtBufferCount.Text = Convert.ToString(iBufferCount);
    txtBufferMax.Text = Convert.ToString(iBufferMax);
    txtOverflowCount.Text = Convert.ToString(iOverFlowCount);
}

GetGPTPStatus Method - neoVI API

This method sets bit rates for networks on neoVI devices

int _stdcall icsneoGetGPTPStatus(void * hObject,  GPTPStatus * StatusGPTP);
Public Declare Function icsneoGetGPTPStatus Lib "icsneo40.dll" (ByVal hObject As IntPtr, ByRef StatusGPTP As GPTPStatus) As Int32
[DllImport("icsneo40.dll")]
public static extern Int32 icsneoGetGPTPStatus(IntPtr hObject,ref GPTPStatus StatusGPTP);

Parameters

hObject __ [in] Specifies the driver object created by OpenNeoDevice. gptpStatus [out] The address of a GPTPStatus structure.

Return Values

1 if the function succeeded. 0 if it failed for any reason. GetLastAPIError must be called to obtain the specific error. Failure could include the device not supporting gPTP, or the device supports gPTP but not support icsneoGetGPTPStatus API. Remarks

Rad Galaxy, Rad SuperMoon, Rad Star2, and Rad GigaStar supports icsneoGetGPTPStatus API nEAT, Rad Pluto, Rad Jupiter support gPTP but, does not support this API

Examples

GPTPStatus gptp_status = {};
int iResult; 
iResult = icsneoGetGPTPStatus(m_hObject, &gptp_status);
GPTPStatus gptp_status = new  GPTPStatus();
int iResult;

iResult = icsNeoDll.icsneoGetGPTPStatus(m_hObject,ref gptp_status);
Dim gptp_status As New GPTPStatus
Dim iResult As Int32

iResult = icsneoGetGPTPStatus(m_hObject, gptp_status)

OpenPortEx Hardware Type Information - neoVI API

This topic discusses which port type can be used with what type of hardware.

A required parameter for the OpenPortEx command is the Port type. Each type is and the hardware it supports is listed below.

Port type type
Applicable hardware
Notes

RS232

  • neoVI Blue (USB or RS232 connection)

  • neoVI Pro (USB or RS232 connection)

  • neoVI Green (RS232)

  • ValueCAN

Devices that use a USB connection listed here have a virtual COM port connection to the PC even though it is connected to the USB port on the PC.

USB

  • neoVI Green

These devices use the USB Port type

TCP/IP

  • neoVI Blue

  • neoVI Pro

  • neoVI Green

  • ValueCAN

All ICS devices can be connected via a TCP/IP connection using a second PC as a gateway.

ReadWritePhySettings Method - neoVI API

This method allows reading and writing the PHY settings from/to the hardware.

int _stdcall icsneoReadWritePHYSettings(void * hObject, PhyRegPkt_T *PHYSettings, size_t Size, size_t NumEntries);
Public Declare Function icsneoReadWritePHYSettings Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef PHYSettings As PhyRegPkt_T, ByVal iSize As IntPtr, ByVal NumEntries As IntPtr) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoReadWritePhySettings(IntPtr hObject, ref PhyRegPkt_T PHYSettings, IntPtr iSize, IntPtr NumEntries);

Parameters

hObject

PHYSettings

iSize

iNumEntries

[in] Specifies the number of PHY Entries to be read or written.

Return Values

Remarks

This function call sends the PHY Entries to be read or written from/to the hardware.

Examples

PhySettings.clause22.phyAddrOrPort = 0x6;
PhySettings.clause.regAddr = 0x2;
PhySettings.clause.pageOrDevice = 1;
PhySettings.WriteEnable = 0;
PhySettings.Enabled = 1; //if not enabled, this entry of read/write operation will be ignored even if it is passed in.
PhySettings.Clause45Enable = 0; //Set this to 1 if the application is sending Clause45 type of Entries.

icsneoReadWritePHYSettings(handle, &PhySettings, sizeof(PhyRegPkt_t), 1);
Int32 iResult;
PhyRegPkt_t PhyRegPkt;
int iTempFlags = 0;

//Copy data to the structure
PhyRegPkt.ClausePkt.phyAddrOrPort = 6;
PhyRegPkt.ClausePkt.pageOrDevice = 1;
PhyRegPkt.ClausePkt.regAddr = 2;
PhyRegPkt.ClausePkt.regVal = 0;

//Set for Reading using Clause45 and Enabled
iTempFlags = iTempFlags | (int)PhyRegFlags.Enabled;
iTempFlags = iTempFlags | (int)PhyRegFlags.Clause45Enable;
PhyRegPkt.Flags = (ushort)iTempFlags;

//Get and cast the size of the structrue.
iResult = icsNeoDll.icsneoReadWritePHYSettings(m_hObject, ref PhyRegPkt, (IntPtr)System.Runtime.InteropServices.Marshal.SizeOf(PhyRegPkt), (IntPtr)1);
System.Diagnostics.Debug.WriteLine(Convert.ToString(PhyRegPkt.ClausePkt.regVal));
Dim iResult As Int32
Dim PhyRegPkt As PhyRegPkt_t
Dim iTempFlags As Int32 = 0
Dim iParamCount As IntPtr = CType(1, IntPtr)

'//Copy data to the structure
PhyRegPkt.ClausePkt.phyAddrOrPort = 6
PhyRegPkt.ClausePkt.pageOrDevice = 1
PhyRegPkt.ClausePkt.regAddr = 3
PhyRegPkt.ClausePkt.regVal = 0

'//Set for Reading using Clause45 and Enabled
iTempFlags = iTempFlags Or PhyRegFlags.Enabled
iTempFlags = iTempFlags Or PhyRegFlags.Clause45Enable
PhyRegPkt.Flags = CUShort(iTempFlags)

'//Get and cast the size of the structrue.
Dim PhyRegSize As IntPtr = CType(System.Runtime.InteropServices.Marshal.SizeOf(PhyRegPkt), IntPtr)
iResult = icsneoReadWritePHYSettings(m_hObject, PhyRegPkt, PhyRegSize, iParamCount)
Debug.Print(CStr(PhyRegPkt.ClausePkt.regVal))

StopSocketServer Method - neoVI API

This method starts the TCP/IP socket server at a specified port.

int _stdcall icsneoStopSockServer(int hObject);
Public Declare Function icsneoStopSockServer Lib “icsneo40.dll” (ByVal hObject As Integer) As Integer
[DllImport(“icsneo40.dll”)] public static extern int icsneoStopSockServer(int hObject);

Parameters

hObject

Return Values

If the server has been stopped successfully the return value will be 1. If the function fails the return value will be zero.

Remarks

Examples

icsneoStopSockServer(hObject);
bStatus = icsneoStopSockServer(m_hObject) '// stop the socket server
iStatus = icsNeoDll.icsneoStopSockServer(m_hObject); // stop the socket server

EnableDOIPLine Method - neoVI API

This method enables or disables the Ethernet activation line on supported hardware devices.

int _stdcall icsneoEnableDOIPLine(void* hObject, bool bActivate);
Public Declare Function icsneoEnableDOIPLine Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByVal bActivate As Boolean) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoEnableDOIPLine(IntPtr hObject, bool bActivate);

Parameters

hObject

bActivate

[in] Specifies the state of the Activation line. True enables the activation and False disabled it.

Return Values

Remarks

The specified hardware must support a DoIP activation line

Examples

int iRetVal;
bool bState;

bState = true;
iRetVal = icsneoEnableDOIPLine(hObject,bState);
if(iRetVal == 0)
{
    printf("\nFailed to set DoIP Act");
}
else
{
    printf("\nSuccessfully set DoIP Act");
}
int iResult;
bool bState;

//Set the bit rate
iResult = icsNeoDll.icsneoEnableDOIPLine(m_hObject,bState);
if (iResult == 0)
{
    MessageBox.Show("Problem setting DoIP Act");
}
Dim iResult As Integer
Dim bState As Boolean
'//Set the bit rate
iResult = icsneoEnableDOIPLine(m_hObject,bState)
If (iResult = 0) Then MsgBox("Problem setting DoIP Act")

Deprecated Functions Overview - neoVI API

Error Messages - neoVI API

Table 1 - Error Messages

NEOVI_ERROR_DLL_TX_BUFFER_OVERFLOW =0

The transmit buffer in the DLL has overflowed. This could occur if the USB connection was lost. It also could occur if you transmit more messages than can be sent on the vehicle networks.

NEOVI_ERROR_DLL_ERROR_BUFFER_OVERFLOW =1

This error occurs when the error queue overflows.

NEOVI_ERROR_DLL_USB_SEND_DATA_ERROR =2

This error occurs when there is a problem sending data on USB.

NEOVI_ERROR_DLL_ISO_DATA_BUFFER_ALLOC =3

Internal Driver Error.

NEOVI_ERROR_DLL_ISO_DATA_READ_BUFFER =4

Internal Driver Error.

NEOVI_ERROR_DLL_ISO_DATA_ZERO_PACKETS =5

Internal Driver Error.

NEOVI_ERROR_DLL_RX_MSG_BUFFER_OVERFLOW =6

NEOVI_ERROR_DLL_STOP_ISO_STREAM =7

Internal Driver Error.

NEOVI_ERROR_DLL_INVALID_NETID =8

Internal Driver Error.

NEOVI_ERROR_DLL_PROBLEM_STOPPING_RX_THREAD =9

Internal Driver Error.

NEOVI_ERROR_DLL_PROBLEM_STOPPING_TX_THREAD =10

Internal Driver Error.

NEOVI_ERROR_DLL_MAIN_PIC_BUFFER_OVERFLOW =11

This error occurs if there is an overflow in the neoVI internal buffer.

NEOVI_ERROR_DLL_INVALID_DEVICE_RESPONSE =12

Internal Driver Error.

NEOVI_ERROR_DLL_ISOTX_DATA_BUFFER_ALLOC =13

Internal Driver Error.

NEOVI_ERROR_DLL_RX_CMD_BUFFER_OVERFLOW=14

Internal Driver Error.

NEOVI_ERROR_DLL_RS232_RX_BUFFER_OVERFLOW=15

RS232 Buffer Overflow Error

NEOVI_ERROR_DLL_RS232_ERR_READCOMERR =16

Internal Driver Error.

NEOVI_ERROR_DLL_RS232_ERR_READ=17

Internal Driver Error.

NEOVI_ERROR_DLL_RS232_BUFFER_ALLOC=18

Internal Driver Error.

NEOVI_ERROR_DLL_RS232_TX_BUFFER_OVERFLOW=19

Internal Driver Error.

NEOVI_ERROR_DLL_RS232_MISC_ERROR=20

Internal Driver Error.

NEOVI_ERROR_DLL_RS232_FIND_WRITE=21

Internal Driver Error.

NEOVI_ERROR_DLL_RS232_FIND_BUFFER_ALLOC=22

Internal Driver Error.

NEOVI_ERROR_DLL_RS232_FIND_CLEARCOMM=23

Internal Driver Error.

NEOVI_ERROR_DLL_RS232_FIND_READCOMM=24

Internal Driver Error.

NEOVI_ERROR_DLL_RS232_FIND_TIMEOUT=25

This error occurs if the neoVI DLL could not find the neoVI device on the specified RS232 port.

NEOVI_ERROR_DLL_RS232_ERR_BREAK=26

RS232 Break Error.

NEOVI_ERROR_DLL_RS232_ERR_FRAME=27

RS232 Framing Error.

NEOVI_ERROR_DLL_RS232_ERR_IOE=28

RS232 IOE Error.

NEOVI_ERROR_DLL_RS232_ERR_OVERRUN=29

RS232 Overrun Error.

NEOVI_ERROR_DLL_RS232_ERR_PARITY=30

RS232 Parity Error.

NEOVI_ERROR_DLL_RS232_TXBUFFER_ALLOC=31

Internal Driver Error.

NEOVI_ERROR_DLL_USB_TX_RS232_ERROR=32

Internal Driver Error.

NEOVI_ERROR_DLL_RS232_CREATE_FILE=33

Problem opening RS232 port. This is probably caused by another application using the port or the port not being valid.

NEOVI_ERROR_DLL_RS232_GET_COMM_STATE=34

Internal Driver Error.

NEOVI_ERROR_DLL_RS232_SET_COMM_STATE=35

Internal Driver Error.

NEOVI_ERROR_DLL_RS232_START_COMM_RX_THREAD=36

Internal Driver Error.

NEOVI_ERROR_DLL_RS232_START_COMM_TX_THREAD=37

Internal Driver Error.

NEOVI_ERROR_DLL_SYNC_COUNT_ERR=38

A message rollover timestamp was missed. This is caused if the neoVI device is disconnected or powered down when in RS232 mode. It will also be caused if two neoVI applications open up the same USB port.

NEOVI_ERROR_DLL_RX_MSG_FRAME_ERR=39

A neoVI message packet was not properly formatted.

NEOVI_ERROR_DLL_RX_MSG_FIFO_OVER=40

The internal DLL FIFO used to store data received before parsing has overflowed.

NEOVI_ERROR_DLL_RX_MSG_CHK_SUM_ERR=41

A neoVI message packet was properly formatted but had an incorrect checksum.

NEOVI_ERROR_DLL_PROBLEM_STOPPING_BULKIN_THREAD=42

Internal Driver Error.

NEOVI_ERROR_DLL_BULKIN_ERR_READ=43

Internal Driver Error.

NEOVI_ERROR_DLL_MAIN51_RX_FIFO_OVERFLOW=44

The Rx FIFO used to store network data before it is sent to the PC has overflowed.

NEOVI_ERROR_DLL_MAIN51_TX_FIFO_OVERFLOW=45

Each network has a FIFO on the Main51 controller for transmission. If you send messages to neoVI faster than neoVI can transmit them, you will receive this error.

NEOVI_ERROR_DLL_MAIN51_DEV_FIFO_OVERFLOW=46

This is a FIFO over error related to messages passed from the Main51 uController to the Main PIC uController

NEOVI_ERROR_DLL_RESET_STATUS_CHANGED=47

The neoVI reset status has changed. This error would occur if the neoVI had a watchdog reset.

NEOVI_ERROR_DLL_ISO_LONG_CACHE_OVERFLOW=48

Internal Driver Error.

NEOVI_ERROR_DLL_ISORX_LONG_BUFFER_ALLOC=49

Internal Driver Error.

NEOVI_ERROR_DLL_J1708_LONG_CACHE_OVERFLOW=50

Internal Driver Error.

NEOVI_ERROR_DLL_J1708_LONG_BUFFER_ALLOC=51

Internal Driver Error.

NEOVI_ERROR_DLL_MAIN51_TX_FIFO_OVERFLOW_DEVICE=52

Internal Driver Error.

NEOVI_ERROR_DLL_MAIN51_TX_FIFO_OVERFLOW_HSCAN=53

Internal Driver Error.

NEOVI_ERROR_DLL_MAIN51_TX_FIFO_OVERFLOW_MSCAN=54

Internal Driver Error.

NEOVI_ERROR_DLL_MAIN51_TX_FIFO_OVERFLOW_SWCAN=55

Internal Driver Error.

NEOVI_ERROR_DLL_MAIN51_TX_FIFO_OVERFLOW_LSFTCAN=56

Internal Driver Error.

NEOVI_ERROR_DLL_MAIN51_TX_FIFO_OVERFLOW_FORDSCP=57

Internal Driver Error.

NEOVI_ERROR_DLL_MAIN51_TX_FIFO_OVERFLOW_J1708=58

Internal Driver Error.

NEOVI_ERROR_DLL_MAIN51_TX_FIFO_OVERFLOW_AUX=5

Internal Driver Error.

NEOVI_ERROR_DLL_MAIN51_TX_FIFO_OVERFLOW_JVPW=60

Internal Driver Error.

NEOVI_ERROR_DLL_MAIN51_TX_FIFO_OVERFLOW_ISO=61

Internal Driver Error.

NEOVI_ERROR_DLL_MAIN51_TX_FIFO_OVERFLOW_ISOPIC=62

Internal Driver Error.

NEOVI_ERROR_DLL_MAIN51_TX_FIFO_OVERFLOW_MAIN51=63

Internal Driver Error.

NEOVI_ERROR_DLL_MAIN51_TX_FIFO_OVERFLOW_HOST=64

Internal Driver Error.

NEOVI_ERROR_DLL_READ_ENTIRE_DEEPROM_ERROR=65

Internal Driver Error.

NEOVI_ERROR_DLL_WRITE_ENTIRE_DEEPROM_ERROR=66

Internal Driver Error.

NEOVI_ERROR_DLL_USB_PORT_ALREADY_OPEN=67

Internal Driver Error.

NEOVI_ERROR_DLL_JVPW_TX_REPORT_FIFO_ERR_IN=68

Internal Driver Error.

NEOVI_ERROR_DLL_ISOJ_TX_REPORT_FIFO_ERR_IN=69

Internal Driver Error.

NEOVI_ERROR_DLL_JVPW_TX_REPORT_FIFO_ERR_OUT=70

Internal Driver Error.

NEOVI_ERROR_DLL_ISOJ_TX_REPORT_FIFO_ERR_OUT=71

Internal Driver Error.

NEOVI_ERROR_DLL_MAIN51_TX_IN_FROM_HOST_FIFO=72

Internal Driver Error.

NEOVI_ERROR_DLL_MAIN51_TX_HOST_CHKSUM=73

Internal Driver Error.

NEOVI_ERROR_DLL_ISOJ_TX_HOST_MISSED_BYTE=74

Internal Driver Error.

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE=75

Internal Driver Error.

NEOVI_ERROR_DLL_RX_SOCKET_FIFO_OVER=76

Internal Driver Error.

NEOVI_ERROR_DLL_PROBLEM_STOPPING_TXSOCKET_THREAD=77

Internal Driver Error.

NEOVI_ERROR_DLL_PROBLEM_STOPPING_RXSOCKET_THREAD=78

Internal Driver Error.

NEOVI_ERROR_DLL_PROBLEM_STOPPING_TXSOCKET_CLIENT_THREAD=78

Internal Driver Error.

NEOVI_ERROR_DLL_PROBLEM_STOPPING_RXSOCKET_CLIENT_THREAD=79

Internal Driver Error.

NEOVI_ERROR_DLL_TCP_CLIENT_TX=80

Internal Driver Error.

NEOVI_ERROR_DLL_TCP_CLIENT_RX=81

Internal Driver Error.

NEOVI_ERROR_DLL_TCP_CLIENT_RX_SOCK=82

Internal Driver Error.

NEOVI_ERROR_DLL_UNABLE_CONNECT_TO_SRVR=83

Internal Driver Error.

NEOVI_ERROR_DLL_UNABLE_CREATE_CLIENT_SOCK=84

Internal Driver Error.

NEOVI_ERROR_DLL_UNABLE_WSASTARTUP=85

Internal Driver Error.

NEOVI_ERROR_DLL_SOCK_CL_RD_BUFFER_ALLOC=86

Internal Driver Error.

NEOVI_ERROR_DLL_SOCK_CL_TX_BUFFER_ALLOC=87

Internal Driver Error.

NEOVI_ERROR_DLL_SOCK_SRVR_RX_BUFFER_ALLOC=88

Internal Driver Error.

NEOVI_ERROR_DLL_SOCK_SRVR_TX_BUFFER_ALLOC=89

Internal Driver Error.

NEOVI_ERROR_DLL_ILLEGAL_TX_NETWORK=90

Internal Driver Error.

NEOVI_ERROR_DLL_MAIN51_TX_HOST_OVERRUN=91

Internal Driver Error.

NEOVI_ERROR_DLL_OPEN_GET_COMM_TIMEOUT=92

Internal Driver Error.

NEOVI_ERROR_DLL_OPEN_SET_COMM_TIMEOUT=93

Internal Driver Error.

NEOVI_ERROR_DLL_OPEN_READ_DEVICE_TYPE=94

Internal Driver Error.

NEOVI_ERROR_DLL_OPEN_READ_DEVICE_TYPE_TOUT=95

Internal Driver Error.

NEOVI_ERROR_DLL_CLOSE_PURGE_COMM=96

Internal Driver Error.

NEOVI_ERROR_DLL_TX_COM_FIFO_OVERFLOW=97

Internal Driver Error.

NEOVI_ERROR_DLL_GET_USBSERIAL_DEVICES=98

Internal Driver Error.

NEOVI_ERROR_DLL_USB_TX_RS232_BCOUNT = 99

Internal Driver Error.

NEOVI_ERROR_DLL_OPEN_INBOOTLOADER = 100

Internal Driver Error.

NEOVI_ERROR_DLL_TOO_MANY_PERIODICS = 101

Internal Driver Error.

NEOVI_ERROR_DLL_PROBLEM_FIRMWARE_INFO = 102

Internal Driver Error.

NEOVI_ERROR_DLL_NRED_ODDNUMBYTES = 103

Internal Driver Error.

NEOVI_ERROR_DLL_NRED_UNKNOWN_RED_NETID = 104

Internal Driver Error.

NEOVI_ERROR_DLL_RED_NOT_SUPPORTED = 105

Internal Driver Error.

NEOVI_ERROR_DLL_RED_BL_START_INDEX = 106

Internal Driver Error.

NEOVI_ERROR_DLL_3G_BL_FAILURE = 107

Internal Driver Error.

NEOVI_ERROR_DLL_RED_BL_END_INDEX = 116

Internal Driver Error.

NEOVI_ERROR_DLL_RED_FAILED_TO_ENTER_BL = 117

Internal Driver Error.

NEOVI_ERROR_DLL_RED_REQ_SERIAL_NUMBER = 118

Internal Driver Error.

NEOVI_ERROR_DLL_RED_AUTHENTICATE = 119

Internal Driver Error.

NEOVI_ERROR_DLL_RED_APP_VERSION = 120

Internal Driver Error.

NEOVI_ERROR_DLL_RED_SET_BAUD_COMM_FAILURE = 121

Internal Driver Error.

NEOVI_ERROR_DLL_RED_INVALID_BAUD_SPECIFIED = 122

Internal Driver Error.

NEOVI_ERROR_DLL_RED_INVALID_BAUD_SPECIFIED = 122

Internal Driver Error.

NEOVI_ERROR_DLL_RED_READ_BAUD_COMM_FAILURE = 123

Internal Driver Error.

NEOVI_ERROR_DLL_RED_FAILED_TO_SAVE_EEPROM = 124

Internal Driver Error.

NEOVI_ERROR_DLL_RED_FAILED_TO_UPDATE_WAVEFORM_CHANNEL = 125

Internal Driver Error.

NEOVI_ERROR_DLL_RED_RX_MSG_FULL_UNKNOWN_NETWORK = 126

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_MSG_FULL_UNKNOWN_NETWORK = 127

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_REPORT_MSG_FULL_UNKNOWN_NETWORK = 128

Internal Driver Error.

NEOVI_ERROR_DLL_RED_RX_MSG_FULL_HSCAN1 = 129

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_MSG_FULL_HSCAN1 = 130

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_REPORT_MSG_FULL_HSCAN1 = 131

Internal Driver Error.

NEOVI_ERROR_DLL_RED_DRIVER_OVERFLOW_HSCAN1 = 132

Internal Driver Error.

NEOVI_ERROR_DLL_RED_RX_MSG_FULL_HSCAN2 = 133

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_MSG_FULL_HSCAN2 = 134

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_REPORT_MSG_FULL_HSCAN2 = 135

Internal Driver Error.

NEOVI_ERROR_DLL_RED_DRIVER_OVERFLOW_HSCAN2 = 136

Internal Driver Error.

NEOVI_ERROR_DLL_RED_RX_MSG_FULL_MSCAN1 = 137

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_MSG_FULL_MSCAN1 = 138

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_REPORT_MSG_FULL_MSCAN1 = 139

Internal Driver Error.

NEOVI_ERROR_DLL_RED_DRIVER_OVERFLOW_MSCAN1 = 140

Internal Driver Error.

NEOVI_ERROR_DLL_RED_RX_MSG_FULL_HSCAN3 = 141

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_MSG_FULL_HSCAN3 = 142

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_REPORT_MSG_FULL_HSCAN3 = 143

Internal Driver Error.

NEOVI_ERROR_DLL_RED_DRIVER_OVERFLOW_HSCAN3 = 144

Internal Driver Error.

NEOVI_ERROR_DLL_RED_RX_MSG_FULL_SWCAN = 145

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_MSG_FULL_SWCAN = 146

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_REPORT_MSG_FULL_SWCAN = 147

Internal Driver Error.

NEOVI_ERROR_DLL_RED_DRIVER_OVERFLOW_SWCAN = 148

Internal Driver Error.

NEOVI_ERROR_DLL_RED_RX_MSG_FULL_LSFTCAN = 149

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_MSG_FULL_LSFTCAN = 150

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_REPORT_MSG_FULL_LSFTCAN = 151

Internal Driver Error.

NEOVI_ERROR_DLL_RED_DRIVER_OVERFLOW_LSFTCAN = 152

Internal Driver Error.

NEOVI_ERROR_DLL_RED_RX_MSG_FULL_LIN1 = 153

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_MSG_FULL_LIN1 = 154

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_REPORT_MSG_FULL_LIN1 = 155

Internal Driver Error.

NEOVI_ERROR_DLL_RED_DRIVER_OVERFLOW_LIN1 = 156

Internal Driver Error.

NEOVI_ERROR_DLL_RED_RX_MSG_FULL_LIN2 = 157

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_MSG_FULL_LIN2 = 158

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_REPORT_MSG_FULL_LIN2 = 159

Internal Driver Error.

NEOVI_ERROR_DLL_RED_DRIVER_OVERFLOW_LIN2 = 160

Internal Driver Error.

NEOVI_ERROR_DLL_RED_RX_MSG_FULL_LIN3 = 161

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_MSG_FULL_LIN3 = 162

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_REPORT_MSG_FULL_LIN3 = 163

Internal Driver Error.

NEOVI_ERROR_DLL_RED_DRIVER_OVERFLOW_LIN3 = 164

Internal Driver Error.

NEOVI_ERROR_DLL_RED_RX_MSG_FULL_LIN4 = 165

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_MSG_FULL_LIN4 = 166

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_REPORT_MSG_FULL_LIN4 = 167

Internal Driver Error.

NEOVI_ERROR_DLL_RED_DRIVER_OVERFLOW_LIN4 = 168

Internal Driver Error.

NEOVI_ERROR_DLL_USB_PURGE_FAILED = 169

Internal Driver Error.

NEOVI_ERROR_FIRE_COMM_BAD_PACKET = 170

Internal Driver Error.

NEOVI_ERROR_FIRE_CGI_COMM_BAD_PACKET = 171

Internal Driver Error.

NEOVI_ERROR_DLL_RED_SETTINGS_NOT_SET_HSCAN1 = 172

Internal Driver Error.

NEOVI_ERROR_DLL_RED_SETTINGS_NOT_SET_HSCAN2 = 173

Internal Driver Error.

NEOVI_ERROR_DLL_RED_SETTINGS_NOT_SET_HSCAN3 = 174

Internal Driver Error.

NEOVI_ERROR_DLL_RED_SETTINGS_NOT_SET_MSCAN = 175

Internal Driver Error.

NEOVI_ERROR_DLL_RED_SETTINGS_NOT_SET_SWCAN = 176

Internal Driver Error.

NEOVI_ERROR_DLL_RED_SETTINGS_NOT_SET_LSFTCAN = 177

Internal Driver Error.

NEOVI_ERROR_DLL_RED_SETTINGS_NOT_SET_LIN1 = 178

Internal Driver Error.

NEOVI_ERROR_DLL_RED_SETTINGS_NOT_SET_LIN2 = 179

Internal Driver Error.

NEOVI_ERROR_DLL_RED_SETTINGS_NOT_SET_LIN3 = 180

Internal Driver Error.

NEOVI_ERROR_DLL_RED_SETTINGS_NOT_SET_LIN4 = 181

Internal Driver Error.

NEOVI_ERROR_DLL_RED_SETTINGS_NOT_SET_UNKNOWN_NETWORK = 182

Internal Driver Error.

NEOVI_ERROR_DLL_RED_RX_MSG_FULL_JVPW = 183

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_MSG_FULL_JVPW = 184

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_REPORT_MSG_FULL_JVPW = 185

Internal Driver Error.

NEOVI_ERROR_DLL_RED_DRIVER_OVERFLOW_JVPW = 186

Internal Driver Error.

NEOVI_ERROR_DLL_INTERNAL_SERIAL_NO_DOES_NOT_MATCH_REGISTRY_SERIAL_NO = 187

Internal Driver Error.

NEOVI_ERROR_DLL_JVPW_LONG_CACHE_OVERFLOW = 188

Internal Driver Error.

NEOVI_ERROR_DLL_FAILED_TO_SET_LICENSE = 189

Internal Driver Error.

NEOVI_ERROR_DLL_3G_DEVICE_LICENSE_NEEDS_TO_BE_UPGRADED = 190

Internal Driver Error.

NEOVI_ERROR_DLL_NETWORK_NOT_ENABLED_HSCAN = 191

Internal Driver Error.

NEOVI_ERROR_DLL_NETWORK_NOT_ENABLED_MSCAN = 192

Internal Driver Error.

NEOVI_ERROR_DLL_NETWORK_NOT_ENABLED_HSCAN2 = 193

Internal Driver Error.

NEOVI_ERROR_DLL_NETWORK_NOT_ENABLED_HSCAN3 = 194

Internal Driver Error.

NEOVI_ERROR_DLL_NETWORK_NOT_ENABLED_LSFT = 195

Internal Driver Error.

NEOVI_ERROR_DLL_NETWORK_NOT_ENABLED_SW = 196

Internal Driver Error.

NEOVI_ERROR_DLL_NETWORK_NOT_ENABLED_LIN1 = 197

Internal Driver Error.

NEOVI_ERROR_DLL_NETWORK_NOT_ENABLED_LIN2 = 198

Internal Driver Error.

NEOVI_ERROR_DLL_NETWORK_NOT_ENABLED_LIN3 = 199

Internal Driver Error.

NEOVI_ERROR_DLL_NETWORK_NOT_ENABLED_LIN4 = 200

Internal Driver Error.

NEOVI_ERROR_DLL_NETWORK_NOT_ENABLED_JVPW = 201

Internal Driver Error.

NEOVI_ERROR_DLL_NETWORK_NOT_ENABLED_KYW = 202

Internal Driver Error.

NEOVI_ERROR_DLL_NETWORK_NOT_ENABLED_J1708 = 203

Internal Driver Error.

NEOVI_ERROR_DLL_MAIN51_RTC_INVALID = 204

Internal Driver Error.

NEOVI_ERROR_DLL_MAIN51_LOADED_DEFAULT_SETTINGS = 205

Internal Driver Error.

NEOVI_ERROR_DLL_RED_RX_MSG_FULL_CGI = 206

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_MSG_FULL_CGI = 207

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_REPORT_MSG_FULL_CGI = 208

Internal Driver Error.

NEOVI_ERROR_DLL_RED_DRIVER_OVERFLOW_CGI = 209

Internal Driver Error.

NEOVI_ERROR_DLL_RED_SETTINGS_NOT_SET_CGI = 210

Internal Driver Error.

NEOVI_ERROR_DLL_NETWORK_NOT_ENABLED_CGI = 211

Internal Driver Error.

NEOVI_ERROR_DLL_RED_SETTINGS_NOT_SET_JVPW = 212

Internal Driver Error.

NEOVI_ERROR_DLL_INVALID_SCRIPT_LOCATION = 213

Internal Driver Error.

NEOVI_ERROR_DLL_SDCARD_NOT_INSERTED = 214

Internal Driver Error.

NEOVI_ERROR_DLL_SDCARD_NOT_FORMATTED = 215

Internal Driver Error.

NEOVI_ERROR_DLL_SDCARD_WRITE_ERROR = 216

Internal Driver Error.

NEOVI_ERROR_DLL_SDCARD_READ_ERROR = 217

Internal Driver Error.

NEOVI_ERROR_DLL_SCRIPT_START_ERROR = 218

Internal Driver Error.

NEOVI_ERROR_DLL_SCRIPT_INVALID_FUNCBLOCK_INDEX = 219

Internal Driver Error.

NEOVI_ERROR_DLL_SCRIPT_ERROR_DOWNLOADING_SCRIPT = 220

Internal Driver Error.

NEOVI_ERROR_DLL_SCRIPT_ERROR_CLEARING_SCRIPT = 221

Internal Driver Error.

NEOVI_ERROR_DLL_RED_RX_MSG_FULL_ISO = 222

Internal Driver Error.

NEOVI_ERROR_DLL_NETWORK_NOT_ENABLED_ISO = 223

Internal Driver Error.

NEOVI_ERROR_DLL_SCRIPT_INVALID_MSG_INDEX = 224

Internal Driver Error.

NEOVI_ERROR_DLL_SCRIPT_INVALID_APPSIG_INDEX = 225

Internal Driver Error.

NEOVI_ERROR_DLL_SCRIPT_NO_SCRIPT_RUNNING = 226

Internal Driver Error.

NEOVI_ERROR_DLL_COULD_NOT_SET_SETTINGS_FIRMWARE_MISMATCH = 227

Internal Driver Error.

NEOVI_ERROR_DLL_FIRE_CGI_TX_NOT_ENABLED = 228

Internal Driver Error.

NEOVI_ERROR_DLL_SEND_DEVICE_CONFIG_ERROR = 229

Internal Driver Error.

NEOVI_ERROR_DLL_GET_DEVICE_CONFIG_ERROR = 230

Internal Driver Error.

NEOVI_ERROR_DLL_UNKNOWN_NEOVI_TYPE = 231

Internal Driver Error.

NEOVI_ERROR_DLL_NETWORK_NOT_ENABLED_ISO2 = 232

Internal Driver Error.

NEOVI_ERROR_DLL_NETWORK_NOT_ENABLED_ISO3 = 233

Internal Driver Error.

NEOVI_ERROR_DLL_NETWORK_NOT_ENABLED_ISO4 = 234

Internal Driver Error.

NEOVI_ERROR_DLL_RED_RX_MSG_FULL_ISO2 = 235

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_MSG_FULL_ISO2 = 236

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_REPORT_MSG_FULL_ISO2 = 237

Internal Driver Error.

NEOVI_ERROR_DLL_RED_DRIVER_OVERFLOW_ISO2 = 238

Internal Driver Error.

NEOVI_ERROR_DLL_RED_SETTINGS_NOT_SET_ISO2 = 239

Internal Driver Error.

NEOVI_ERROR_DLL_RED_RX_MSG_FULL_ISO3 = 240

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_MSG_FULL_ISO3 = 241

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_REPORT_MSG_FULL_ISO3 = 242

Internal Driver Error.

NEOVI_ERROR_DLL_RED_DRIVER_OVERFLOW_ISO3 = 243

Internal Driver Error.

NEOVI_ERROR_DLL_RED_SETTINGS_NOT_SET_ISO3 = 244

Internal Driver Error.

NEOVI_ERROR_DLL_RED_RX_MSG_FULL_ISO4 = 245

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_MSG_FULL_ISO4 = 246

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_REPORT_MSG_FULL_ISO4 = 247

Internal Driver Error.

NEOVI_ERROR_DLL_RED_DRIVER_OVERFLOW_ISO4 = 248

Internal Driver Error.

NEOVI_ERROR_DLL_RED_SETTINGS_NOT_SET_ISO4 = 249

Internal Driver Error.

NEOVI_ERROR_DLL_RED_FAILED_TO_CLEAR_LIN_SLAVE_DATA = 250

Internal Driver Error.

NEOVI_ERROR_DLL_NETWORK_NOT_ENABLED_ISO1 = 251

Internal Driver Error.

NEOVI_ERROR_DLL_RED_RX_MSG_FULL_ISO1 = 252

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_MSG_FULL_ISO1 = 253

Internal Driver Error.

NEOVI_ERROR_DLL_RED_TX_REPORT_MSG_FULL_ISO1 = 254

Internal Driver Error.

NEOVI_ERROR_DLL_RED_SETTINGS_NOT_SET_ISO1 = 255

Internal Driver Error.

NEOVI_ERROR_DLL_DROPPED_RTC_CMD = 256

Internal Driver Error.

NEOVI_ERROR_DLL_J1850_TX_REQUESTS_FLUSHED = 257

Internal Driver Error.

NEOVI_ERROR_J1708_COMM_BAD_PACKET = 258

Internal Driver Error.

NEOVI_ERROR_DLL_NETWORK_NOT_SUPPORTED_BY_HARDWARE = 259

Internal Driver Error.

NEOVI_ERROR_DLL_FEATURE_NOT_UNLOCKED = 260

Internal Driver Error.

NEOVI_ERROR_DLL_DEVICE_NOT_POWERED = 261

Internal Driver Error.

NEOVI_ERROR_DLL_3GCANDOWNLOADER_OK = 262

Internal Driver Error.

NEOVI_ERROR_DLL_3GCANDOWNLOADER_ERRORBADINIT = 263

Internal Driver Error.

NEOVI_ERROR_DLL_3GCANDOWNLOADER_ERRORNOCANPIPE = 264

Internal Driver Error.

NEOVI_ERROR_DLL_3GCANDOWNLOADER_ERRORISONEG7FRESPONSE = 265

Internal Driver Error.

NEOVI_ERROR_DLL_3GCANDOWNLOADER_ERRORTOOLNOTSELECTED = 266

Internal Driver Error.

NEOVI_ERROR_DLL_3GCANDOWNLOADER_ERRORINVALIDDEVICESELECTED = 267

Internal Driver Error.

NEOVI_ERROR_DLL_3GCANDOWNLOADER_ERRORCOULDNOTOPENTOOL = 268

Internal Driver Error.

NEOVI_ERROR_DLL_3GCANDOWNLOADER_ERRORNOFLOWCONTROL = 269

Internal Driver Error.

NEOVI_ERROR_DLL_3GCANDOWNLOADER_ERRORUNSPECIFIC = 270

Internal Driver Error.

NEOVI_ERROR_DLL_3GCANDOWNLOADER_ERRORCOREMININULLPTR = 271

Internal Driver Error.

NEOVI_ERROR_DLL_3GCANDOWNLOADER_ERRORCOREMINIZEROLEN = 272

Internal Driver Error.

NEOVI_ERROR_DLL_3GCANDOWNLOADER_ERRORRESERVED3 = 273

Internal Driver Error.

NEOVI_ERROR_DLL_3GCANDOWNLOADER_ERRORRESERVED4 = 274

Internal Driver Error.

NEOVI_ERROR_DLL_YELLOW_DEPRECATED = 275

Internal Driver Error.

NEOVI_ERROR_DLL_HARDWARE_FAILURE_SRAM = 276

Internal Driver Error.

NEOVI_ERROR_ACTIVE_CONNECTION_ALREADY_EXISTS = 277

Internal Driver Error.

NEOVI_ERROR_DLL_MAIN51_RTC_FAILED_READ = 278

Internal Driver Error.

NEOVI_ERROR_DLL_MAIN51_RTC_AUTO_RTC = 279

Internal Driver Error.

NEOVI_ERROR_DLL_SEND_DEVICE_CONFIG_NOTPOSSIBLE = 287

Internal Driver Error.

NEOVI_ERROR_CHANNEL_LOCKED_BY_OTHER_CLIENT = 288

Occurs when an application tries to acquire a lock on a channel that has already been locked.

NEOVI_ERROR_NEOVISERVER_GENERAL_ERROR = 289

A general error has occurred with the neoVIServer.

NEOVI_ERROR_CHANNEL_LOCKING_NOT_SUPPORTED_FOR_DEVICE = 290

The connected device does not support channel locking.

OpenPortEx Method - neoVI API

This function opens a connection to a neoVI device.

int _stdcall icsneoOpenPortEx( int lPortNumber, int lPortType, int lDriverType, int lIPAddressMSB, int lIPAddressLSBOrBaudRate, int bConfigRead, unsigned char * bNetworkID, int * hObject);
Public Declare Function icsneoOpenPortEx Lib “icsneo40.dll” (ByVal lPortNumber As Integer, ByVal lPortType As Integer, ByVal lDriverID As Integer, ByVal lIPAddressMSB As Integer, ByVal lIPAddressLSBOrBaudRate As Integer, ByVal lForceConfigRead As Integer, ByRef bNetworkID As Byte, ByRef hObject As Integer) As Integer
[DllImport(“icsneo40.dll”)] public static extern int icsneoOpenPortEx(int lPortNumber, int lPortType, int lDriverID,int lIPAddressMSB, int lIPAddressLSBOrBaudRate, int lForceConfigRead, ref byte bNetworkID,ref int hObject);

Parameters

lPortNumber

[in] Specifies which USB, TCP/IP, or Comm port to use. The USB port is a logic port starting with 1 up to the number of devices. For example, if 3 devices are connected, valid lPortNumber values will be 1,2, and 3. Comm ports also start at 1. For TCP/IP it specifies the TCP/IP port number.

lPortType

lDriverType

[in] Specifies which neoVI driver to use. This should always be set to INTREPIDCS_DRIVER_STANDARD (0).

lIPAddressMSB

[in] Specifies upper two bytes of TCP/IP address if the lPortType is set to NEOVI_COMMTYPE_TCPIP (bytes 4 and 3 of this TCP/IP address: 1.2.3.4).

lIPAddressLSBOrBaudRate

[in] Specifies the baud rate if lPortType is NEOVI_COMMTYPE_RS232 and the lower two bytes of the TCP/IP address (bytes 2 and 1 of this TCP/IP address: 1.2.3.4).

bConfigRead

[in] Specifies whether the DLL should read the configuration before enabling the device. It is recommended to set this value to 1. This parameter is ignored when the object is created because the configuration is read by default.

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. The network IDs are specified in the following list: NETID_DEVICE = 0, NETID_HSCAN = 1, NETID_MSCAN = 2, NETID_SWCAN = 3, NETID_LSFTCAN = 4, NETID_FORDSCP = 5, NETID_J1708 = 6, NETID_AUX = 7, NETID_JVPW = 8, NETID_ISO = 9. You may also set this parameter to NULL (zero) and the default network ID’s will be used.

hObject

[in, out] This is the handle of the neoVI driver object. If this handle is 0, the method will create a new neoVI driver object. This handle will be used in other neoVI API calls to read and transmit messages.

Return Values

If the port has been opened successfully and connection to neoVI is attained, the return value will be 1. If the function fails the return value will be zero. The most common reason for failure is when the neoVI is not connected to the port described in the parameters.

Remarks

Examples

unsigned char bNetworkID[16];     // array of network ids
int hObject = 0;         // holds a handle to the neoVI object
unsigned long lCount;            // counter variable
int iIPLSB;
int iIPMSB;

// initialize the networkid array
for (lCount=0;lCount<16;lCount++)
    bNetworkID[lCount] = lCount;


if (!m_bPortOpen) // only if not already opened
{
    iIPLSB = 57600;
    iIPMSB = 0;

    lResult = icsneoOpenPortEx(1 ,NEOVI_COMMTYPE_RS232,INTREPIDCS_DRIVER_STANDARD,iIPMSB,iIPLSB,1,bNetworkID,&hObject);
    if (lResult == 0)
        MessageBox(hWnd,TEXT("Problem Opening Port"),TEXT("neoVI Example"),0);
    else
    {
        m_bPortOpen =true;
        MessageBox(hWnd,TEXT("Port Opened Successfully"),TEXT("neoVI Example"),0);
    }
}
Dim lResult As Long
Dim iIPMSB As Integer
Dim iIPLSB As Integer

iIPMSB = 0
iIPLSB = 0
lResult = 0

''command To Open up the port
If optUsbDevice.Checked = False Then
    iIPLSB = 57600  ''Set Baud Rate for Serial Communication
    lResult = icsneoOpenPortEx(Val(txtCommPortNum.Text), NEOVI_COMMTYPE_RS232, _
        INTREPIDCS_DRIVER_STANDARD, iIPMSB, iIPLSB, 1, NETID_HSCAN, m_hObject)
Else
    lResult = icsneoOpenPortEx(Val(txtCommPortNum.Text), NEOVI_COMMTYPE_USB_BULK, _
            INTREPIDCS_DRIVER_STANDARD, iIPMSB, iIPLSB, 1, NETID_HSCAN, m_hObject)
End If

''Check the status of the opened port
If CBool(lResult) Then
    MsgBox("Port Opened OK!")
Else
    MsgBox("Problem Opening Port")
End If
m_bPortOpen = True
byte bNetworkIDs = 1;
int iPortNumber = 0;
int iReturnVal = 0; //iReturn value tells status of the function call
int iIPMSB = 0;
int iIPLSB = 0;

iPortNumber = Convert.ToInt32( txtCommPortNum.Text); //Convert type of Textbox Value
//Open the Device on the Port indicated in the Text box
if(optUsbDevice.Checked == false)
{
    iIPLSB = 57600;
    iReturnVal = icsNeoDll.icsneoOpenPortEx(iPortNumber, Convert.ToInt32(ePORT_TYPE.NEOVI_COMMTYPE_RS232),
        Convert.ToInt32(eDRIVER_TYPE.INTREPIDCS_DRIVER_STANDARD),iIPMSB ,iIPLSB,1, ref bNetworkIDs,     ref m_hObject);
}
else
{
    iReturnVal = icsNeoDll.icsneoOpenPortEx(iPortNumber, Convert.ToInt32(ePORT_TYPE.NEOVI_COMMTYPE_USB_BULK ),
        Convert.ToInt32(eDRIVER_TYPE.INTREPIDCS_DRIVER_STANDARD),iIPMSB , iIPLSB, 1, ref    bNetworkIDs,ref m_hObject);
}

if (iReturnVal == 0) // test the returned result
{
    MessageBox.Show("Problem Opening Port"); //Error, Show message
}
else
{
    MessageBox.Show("Port opened OK!");
    m_bPortOpen = true; //Set Port Opened Flag
}

FindAllCOMDevices Method - neoVI API

This method returns the number of COM (both serial and USB serial) hardware devices connected to the PC.

int _stdcall icsneoFindAllCOMDevices(int lDriverType,
int lGetSerialNumbers,
int lStopAtFirst,
int lUSBCommOnly,
int *p_lDeviceTypes,
int *p_lComPorts,
int *p_lSerialNumbers,
int *lNumDevices);
Public Declare Function icsneoFindAllCOMDevices Lib “icsneo40.dll” _
(ByVal lDriverID As Integer, ByVal lGetSerialNumbers As Integer, _
ByVal lStopAtFirst As Integer, ByVal iUSBCommOnly As Integer, _
ByRef p_lDeviceTypes As Integer, ByRef p_lComPorts As Integer, _
ByRef p_lSerialNumbers As Integer, ByRef lNumDevices As Integer) As Integer
[DllImport(“icsneo40.dll”)] public static extern int icsneoFindAllCOMDevices(int lDriverID, int lGetSerialNumbers,int lStopAtFirst, int iUSBCommOnly, ref int p_lDeviceTypes, ref int p_lComPorts,ref int p_lSerialNumber, ref int lNumDevices);

Parameters

lDriverType

[in] Specifies which neoVI driver to use. This should always be set to INTREPIDCS_DRIVER_STANDARD (0).

lGetSerialNumbers

[in] Specifies whether the serial numbers should be read from the device (iGetSerialNumbers=1). Getting serial numbers will take longer than not doing it therefore so set this to zero if not required for the application. If a device is already opened the serial number cannot be read.

lStopAtFirst

[in] Indicates whether the function should stop at the first device found (lStopAtFirst=1). This is useful when you only have one device connected to the PC.

lUSBCommOnly

[in] Indicates to search USB serial devices only (lUSBCommOnly=1). Normal COM ports will not be searched. Normal COM port searches will take longer to execute.

p_lDeviceTypes

[out] Pointer to array of at least 255 elements. This array will be filled in with the type of device found. The valid device types include INTREPIDCS_DEVICE_NEO4 (0), INTREPIDCS_DEVICE_VCAN (1), or INTREPIDCS_DEVICE_NEO6 (2).

p_lComPorts

[out] Pointer to array of at least 255 elements. This array will be filled in with the com port numbers of each connected device.

p_lSerialNumbers

[out] Pointer to array of at least 255 elements. This array will be filled in with the serial number of each device if argument lGetSerialNumbers=1.

iNumDevices

[out] Points to a value which contains the number of devices found.

Return Values

If this function operates successfully the return value will be 1. If the function fails the return value will be zero.

Remarks

None.

Examples

Opens first device on USB Com port either a ValueCAN or neoVI PRO

int iDeviceTypes[255];
int iComPort[255];
int iSerialNum[255];
int iOpenedStates[255];
int iDeviceNumbers[255];
int iNumDevices;

if (icsneoFindAllCOMDevices(INTREPIDCS_DRIVER_STANDARD, 0,1,1,iDeviceTypes,iComPort,iSerialNum,&iNumDevices))
{

    if (iNumDevices > 0)
    {

        lResult = icsneoOpenPortEx(iComPort[0] ,NEOVI_COMMTYPE_RS232,
                                                                        INTREPIDCS_DRIVER_STANDARD,0,57600,1,bNetworkID, &hObject);

    if (lResult == 0)
        MessageBox(hWnd,TEXT("Problem Opening Port"),TEXT("neoVI Example"),0);
    else
    {

            MessageBox(hWnd,TEXT("Port Opened Successfully"),TEXT("neoVI Example"),0);
        }

    }
}
else
    MessageBox(hWnd,TEXT("Problem Opening Port"),TEXT("neoVI Example"),0);

}
else

    MessageBox(hWnd,TEXT("Problem Opening Port"),TEXT("neoVI Example"),0);
This example demonstrates loading a list box with all the devices connected to the PC

int lResult = 0; //Storage for Result of Function call
int[] iDevices = new int[127]; //Array for the device numbers
int[] iSerialNumbers = new int[127]; //Araay for serial numbers of attached devices
int[] iOpenedStatus = new int[127]; //Array of the status of the driver
int iNumDevices = 0; //Storage for the number of devices
int[] iCommPortNumbers = new int[127]; //Array of Comm Port numbers in use
int Counter = 0; //Counter for Counting things

//Call function for Finding all Comm deivces
lResult = icsNeoDll.icsneoFindAllCOMDevices(Convert.ToInt32 (eDRIVER_TYPE.INTREPIDCS_DRIVER_STANDARD), 1,0,0,ref iDevices[0],ref iCommPortNumbers[0], ref iSerialNumbers[0],ref
iNumDevices)

//Check the status of the funciton call
if(lResult==1)
{
    //Fill in list box with device findings
    for(Counter=0;Counter<127; Counter++)
    {
        lstCommDevices.Items.Add("Device Type-" + Convert.ToString(iDevices[Counter]) + " SN-" + Convert.ToString(iSerialNumbers[Counter]) + " Port #" + Convert.ToString(iCommPortNumbers[Counter]));
    }
}
else
{
    //display error box if could not find anything
    MessageBox.Show("Could Not Find anything");
}
This example demonstrates loading a list box with all the devices connected to the PC

Dim lResult As Integer ''Storage for Result of Function call
Dim iDevices(127) As Integer ''Array for the device numbers
Dim iSerialNumbers(127) As Integer ''Array for Serial numbers of attached devices
Dim iOpenedStatus(127) As Integer ''Array of Status of Driver
Dim iNumDevices As Integer ''Storage for the number of devices
Dim iCommPortNumbers(127) As Integer ''Array of Comm port numbers in use
Dim Counter As Integer ''Counter for counting things

''Function call for Finding all of the Comm devices
lResult = icsneoFindAllCOMDevices(INTREPIDCS_DRIVER_STANDARD, 1, 0, 0, iDevices(0), iCommPortNumbers(0), iSerialNumbers(0), iNumDevices)
''check the results
If lResult = 1 Then
    For Counter = 0 To 127
    ''Fill list box with device findings
    lstCommDevices.Items.Add("Device Type-" + Convert.ToString(iDevices(Counter)) + _
        " SN-" + Convert.ToString(iSerialNumbers(Counter)) + " Port #" + Convert.ToString(iCommPortNumbers(Counter)))
Next Counter
Else
    ''Display error message if could not find anything
    MsgBox("Could not find anything")
End If

[in] Specifies the driver object created by .

[out] This is the address of the first element of an array of structures. This array will be loaded by the application software with entries to be read or written from/to the hardware.

[in] Specifies the size of the structure used by the application. This is to make sure the structure used in the application and the DLL is same to avoid any buffer overrun.

Returns 1 if successful, 0 if an error occurred. must be called to obtain the specific error.

[in] Handle to the driver object created by

This method should be called when the server created with .

[in] Specifies the driver object created by

1 if the function succeeded. 0 if it failed for any reason. r must be called to obtain the specific error.

Name
Description

Use OpenNeoDevice

OpenPort

Use OpenNeoDevice

It is no longer necessary to call this before and after calling SendConfiguration

No longer supported. It is present in the API but will always return 0

Use FindNeoDevices instead

Use FindDevices instead

Table 1 lists the possible error messages returned in the API call. Some of these errors may also be returned by the API call.

This error occurs if the DLL overflows it’s receive message buffer. Solve this error by calling at a faster interval.

This function is deprecated. Use the method instead.

[in] Specifies the port type of what the device is connected to. This parameter is used with lPortNumber described above. This parameter can be set to NEOVI_COMMTYPE_RS232 (0) for a RS232 Comm port, NEOVI_COMMTYPE_USB_BULK (1) for a USB, or NEOVI_COMMTYPE_TCPIP (3) for a TCP/IP connection. More information on the different types of hardware and the connection it uses can be found in the help topic.

The neoVI DLL will use this array when it receives a network message. For example, when the DLL receives a message from HSCAN network it will set the NetworkID parameter of the with the value bNetworkID(NETID_HSCAN).

Every time you create a new neoVI driver object you must call (after ). If you do not you will create a memory leak.

Each successful call to OpenPort should be matched with a call to . The OpenPort call will reset the timestamp clock.

This function is deprecated. Use instead.

OpenNeoDevice
PhyRegPkt_T
PhyRegPkt_T
GetLastAPIError
OpenNeoDevice
StartSocketServer
OpenNeoDevice
GetLastAPIErro
GetErrorMessages
GetLastAPIError
OpenNeoDevice
OpenPortEx Hardware Type
message structure
icsneoFreeObject
ClosePort
ClosePort
FindNeoDevices

FindAllUSBDevices Method - neoVI API

This method is no longer supported and will always return 0. It remains in the API for backward compatibility.

EnableNetworkCom Method - neoVI API

This function is deprecated. Use the EnableNetworkRXQueue method instead.

This method enables or disables all vehicle network rx data.

int _stdcall icsneoEnableNetworkCom(int hObject,int lEnable);
Public Declare Function icsneoEnableNetworkCom Lib “icsneo40.dll” (ByVal hObject As Integer, ByVal lEnable As Integer) As Integer
[DllImport(“icsneo40.dll”)] public static extern int icsneoEnableNetworkCom(int hObject, int lEnable);

Parameters

lEnable

[in] When 1 it will enable network receive. When 0 it will disable network receive.

Return Values

This function returns the 1 when successful. 0 if otherwise.

Remarks

This function will enable and disable network traffic for all client applications connected to the neoVI. The icsneoEnableNetworkRXQueue function can be used to enable and disable the receive message queue for individual applications.

Examples

icsneoEnableNetworkCom(m_hObject,0);
Call icsneoEnableNetworkCom(m_hObject, 0)
icsNeoDll.icsneoEnableNetworkCom(m_hObject,0);
OpenPortEx
EnableNetworkCom
FindAllUSBDevices
FindAllCOMDevices
FindNeoDevices
GetMessages

CoreMini Script interface Overview - neoVI API

The CoreMini Script Interface is a way to use functionality from Vehicle Spy in your own application. When a CoreMini file is created in Vehicle Spy 3 it creates header files for the functions in the file and giving access to basic parameters in the script.

This section includes commands to load and interact with CoreMini scripts for Intrepid Control Systems 3G hardware. CoreMini scripts are created using Vehicle Spy 3. For information on creating CoreMini scripts see the help documents for Vehicle Spy 3. The table below lists the different script interface commands and gives a short description of the command.

ScriptStop Method - neoVI API

This method stops the execution of a script that is running on a neoVI device.

int _stdcall icsneoScriptStop(void * hObject);
Public Declare Function icsneoScriptStop Lib “icsneo40.dll” (ByVal hObject As IntPtr) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoScriptStop(IntPtr hObject);

Parameters

hObject

Return Values

Remarks

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

NEOVI_ERROR_DLL_SCRIPT_NO_SCRIPT_RUNNING = 226

Examples

int iRetVal;
unsigned long lLastErrNum;

iRetVal = icsneoScriptStop(m_hObject);
if(iRetVal == 0)
{
    printf("Failed to Stop the script API Error\n");
}
else
{
    printf("Successfully stopped the script\n");
}
Int32 iResult;

//Stop CoreMini
iResult = icsNeoDll.icsneoScriptStop(m_hObject);

if(iResult == 0)
{
    lblCMStatus.Text = "CoreMini Failed to Stop";
}
else
{
    lblCMStatus.Text = "CoreMini Stopped";
}
Dim iResult As Int32

'//Stop CoreMini
iResult = icsneoScriptStop(m_hObject)

If iResult = 0 Then
    lblCMStatus.Text = "CoreMini Failed to Stop"
Else
    lblCMStatus.Text = "CoreMini Stopped"
End If

FindNeoDevices Method - neoVI API

This method returns the neoVI hardware devices connected to the PC.

int _stdcall icsneoFindNeoDevices(unsigned long DeviceTypes, NeoDevice *pNeoDevices, int *pNumberOfDevices);
Public Declare Function icsneoFindNeoDevices Lib “icsneo40.dll” (ByVal DeviceTypes As UInt32, ByRef pNeoDevice As NeoDevice, ByRef pNumDevices As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoFindNeoDevices(UInt32 DeviceTypes, ref NeoDevice pNeoDevice, ref Int32 pNumDevices);

Parameters

DeviceTypes

[in] Specifies the types of neoVI devices to find. Currently supported values are:

NEODEVICE_BLUE = 0x00000001

NEODEVICE_ECU_AVB = 0x00000002

NEODEVICE_DW_VCAN = 0x00000004

NEODEVICE_RADGIGALOG = 0x00000006

NEODEVICE_FIRE = 0x00000008

NEODEVICE_VCAN3 = 0x00000010

NEODEVICE_RED = 0x00000040

NEODEVICE_ECU = 0x00000080

NEODEVICE_IEVB = 0x00000100

NEODEVICE_PENDANT = 0x00000200

NEODEVICE_OBD2_PRO = 0x00000400

NEODEVICE_PLASMA = 0x00001000

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. You may use logical OR to choose which devices to look for or use NEODEVICE_ALL to specify all devices.

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.

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

Examples

NeoDevice Devices[255];
unsigned long lDevTypes;
int iNumDevices = 255;
int iRetVal = 0;
int lDevTypes;

lDevTypes = NEODEVICE_ALL;

iRetVal = icsneoFindNeoDevices(lDevTypes, Devices, &iNumDevices);
int iResult;//Holds the results from function call
NeoDevice ndNeoToOpen = new NeoDevice(); ; //Struct holding detected hardware information
int iNumberOfDevices; //Number of hardware devices to look for
int lDevTypes; //Holds the device types to look for
lDevTypes = NEODEVICE_ALL;

//Set the number of devices to find
iNumberOfDevices = 1;
//Search for connected hardware
iResult = icsNeoDll.icsneoFindNeoDevices(65535, ref ndNeoToOpen, ref iNumberOfDevices);
if (iResult == 0)
{
    MessageBox.Show("Problem finding devices");
    return;
}
Dim iResult As Integer '//Holds the results from function call
Dim ndNeoToOpen As NeoDevice '//Struct holding detected hardware information
Dim iNumberOfDevices As Integer '//Number of hardware devices to look for
Dim lDevTypes As Integer '//Holds the device types to look for


'//Set the devices to look for
lDevTypes = NEODEVICE_ALL
'//Set the number of devices to find
iNumberOfDevices = 1
'//Search for connected hardware
iResult = icsneoFindNeoDevices(lDevTypes, ndNeoToOpen, iNumberOfDevices)
If (iResult = 0) Then MsgBox("Problem finding devices")

ScriptStart Method - neoVI API

This method starts the execution of a script that has been downloaded to a neoVI device.

int _stdcall icsneoScriptStart(void * hObject, int iLocation);
Public Declare Function icsneoScriptStart Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByVal iLocation As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoScriptStart(IntPtr hObject, Int32 iLocation);

Parameters

hObject

iLocation

[in] Specifies the physical location of the script to be executed on the neoVI device. Valid values are:

SCRIPT_LOCATION_FLASH_MEM = 0 (Valid only on a neoVI Fire or neoVI Red)SCRIPT_LOCATION_SDCARD = 1 (Valid only on a neoVI Fire or neoVI Red)SCRIPT_LOCATION_VCAN3_MEM = 2 (Valid only on a ValueCAN 3 device)

These values are defined in the icsnVC40.h file

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

NEOVI_ERROR_DLL_INVALID_SCRIPT_LOCATION = 213

NEOVI_ERROR_DLL_SDCARD_NOT_INSERTED = 214

NEOVI_ERROR_DLL_SCRIPT_START_ERROR = 218

Remarks

Examples

int iRetVal;
unsigned long lLastErrNum;

printf("Attempting to start the script\n");
iRetVal = icsneoScriptStart(hObject, DefaultScriptLocation);
if(iRetVal == 0)
{
    printf("Failed to start the script API Error\n");
}
else
{
    printf("Successfully started the script\n");
}
Int32 iResult;

//Start CoreMini
iResult = icsNeoDll.icsneoScriptStart(m_hObject, Convert.ToInt32(CoreMiniStoreLocation.SCRIPT_LOCATION_FLASH_MEM));

if(iResult == 0)
{
    lblCMStatus.Text = "CoreMini Failed to Start";
}
else
{
    lblCMStatus.Text = "CoreMini Started";
}
Dim iResult As Int32

'//Start CoreMini
iResult = icsneoScriptStart(m_hObject, SCRIPT_LOCATION_FLASH_MEM)

If iResult = 0 Then
    lblCMStatus.Text = "CoreMini Failed to Start"
Else
    lblCMStatus.Text = "CoreMini Started"
End If
Function
Description

Starts execution of a script that has been downloaded to a neoVI device

Stops execution of a script running on a neoVI device

Downloads a script to a connected neoVI device into a specified location

Clears a script from a specific location on a neoVI device

Starts a function block within a script on a neoVI device

Returns the run status of a function block within a script on a neoVI device

Stops the execution of a function block within a script on a neoVI device

Stops the execution of a function block within a script on a neoVI device

Read an application signal from a script running on a neoVI device

Set the value of an application signal in a script running on a neoVI device

[in] Specifies the driver object created by .

1 if the function succeeded. 0 if it failed for any reason. must be called to obtain the specific error.

If a script is executing on the neoVI calling this method will stop it. The script will still be present on the device and can be started again by The errors that can be generated by this function are:

pNeoDevices [out] This is the address of the first element of an array of structure. This array can be as big as 255 devices. You must specify the size of the pNeoDevices array in the pNumberOfDevices 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.

The NeoDevice array elements that are returned with this function may be passed to so that individual neoVI devices can be opened.

[in] Specifies the driver object created by .

1 if the function succeeded. 0 if it failed for any reason. must be called to obtain the specific error. The errors that can be generated by this function are:

The script must have been successfully downloaded to the neoVI using . Use to suspend execution of the script. If the connected device is a ValueCAN 3 and a location other than SCRIPT_LOCATION_VCAN3_MEM will generate an error.

OpenNeoDevice
GetLastAPIError
ScriptStart
NeoDevice
OpenNeoDevice
OpenNeoDevice
GetLastAPIError
LoadScript
ScriptStop
ScriptStart
ScriptStop
ScriptLoad
ScriptClear
ScriptStartFBlock
ScriptGetFBlockStatus
ScriptStopFBlock
ScriptGetScriptStatus
ScriptReadAppSignal
ScriptWriteAppSignal

ScriptStopFBlock Method - neoVI API

This method stops the execution of a specified function block within a script on a neoVI device.

int _stdcall icsneoScriptStopFBlock(void * hObject, unsigned int iFunctionBlockIndex);
Public Declare Function icsneoScriptStopFBlock Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByVal fb_index As UInt32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoScriptStopFBlock(IntPtr hObject,UInt32 fb_index);

Parameters

hObject

iFunctionBlockIndex

[in] The index value of the function block to stop

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

NEOVI_ERROR_DLL_SCRIPT_INVALID_FUNCBLOCK_INDEX = 219

NEOVI_ERROR_DLL_SCRIPT_NO_SCRIPT_RUNNING = 226

Remarks

Examples

int iRetVal;
unsigned long lLastErrNum;

iRetVal = icsneoScriptStopFBlock(hObject, Function_Block_1);
if(iRetVal == 0)
{
    printf("\nFailed to stop the function block.);
}
else
{
    printf("\nSuccessfully stopped the function block");
}
Int32 iResult;

//Stop Function Block in CoreMini
iResult = icsNeoDll.icsneoScriptStopFBlock(m_hObject, Convert.ToUInt32(cboFBToChange.SelectedIndex));

if(iResult == 0)
{
    lblFBStatus.Text = "Function Block failed to Stop";
}
else
{
    lblFBStatus.Text = "Function Block Stopped";
}
Dim iResult As Int32

'//Stop Function Block in CoreMini
iResult = icsneoScriptStopFBlock(m_hObject, Convert.ToUInt32(cboFBToChange.SelectedIndex))

If iResult = 0 Then
    lblFBStatus.Text = "Function Block failed to Stop"
Else
    lblFBStatus.Text = "Function Block Stopped"
End If

ScriptStartFBlock Method - neoVI API

This method starts the specified function block within a script on a neoVI device.

int _stdcall icsneoScriptStartFBlock(void * hObject, unsigned int iFunctionBlockIndex);
Public Declare Function icsneoScriptStartFBlock Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByVal fb_index As UInt32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoScriptStartFBlock(IntPtr hObject,UInt32 fb_index);

Parameters

hObject

iFunctionBlockIndex

[in] The index value of the function block to start

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

NEOVI_ERROR_DLL_SCRIPT_INVALID_FUNCBLOCK_INDEX = 219

NEOVI_ERROR_DLL_SCRIPT_NO_SCRIPT_RUNNING = 226

Remarks

Examples

int iRetVal;
unsigned long lLastErrNum;

iRetVal = icsneoScriptStartFBlock(hObject, Function_Block_1);
if(iRetVal == 0)
{
    printf("\nFailed to start the function block);
}
else
{
    printf("\nSuccessfully started the function block");
}
Int32 iResult;

//Start Function Block in CoreMini
iResult = icsNeoDll.icsneoScriptStartFBlock(m_hObject, Convert.ToUInt32(cboFBToChange.SelectedIndex));

if (iResult == 0)
{
    lblFBStatus.Text = "Function Block failed to Start";
}
else
{
    lblFBStatus.Text = "Function Block Started";
}
Dim iResult As Int32

'//Start Function Block in CoreMini
iResult = icsneoScriptStartFBlock(m_hObject, Convert.ToUInt32(cboFBToChange.SelectedIndex))

If iResult = 0 Then
    lblFBStatus.Text = "Function Block failed to Start"
Else
    lblFBStatus.Text = "Function Block Started"
End If

ScriptClear Method - neoVI API

This method clears a script from a specific location on a neoVI device.

Parameters

hObject

iLocation

[in] Specifies the physical location of the script to be cleared on the neoVI device. Valid values are:

SCRIPT_LOCATION_FLASH_MEM = 0 (Valid only on a neoVI Fire or neoVI Red)SCRIPT_LOCATION_SDCARD = 1 (Valid only on a neoVI Fire or neoVI Red)SCRIPT_LOCATION_VCAN3_MEM = 4 (Valid only on a ValueCAN 3 device)

These values are defined in the icsnVC40.h file

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

NEOVI_ERROR_DLL_INVALID_SCRIPT_LOCATION = 213

NEOVI_ERROR_DLL_SDCARD_NOT_INSERTED = 214

NEOVI_ERROR_DLL_SDCARD_WRITE_ERROR = 216

NEOVI_ERROR_DLL_SCRIPT_ERROR_CLEARING_SCRIPT = 221

Remarks

If a script exists in the specified location it will be erased from that location. If the script is running it will be stopped. Any function blocks that are running will be stopped.

Examples

Structures, Types, and Defines Overview - neoVI API

ScriptReadAppSignal Method - neoVI API

This method is used to read an application signal from a script running on a neoVI device.

Parameters

hObject

unsigned int iIndex

[in] The index value of the transmit message to read

double *dValue

[in] Contains the current value of the application signal.

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

NEOVI_ERROR_DLL_SCRIPT_INVALID_APPSIG_INDEX = 225

NEOVI_ERROR_DLL_SCRIPT_NO_SCRIPT_RUNNING = 226

Remarks

Examples

ScriptWriteAppSignal Method - neoVI API

This method is used to set the value of an application signal in a script running on a neoVI device.

Parameters

hObject

iIndex

[in] The index value of the application signal.

dValue

[in] The new value of the application signal.

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

NEOVI_ERROR_DLL_SCRIPT_INVALID_APPSIG_INDEX = 225

Remarks

Examples

ScriptGetScriptStatus Method - neoVI API

This method returns the status of the script on a neoVI device.

Parameters

hObject

iFunctionBlockIndex

[in] The index value of the function block

piStatus

[out] 0 = Stopped 1 = Running

Return Values

NEOVI_ERROR_DLL_SCRIPT_NO_SCRIPT_RUNNING = 226

Remarks

Examples

ScriptLoad Method - neoVI API

This method downloads a script to a connected neoVI device into a specified location.

Parameters

hObject

bin[in] An array of bytes that represent a compiled script. These bytes are contained in a header file called cmvspy.h.

This file is created by Vehicle Spy when a script is compiled. Please see Vehicle Spy documentation for details.

len_bytes

[in] Specifies the number of bytes represented by the bin parameter

iLocation

[in] Specifies the physical location to where the script will be loaded on the neoVI device. Valid values are as follows:

SCRIPT_LOCATION_FLASH_MEM = 0 (Valid only on a neoVI Fire or neoVI Red)SCRIPT_LOCATION_SDCARD = 1 (Valid only on a neoVI Fire or neoVI Red)SCRIPT_LOCATION_VCAN3_MEM = 4 (Valid only on a ValueCAN 3 device)

These values are defined in the icsnVC40.h file

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

NEOVI_ERROR_DLL_INVALID_SCRIPT_LOCATION = 213

NEOVI_ERROR_DLL_SDCARD_NOT_INSERTED = 214

NEOVI_ERROR_DLL_SDCARD_WRITE_ERROR = 216

NEOVI_ERROR_DLL_SCRIPT_ERROR_DOWNLOADING_SCRIPT = 220

NEOVI_ERROR_DLL_SDCARD_READ_ERROR = 217

Remarks

Examples

[in] Specifies the driver object created by .

1 if the function succeeded. 0 if it failed for any reason. must be called to obtain the specific error. The errors that can be generated by this function are:

The script containing the specified function block must have been successfully downloaded to the neoVI using . Execution of the script must have been started by . Execution of the function block must have been started using . The valid index values for function blocks within a script can be found in the cmvspy.vs3cmb.h file (Produced by Vehicle Spy. Please see Vehicle Spy documentation).

[in] Specifies the driver object created by .

1 if the function succeeded. 0 if it failed for any reason. must be called to obtain the specific error. The errors that can be generated by this function are:

The script containing the specified function block must have been successfully downloaded to the neoVI using . The valid index values for a function blocks within a script can be found in the cmvspy.vs3cmb.h file that is produced by Vehicle Spy. Please see Vehicle Spy documentation.

[in] Specifies the driver object created by .

1 if the function succeeded. 0 if it failed for any reason. must be called to obtain the specific error. The errors that can be generated by this function are:

Item
Description

[in] Specifies the driver object created by .

1 if the function succeeded. 0 if it failed for any reason. must be called to obtain the specific error. The errors that can be generated by this function are:

The script containing the specified application signal must have been successfully downloaded to the neoVI using . The script must also have been started using . This function will fail if has been called. The valid index values for application signals within a script can be found in the cmvspy.vs3cmb.h file that is produced by Vehicle Spy. Please see Vehicle Spy documentation.

[in] Specifies the driver object created by .

1 if the function succeeded. 0 if it failed for any reason. must be called to obtain the specific error. The errors that can be generated by this function are:

The script containing the specified application signal must have been successfully downloaded to the neoVI using . The script must also have been started using . This function will fail if has been called. The valid index values for application signals within a script can be found in the cmvspy.vs3cmb.h file that is produced by Vehicle Spy. Please see Vehicle Spy documentation.

[in] Specifies the driver object created by .

1 if the function succeeded. 0 if it failed for any reason. must be called to obtain the specific error. The errors that can be generated by this function are:

The script must have been successfully downloaded to the neoVI using .

[in] Specifies the driver object created by .

1 if the function succeeded. 0 if it failed for any reason. must be called to obtain the specific error. The errors that can be generated by this function are:

The script will be stored on the device in the specified location. If the location is SCRIPT_LOCATION_FLASH_MEM or SCRIPT_LOCATION_SDCARD the script will persist in the device in that location until cleared by . If the neoVI device is booted (plugged in to power) without being connected to a USB port the stored script will execute. The location SCRIPT_LOCATION_VCAN3_MEM applies only to the ValueCAN 3 device and the storage will be cleared when power is removed from the device.

OpenNeoDevice
GetLastAPIError
LoadScript
StartScript
StartFBlock
OpenNeoDevice
GetLastAPIError
LoadScript
int _stdcall icsneoScriptClear(void * hObject, int iLocation);
Public Declare Function icsneoScriptClear Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByVal iLocation As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoScriptClear(IntPtr hObject, Int32 iLocation);
int iRetVal;
unsigned long lLastErrNum;
//Clear the script from it's storage location.
//Both SCRIPT_LOCATION_FLASH_MEM and SCRIPT_LOCATION_SDCARD are persistent.
//On a ValueCAN 3, SCRIPT_LOCATION_VCAN3_MEM will clear when the device
//loses power or resets.

iRetVal = icsneoScriptClear(hObject, DefaultScriptLocation);
if(iRetVal == 0)
{
    printf("\nFailed to clear the script);
}
else
{
    printf("\nSuccessfully cleared the script");
}
Int32 iResult;

//clear CoreMini
iResult = icsNeoDll.icsneoScriptClear(m_hObject, Convert.ToInt32(CoreMiniStoreLocation.SCRIPT_LOCATION_FLASH_MEM));

if(iResult == 0)
{
    lblCMStatus.Text = "CoreMini Failed to Clear";
}
else
{
    lblCMStatus.Text = "CoreMini Cleared";
}
Dim iResult As Int32

'//clear CoreMini
iResult = icsneoScriptClear(m_hObject, SCRIPT_LOCATION_FLASH_MEM)

If iResult = 0 Then
    lblCMStatus.Text = "CoreMini Failed to Clear"
Else
    lblCMStatus.Text = "CoreMini Cleared"
End If
int _stdcall icsneoScriptReadAppSignal(void * hObject, unsigned int iIndex, double *dValue);
Public Declare Function icsneoScriptReadAppSignal Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByVal iIndex As UInt32, ByRef dValue As Double) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoScriptReadAppSignal(IntPtr hObject, UInt32 iIndex, ref double dValue);
int iRetVal;
unsigned long lLastErrNum;
double dValue = 0;

iRetVal = icsneoScriptReadAppSignal(hObject, App_Signal_1, &dValue);
if(iRetVal == 0)
{
    printf("\nFailed to read the application signal.);
}
else
{
    printf("\nApplication signal = %f\r\n", dValue);
}
Int32 iResult;
Double ValueToSet=0;

//Read App signal
iResult = icsNeoDll.icsneoScriptReadAppSignal(m_hObject, Convert.ToUInt32(cboAppSig.SelectedIndex),ref ValueToSet);

if (iResult == 0)
{
    txtAppSigVal.Text = "Problem!";
}
else
{
    txtAppSigVal.Text = Convert.ToString(ValueToSet);
}
Dim iResult As Int32
Dim ValueToSet As Double

'//Read App signal
iResult = icsneoScriptReadAppSignal(m_hObject, Convert.ToUInt32(cboAppSig.SelectedIndex), ValueToSet)

If iResult = 0 Then
    txtAppSigVal.Text = "Problem!"
Else
    txtAppSigVal.Text = Convert.ToString(ValueToSet)
End If
int _stdcall icsneoScriptWriteAppSignal(void * hObject, unsigned int iIndex, double dValue);
Public Declare Function icsneoScriptWriteAppSignal Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByVal iIndex As UInt32, ByRef dValue As Double) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoScriptWriteAppSignal (IntPtr hObject, UInt32 iIndex, double dValue);
int iRetVal;
unsigned long lLastErrNum;
double dValue;

dValue = 999;
iRetVal = icsneoScriptWriteAppSignal(hObject, App_Signal_1, dValue);
if(iRetVal == 0)
{
    printf("\nFailed to write the application signal. API Error = %d", lLastErrNum);
}
else
{
    printf("\nApplication signal write succeeded\r\n");
}
Int32 iResult;
Double ValueToSet;

//Set value to send
ValueToSet = Convert.ToDouble(txtAppSigVal.Text);

//Set App Signal
iResult = icsNeoDll.icsneoScriptWriteAppSignal(m_hObject, Convert.ToUInt32(cboAppSig.SelectedIndex), ValueToSet);

if(iResult == 0)
{
    txtAppSigVal.Text = "Problem!";
}
else
{
    txtAppSigVal.Text = "Set!";
}
Dim iResult As Int32
Dim ValueToSet As Double

'//Set value to send
ValueToSet = Val(txtAppSigVal.Text)

'//Set App Signal
iResult = icsneoScriptWriteAppSignal(m_hObject, Convert.ToUInt32(cboAppSig.SelectedIndex), ValueToSet)

If iResult = 0 Then
    txtAppSigVal.Text = "Problem!"
Else
    txtAppSigVal.Text = "Set!"
End If
int _stdcall icsneoScriptGetScriptStatus(void * hObject, unsigned int iFunctionBlockIndex, int *piStatus);
Public Declare Function icsneoScriptGetScriptStatus Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef piStatus As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoScriptGetScriptStatus(IntPtr hObject, ref Int32 piStatus);
int iRetVal;
int iStatus;
unsigned long lLastErrNum;

iRetVal = icsneoScriptGetScriptStatus(hObject, &iStatus);
if(iRetVal == 0)
{
    printf("\nFailed to get the script status. API Error = %d\r\n", lLastErrNum);
}
else
{
    printf("\nScript status = %s\r\n", iStatus == 0 ? "Stopped" : "Running");
}
Int32 iResult;
Int32 iStatus=0;

//Get CoreMini Status
iResult = icsNeoDll.icsneoScriptGetScriptStatus(m_hObject,ref iStatus);

if (iResult == 0)
{
    lblCMStatus.Text = "Failed to get CoreMini Status";
}
else
{
    switch(iStatus)
    {
        case (int)ScriptStates.SCRIPT_STATUS_RUNNING:
            lblCMStatus.Text = "CoreMini Script Running";
            break;
        case (int)ScriptStates.SCRIPT_STATUS_STOPPED:
            lblCMStatus.Text = "CoreMini Script Stopped";
            break;
        default:
            lblCMStatus.Text = "Unhandled State";
            break;
    }
}
Dim iResult As Int32
Dim iStatus As Int32

'//Get CoreMini Status
iResult = icsneoScriptGetScriptStatus(m_hObject, iStatus)

If iResult = 0 Then
    lblCMStatus.Text = "Failed to get CoreMini Status"
Else
    Select Case iStatus
        Case SCRIPT_STATUS_RUNNING
            lblCMStatus.Text = "CoreMini Script Running"
        Case SCRIPT_STATUS_STOPPED
            lblCMStatus.Text = "CoreMini Script Stopped"
        Case Else
            lblCMStatus.Text = "Unhandled State"
    End Select
End If
int _stdcall icsneoScriptLoad(void * hObject, const unsigned char *bin, unsigned long len_bytes, int iLocation);
Public Declare Function icsneoScriptLoad Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef bin As Byte, ByVal Len_Bytes As UInt32, ByVal iLocation As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoScriptLoad(IntPtr hObject, ref byte bin, UInt32 len_bytes, Int32 iLocation);
int iRetVal;
unsigned long lLastErrNum;
unsigned long NumBinBytes;
NumBinBytes = CM_EXE_SIZE; //from the cmvspy.h file. The length of the compiled script
//ucharConfigurationArrayPM is defined in cmvspy.h.
//It is a pointer to the array of compiled script bytes

iRetVal = icsneoScriptLoad(hObject, ucharConfigurationArrayPM, NumBinBytes, DefaultScriptLocation);
if(iRetVal == 0)
{
    printf("\nFailed to load the script into the neo device);
}
else
{
    printf("\nSuccessfully loaded the script into the neoVI");
}
Int32 iResult;
UInt32 iLength=0;
byte[] CoreMiniData=new byte[1];

'//Helper function
iResult = GetCoreMiniData(ref CoreMiniData,ref iLength);

if(iResult != 1)
{
    MessageBox.Show("Problem Loading CoreMini");
    return;
}

iResult = icsNeoDll.icsneoScriptLoad(m_hObject,ref CoreMiniData[0], iLength, Convert.ToInt32(CoreMiniStoreLocation.SCRIPT_LOCATION_FLASH_MEM));

if(iResult == 0)
{
    lblCMStatus.Text = "CoreMini Not Loaded";
}
else
{
    lblCMStatus.Text = "CoreMini loaded into hardware";
}


//Helper function for reading the *.vs3cmbeMini file

private Int32 GetCoreMiniData(ref byte[] DataArray,ref UInt32 DataLength)
{
string sNameOfFile;
System.IO.FileStream ReadFileStream;
System.IO.BinaryReader ReadBinaryData;

    //Open file Dialog
    OpenFileDialog.ShowDialog();
    sNameOfFile = OpenFileDialog.FileName;
    // Check for the file to exist
    if(!System.IO.File.Exists(sNameOfFile)) return 0;
    //Read data in
    try
    {
        ReadFileStream = new System.IO.FileStream(sNameOfFile, System.IO.FileMode.Open);
        ReadBinaryData = new System.IO.BinaryReader(ReadFileStream);
        DataLength = Convert.ToUInt32(ReadFileStream.Length);
        DataArray = ReadBinaryData.ReadBytes(Convert.ToInt32(DataLength));
        ReadFileStream.Close();
        return 1;
    }
    catch(System.Exception ex)
    {
        return 0;
    }
}
Dim iResult As Int32
Dim iLength As UInt32
Dim CoreMiniData(1) As Byte

'//Helper function
iResult = GetCoreMiniData(CoreMiniData, iLength)

If iResult <> 1 Then MsgBox("Problem Loading CoreMini", MsgBoxStyle.OKOnly) : Exit Sub

Select Case iOpenDeviceType
    Case NEODEVICE_VCAN3
        iResult = icsneoScriptLoad(m_hObject, CoreMiniData(0), iLength, SCRIPT_LOCATION_VCAN3_MEM)
    Case NEODEVICE_FIRE
        iResult = icsneoScriptLoad(m_hObject, CoreMiniData(0), iLength, SCRIPT_LOCATION_FLASH_MEM)
    Case Else
        MsgBox("Hardware does not support CoreMini")
        iResult = 0
End Select

If iResult = 0 Then
    lblCMStatus.Text = "CoreMini Not Loaded"
Else
    lblCMStatus.Text = "CoreMini loaded into hardware"
End If

'//Helper function for reading the \*.vs3cmbeMini file
Private Function GetCoreMiniData(ByRef DataArray() As Byte, ByRef DataLength As UInt32) As Int32
Dim sNameOfFile As String
Dim ReadFileStream As IO.FileStream

'//Open file Dialog
OpenFileDialog.ShowDialog()
sNameOfFile = OpenFileDialog.FileName

'// Check for the file to exist
If Not IO.File.Exists(sNameOfFile) Then Return 0
'//get the data length
DataLength = Convert.ToUInt32(FileLen(sNameOfFile))
'//Read data in
Try
    ReadFileStream = New IO.FileStream(sNameOfFile, IO.FileMode.Open)
    Dim ReadBinaryData As New IO.BinaryReader(ReadFileStream)
    DataArray = ReadBinaryData.ReadBytes(Convert.ToInt32(DataLength))
    ReadFileStream.Close()
Catch ex As Exception
    ReadFileStream.Close()
    Return 0
End Try

Return 1
End Function
OpenNeoDevice
GetLastAPIError
OpenNeoDevice
GetLastAPIError
ScriptLoadScript
ScriptStart
ScriptStop
OpenNeoDevice
GetLastAPIError
ScriptLoad
ScriptStart
ScriptStop
OpenNeoDevice
GetLastAPIError
ScriptLoadScript
OpenNeoDevice
GetLastAPIError
ScriptClear

ScriptGetFBlockStatus Method - neoVI API

This method returns the run status of a specified function block within a script on a neoVI device.

int _stdcall icsneoScriptGetFBlockStatus(void * hObject, unsigned int iFunctionBlockIndex, int *piStatus);
Public Declare Function icsneoScriptGetFBlockStatus Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByVal fb_index As UInt32, ByRef piRunStatus As Int32) As Int32
[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoScriptGetFBlockStatus(IntPtr hObject, UInt32 fb_index, ref Int32 piRunStatus);

Parameters

hObject

iFunctionBlockIndex

[in] The index value of the function block to start

piStatus

[out] 0 = stopped 1 = running

Return Values

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

NEOVI_ERROR_DLL_SCRIPT_INVALID_FUNCBLOCK_INDEX = 219

NEOVI_ERROR_DLL_SCRIPT_NO_SCRIPT_RUNNING = 226

Remarks

Examples

int iRetVal;
int iRunStatus;
unsigned long lLastErrNum;

iRetVal = icsneoScriptGetFBlockStatus(hObject, Function_Block_1, &iRunStatus);
if(iRetVal == 0)
{
    printf("\nFailed to check function block status);
}
else
{
    printf("\nFunction block status = %s\r\n", iRunStatus == 0 ? "Stopped" : "Running");
}
Int32 iResult;
Int32 iStatus=0;

//Get Status of Function Block in CoreMini
iResult = icsNeoDll.icsneoScriptGetFBlockStatus(m_hObject, Convert.ToUInt32(cboFBToChange.SelectedIndex), ref iStatus);

if(iResult == 0)
{
    lblFBStatus.Text = "Failed to get CoreMini Status";
}
else
{
    switch(iStatus)
    {
        case (int)ScriptStates.SCRIPT_STATUS_RUNNING:
            lblFBStatus.Text = "CoreMini Function Block Running";
            break;
        case (int)ScriptStates.SCRIPT_STATUS_STOPPED:
            lblFBStatus.Text = "CoreMini Function Block Stopped";
            break;
        default:
            lblFBStatus.Text = "Unhandled State";
            break;
    }
}
Dim iResult As Int32
Dim iStatus As Int32

'//Get Status of Function Block in CoreMini
iResult = icsneoScriptGetFBlockStatus(m_hObject, Convert.ToUInt32(cboFBToChange.SelectedIndex), iStatus)

If iResult = 0 Then
    lblFBStatus.Text = "Failed to get CoreMini Status"
Else
    Select Case iStatus
        Case SCRIPT_STATUS_RUNNING
            lblFBStatus.Text = "CoreMini Function Block Running"
        Case SCRIPT_STATUS_STOPPED
            lblFBStatus.Text = "CoreMini Function Block Stopped"
        Case Else
            lblFBStatus.Text = "Unhandled State"
    End Select
End If

List of Structures for configuring different hardware devices

Structure used by FindNeoDevices and OpenNeoDevice to locate and open neoVI devices

Structure used by FindDevices to find hardware devices

Structure that contains information about neoVI device firmware versions

Message structures used for reading and writing vehicle network messages

Status bitfields in the Message Structures that define specific attributes of the message

Message Structure for Transmit ISO15765 packets

Message Structure for Receive ISO15765 packets

[in] Specifies the driver object created by .

1 if the function succeeded. 0 if it failed for any reason. must be called to obtain the specific error. The errors that can be generated by this function are:

The script containing the specified function block must have been successfully downloaded to the neoVI using . Execution of the script must have been started by using . The valid index values for function blocks within a script can be found in the cmvspy.vs3cmb.h file (Produced by Vehicle Spy. Please see Vehicle Spy documentation).

Setting Structures for hardware
NeoDevice
NeoDeviceEx
stAPIFirmwareInfoStructure
Message Structures
StatusBitFields
stCM_ISO157652_TxMessage
stCM_ISO157652_RxMessage
OpenNeoDevice
GetLastAPIError
ScriptLoadScript
ScriptStartScript
Figure 1 - Add Existing Item From the Add menu C#.NET Menu.
Figure 2 - The C# Dot Net 2010 Example.
Figure 1 - Configuration Manager can be found in the Solution Explorer.
Figure 2 - Configuration Manager
Figure 3 - Creating a new Platform
Figure 4 - Standard Tool bar selecting platform
Figure 1 - The LabVIEW Example.