Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Windows CE device application from visual studio 2008 for ni-visa usage

Hi,

 

I am working on an application that is about communication of windows CE 5.0 based device with an instrument,spectrum analyzer. The windows CE 5.0 based device is BEGA220A, u can see it from the following link http://www.bolymin.com.tw/Embeddeddetail.asp?productid=183.

I am trying to develop that application on visual studio 2008 with C# language.

 

First of all, i have developed that application to be worked on my laptop not CE based device BEGA220a.

So, i installed ni-visa 4.3 and followed instruction on the following tutorial "C# and Visual Basic .Net Instrument Control Tutorial" with link http://zone.ni.com/devzone/cda/tut/p/id/2739 .

Up to now everthing is ok, i have succeeded communication with the instrument from my laptop using visual studio 2008 C# and ni-visa 4.3.

 

Then i created new project from the visual studio 2008 for windows CE target and developed application. However, the application did not work on BEGA220A with the following error:

"System.MissingMethodException was unhandled
Message: The version of the assembly System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089 cannot be loaded by
this version of the Microsoft .NET Compact Framework"

 

After some searching on the web,  NationalInstruments.Common and NationalInstruments.VisaNS references that i added to my project are desktop dll, so windows CE device does not recognise them.

 

So, Is there any way to use "NationalInstruments.Common and NationalInstruments.VisaNS" references in my windows CE target project? In other words, Are there windows CE version of these references?

 

If not,

to communicate with instrument from windows CE device, is vis32.lib and visa32.h usage solution?

If yes, Can i add them ito visual studio C# or they should be added C++?

 

Maybe my statements are quite long but i want to explain my situation clearly.

I need your suggestions.

Pls help me.

 

Thanks

 

 

 

 

0 Kudos
Message 1 of 7
(6,485 Views)

Hi,

 

i need some help???

0 Kudos
Message 2 of 7
(6,477 Views)

Hi tibo06,

 

The first thing to check here is that NI-VISA is actually installed on your touch-panel device. It sounds like you've installed the drivers on your laptop but not on the Windows CE device itself. This may be why it says you are missing references. 

 

One of our forum threads discusses this installation. Find the link here. Also, here is the link to our NI-VISA 4.3 download page (the most recent version that supports CE), in case you need it.

http://joule.ni.com/nidu/cds/view/p/id/988/lang/en

 

Following this installation, you should be able to make the VISA calls. Be sure that you are not creating your application in .NET 4.0 as this will cause issues with the driver. 3.0 should be fine. Also, I would recommend using C# as your language.

Matt J - NI Tools Network
0 Kudos
Message 3 of 7
(6,462 Views)

Hi Matt,

 

thank you for your reply and i am sorry for late response. I completed my first application in visual C++ using visa32.h and lib files and it is working without any problem. But, i still want to switch C# because of ease of code-writing. When i wrote my problem to here, i had installed NI-VISA 4.3 drivers into my touch-panel device using "Windows CE for ARM Driver Installation" tool from National Instruments. But, as i said before, in my C# smartdevice project i have added "NationalInstrument.Common.dll" "NationalInstruments.VisaNS.dll" files to references. Building projects with those files is successfull, but when application run in my touch-panel device, it gives an error which i wrote before.

When i installed NI-VISA into touch-panel device, i can see some dll files like visa32.dll,NiViUsb.dll etc.. in my touch-panel device. NationalInstrument.Common.dll" "NationalInstruments.VisaNS.dll" files which i added to my C# project do not exist in my touch-panel device. It maybe problem i do not know exactly, because i am also beginner in developing application for winCE devices.

I do not know what i should do. If i can not find any solution, i have to continue my application with C++.

thanks for your suggestion and considerations. If you have any other suggestion, i will be pleased.

 

Regards,

0 Kudos
Message 4 of 7
(6,431 Views)

Hello tibo06,

 

I have a few additional questions.  Are the dlls registered in Windows CE?  If not, have you tried registering them?  Also, make sure you are pointing to the dlls correctly.

Michael B.
Applications Engineer
0 Kudos
Message 5 of 7
(6,412 Views)

Hi Michael,

 

firstly thank you for your considerations. Actually, dll files referenced to C# projects are not registered Windows CE, i will try to make this issue and then i will come back you for result. thanks..

0 Kudos
Message 6 of 7
(6,380 Views)

Hello tibo06,

 

You're welcome.  Let us know what the results are.

Michael B.
Applications Engineer
0 Kudos
Message 7 of 7
(6,373 Views)