Home > Software > Programming and SDK > Forum > Sample Program - C# Express 2013

Sample Program - C# Express 2013

Dec 16, 2014
Jim wrote
I am running into issues running the .NET sample program with C# Express 2013. Any tips on how to debug the problem?

Jim
Reply
4 Answers
Dec 16, 2014
Ken agent wrote
From what link did you download the sample program? What hardware model, interface, and operating system are you using? Is it 32 or 64-bit, and are you compiling 32-bit code? What error messages are you getting? Does WinDaq acquisition run on that hardware?
Dec 17, 2014
Jim wrote
Ken,

Here are my project details:
- DI-145, firmware version 1.15, via USB
- OS: Win 7 64 bit
- Console app is being compiled for x86
- SDK was downloaded from DI-145 Software Tab (http://www.dataq.com/products/di-145/#nested-tab-3)

I have been able to connect to the device using Termite (using the commands supplied in "Defining the DI-145 Protocol") and WinDaq. When I run the code, I receive error no. 28 when the following script is run:

try
{
// append data to file
w.Append(data, (uint)data.Length);
}
catch (Dataq.ErrnoException e)
{
Console.WriteLine("Errno: {0}", e.Errno);
w.Close(false);
return;
}

Also, is there any additional documentation for C# programming?

Jim
Dec 17, 2014
Ken agent wrote
A bug in the Append function was discovered and fixed last Friday, but updated installations have not yet been released. To update your current installation, download files www.dataq.com/support/downloads/DLLs.zip and "www.dataq.com/support/downloads/DATAQ Instruments SDK Beta Web Setup.zip" to a separate directory. Unzip both files, then while logged in as an Administrator copy Release-i686\libdifile-1.dll to C:\WIndows\SysWOW64 and Release-x86_64\libdifile-1.dll to C:\Windows\System32. Then double-click partial installation
"DATAQ Instruments SDK Beta Web Setup.exe" and install into the same directory as you did previously.

I am not aware of additional Dataq documentation for C# programming beyond the contents of the \Documentation subdirectory.
Dec 18, 2014
Jim wrote
Thanks, Ken. Everything works now!