Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Incompatible Codepage Generated by Measurement Studio on a Non-English OS Using Visual C++ 2005

Primary Software: Measurement Studio>>Visual C++ Support
Primary Software Version: 8.0
Primary Software Fixed Version: 8.0
Secondary Software: Driver Software>>NI-DAQmx

Problem:
I am using the NI-DAQmx driver with Microsoft Visual Studio 2005. I am generating NI-DAQmx Visual C++ code using the NI Measurement Studio DAQ Assistant on a non-English Windows OS (Japanese, Chinese, French, Spanish, etc.). My user code is referencing a DAQmx task in MAX, not a project task. When I run DAQ Visual C++ user code, I get failures corresponding to loading the task. I verified that the task name is generated correctly in the user control code. Why is loading the task failing even though everything looks correct?

Solution:
The Visual C++ code generated by the user code is saved with an incorrect codepage. This becomes a problem if your task name has non-English characters in it.

To correct this, re-save the user code Visual C++ files with the correct codepage. Select File»Advanced Save Options in Visual Studio 2005. You can also fix this by using only English characters for your MAX task name and regenerating the user code.

To view a correct codepage, open any of the Visual C++ files other than the ones generated by the Measurement Studio DAQ Assistant. For example, open any of the files that were created when the project was created by Visual Studio 2005. Select File»Advanced Save Option and note the encoding being used. Open the .cpp file that was created with the user code and save it using the latter encoding (the same encoding you noted) through the Advanced Save options.

Related Links:
KnowledgeBase 3DRCDETY: How Can I Use a NI-DAQmx Task and the DAQ Assistant With Microsoft Visual Studio .NET Programming?

Attachments:

 






Report Date: 08/02/2006
Last Updated: 12/04/2008
Document ID: 3ZECT600

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit