From: OspreySoft LLC [OspreySoft@Comcast.net]
Sent: Monday, March 16, 2009 12:45 PM
To: ospreysoft@comcast.net
Subject: FW: Neofox Labview Files

Attachments: image001.png; image002.jpg

 

 


From: Ben Caswell [mailto:Ben.Caswell@oceanoptics.com]
Sent: Friday, February 27, 2009 11:43 AM
To: OspreySoft@Comcast.net
Cc: Ben Caswell; Monde Qhobosheane; Tom Scharf
Subject: RE: Neofox Labview Files

 

Hi Moshe,

 

There is one additional note. This one’s a bit complicated. It involves the “DeviceOpenChannel(…)” function. Here is the process that you should use in order to open multiple devices connected to the same computer.

 

 

So, if you are only going to open device handles once in the program, with all 8 Neofoxes plugged in, then you would use the following code. Hope this little example helps.

 

void BasicTest()

{

      int     hDevice[8];

      char    lpchName[500]; //500 is an arbitraty length

      char    lpchO2[500];

      int     nIndex;

 

 

      //Tell the DLL to create a worker thread

      ApplicationStartup(NULL);

 

      //Tell the DLL to create a list of unopened Neofox units

      //--2457 - OOI Vendor ID (always use this value)

      //--3000 - Neofox Product ID (always use this value)

      //--FALSE - Don't show GUI (always use this value)

      DevicePerformDiscovery(0x2457, 0x3000, FALSE);

 

      nIndex = 5;

      for (nIndex = 0; nIndex < MAX_NUM_NEOFOXES; nIndex++)

            //nIndex is the "Select" parameter. Cross referenced with

            //          the indexes returned in DevicePerformDiscovery

      {     hDevice[nIndex] = DeviceOpenChannel(nIndex, 0, FALSE); }

 

      for (nIndex = 0; nIndex < MAX_NUM_NEOFOXES; nIndex++)

      {

            if (hDevice[nIndex])

            {    

                  DeviceGetParameter(hDevice[nIndex], NEOFOX_NAME, lpchName);

                  DeviceGetParameter(hDevice[nIndex], NEOFOX_OXYGEN, lpchO2);

                  printf(lpchName);

                  printf(":");

                  printf(lpchO2);

                  printf("\n");

            }

      }

 

      for (nIndex = 0; nIndex < MAX_NUM_NEOFOXES; nIndex++)

            if (hDevice[nIndex])

                  DeviceClose(hDevice[nIndex]);

 

      ApplicationShutdown();

 

}

 

OUTPUT IS (For 2 neofoxes):

 


 


From: Ben Caswell
Sent: Thursday, February 26, 2009 7:46 PM
To: 'OspreySoft@Comcast.net'
Cc: Monde Qhobosheane; Harish Dabhi; Mahmoud Shahriari
Subject: Neofox Labview Files

 

Hi Moshe,

 

I have included a sample Labview application. I’m not sure that it is quite what you are looking for, so I am going to try to send you an email tomorrow regarding implementation of this device. If you feel comfortable using the DLL calls as included, then that’s great. Otherwise, don’t worry about it. I will write some wrappers if you need them. I just wanted to get this out the door to give you something to work with.

 

Included, you will find Neofox.dll, Neofox.h, NeofoxProtocol.h, and DLLTest2.vi.  You will need to either put Neofox.dll into your system32 folder or add its folder to you path environment variable in order to get it to work. The important functions are shown in the VI that I have attached. You can see their prototypes in the Neofox.h header file. I have also included comments on their use in the VI itself.

 

Lets plan on talking tomorrow morning to make sure that we are on the same page. Thanks again for your help.

 

+Ben