473,473 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

.Net object in labview

Hi,

In labview 7.1 and 8.0 the .NET controls are introduced. I found several
examples on how to use a .NET object in labview (calculator, Event callback
for data watcher)) But now I want to create my own .NET object in visual
studio but i don't know where to start...

What kind of project should i use?
Is there somewhere on the internet a visual studio sample code of a .NET
object that i can use in labview?

Thanx in advance,

Jos Hermans.
Jan 5 '06 #1
3 8686
Hi,

the best thing to do would be to use C# to create a .NET dll.
start from a new C# dll project, add a Hello World class and take it from
there.
there are lots of good articles to be found on the internet. one of the
places you can go is www.codeproject.com, and of course in MSDN.

C# is a good choice because it was created for .NET, and it is relatively
easy to learn if you know C++ or another object oriented language.

incidently, i am a developer for a NI alliance member, so if you have
problems with the LabVIEW bindings i can help you with that too.

kind regards,
Bruno.
"Jos Hermans" wrote:
Hi,

In labview 7.1 and 8.0 the .NET controls are introduced. I found several
examples on how to use a .NET object in labview (calculator, Event callback
for data watcher)) But now I want to create my own .NET object in visual
studio but i don't know where to start...

What kind of project should i use?
Is there somewhere on the internet a visual studio sample code of a .NET
object that i can use in labview?

Thanx in advance,

Jos Hermans.

Jan 5 '06 #2
Thanx, i managed to run my first .net object with your help!

What i'm trying to do:
I've developped an application in Borland builder 6.0 that gave it's
interface through an automation object to an application developped in
labview 6.1. the automation wrapper will control some hardware (2
motors,
some valves, temp sensors, and so on) and the Labview app will monitor
changes in the hardware. This is done on a polling base, because labview
6.1
could not understand the evenhandlers from the Borland generated
automation
interface.

Now we have the oppertunity to upgrade both programs to Labview 8 and
Visual
studio .net 2005. And of course i want to make my programs up-to-date
and
State of the art with the current developpers tools.

Thats why i want to upgrade to .net objects. So what i'm trying to do is
to
find out what the benefits are, using .net objects. and especailly using
events, so my labview app is not polling for changes.

Is it a good thing to switch to .net objects? or should i rather use
'oldfashioned' COM objects...

Greetings and thanx for your time.

Jos Hermans.
--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Jan 6 '06 #3
In my experience with LabVIEW, i can tell you: stay as far away as possible
from COM and ActiveX.
the problem with those is that they need to be registered in the registry
for LAbVIEW to use them properly.
even then, this will not work on some computers, without anyone ever knowing
why.

..NET is much better in this regard. it will work without much hassle. the
only thing you have to keep in mind is that data types have to be converted
between LabVIEW and .NET. this happens automatically, but has a performance
impact. if you need a way to stream 200 KB per second from one to the other,
you might want to use plain C/C++ dlls. other than that, you should be fine.

another advantage is that you can use the .NET framework in your own code.
the .NET framework is huge, and has lots of very cool features. also, lots
of hardware suppliers (like national instruments itself) are moving away
from COM to .NET because it combines ease of use and power.

using LabVIEW event handlers has less overhead than polling, but keep in
mind that debugging can become harder, especially if you have lots of events
that can get triggered simultaneously. other than that, events are very nice
to use.
also, remember to check which references you have to close explicitly, and
which are closed for you by LabVIEW, because you could have memory leaks
otherwise.

kind regards,
Bruno.

"Jos Hermans" <he********@hotmail.com> wrote in message
news:uw*************@TK2MSFTNGP12.phx.gbl...
Thanx, i managed to run my first .net object with your help!

What i'm trying to do:
I've developped an application in Borland builder 6.0 that gave it's
interface through an automation object to an application developped in
labview 6.1. the automation wrapper will control some hardware (2
motors,
some valves, temp sensors, and so on) and the Labview app will monitor
changes in the hardware. This is done on a polling base, because labview
6.1
could not understand the evenhandlers from the Borland generated
automation
interface.

Now we have the oppertunity to upgrade both programs to Labview 8 and
Visual
studio .net 2005. And of course i want to make my programs up-to-date
and
State of the art with the current developpers tools.

Thats why i want to upgrade to .net objects. So what i'm trying to do is
to
find out what the benefits are, using .net objects. and especailly using
events, so my labview app is not polling for changes.

Is it a good thing to switch to .net objects? or should i rather use
'oldfashioned' COM objects...

Greetings and thanx for your time.

Jos Hermans.
--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com

Jan 6 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bijay Kumar | last post by:
Hi Guys, I was going through the source code of Object.cs in rotor. What I found is Equals() implemented as follows: public extern virtual bool Equals(Object obj); What I don't...
1
by: clusardi2k | last post by:
Hello, I have a shared drive on SGI, Linux, and Windows. The fact that I'm using a shared drive may be mute information. The problem is within the same program a second call to fopen does not...
7
by: clusardi2k | last post by:
Hello, I have a shared drive on SGI, Linux, and Windows. A second call to fopen doesn't create the file if it has been deleted. I would like to use fopen for its pointer return value to...
0
by: Bijay Kumar | last post by:
Hi Guys, I was going through the source code of Object class (Object.cs in rotor). What I found is Equals() implemented as follows: public extern virtual bool Equals(Object obj); What...
1
by: Sebastian Dau | last post by:
Hey NG, We have a LabVIEW application that uses a .NET 1.1 assembly. It was all working good for a long time until we installed .NET 2.0 together with .NET 1.1 on a computer. When the...
2
by: 7777777.chen | last post by:
Hi, In C++ project, I need open excel file and write data to it. Can someone give me some intrusction? Thanks, Sherry
26
by: yb | last post by:
Hi, Is there a standard for the global 'window' object in browsers? For example, it supports methods such as setInterval and clearInterval, and several others. I know that w3c standardized...
3
by: User1014 | last post by:
A global variable is really just a property of the "Global Object", so what does that make a function defined in the global context? A method of the Global Object? ...
0
by: nettrouble | last post by:
Hi, I have no experience on .NET programming, somehow I'm given a project to write a .NET plug-in to get the data from a labVIEW app. which controls two devices. I sort of know how to call .NET...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.