Jump to content

dotNET 2.0 Serial Interface


Phillip Brooks

Recommended Posts

I've been playing with .NET in my spare time, The list of new features in the .NET framework v 2.0. includes a SerialPort class.

I've read about some people being dissapointed with having to use VISA in order to access Serial devices; could this new .NET class be used to create a replacement for the old Serial Read/Write functions?

Simple example of Serial I/O using C#.NET

What's Playing? From MS Coding4Fun

Link to comment
I've been playing with .NET in my spare time, The list of new features in the .NET framework v 2.0. includes a SerialPort class.

I've read about some people being dissapointed with having to use VISA in order to access Serial devices; could this new .NET class be used to create a replacement for the old Serial Read/Write functions?

Simple example of Serial I/O using C#.NET

What's Playing? From MS Coding4Fun

Talk about installation size! VISA is small compared to .Net 2.0!! The only reason not to use VISA was really the very restrictive licensing and runtime costs. NI changed this licensing recently and now I do not see a pressing need to replace VISA with yet another even bigger monster. Besides you are not allowed to install .Net on anything but a genuine Windows system anyhow and for .Net 2.0 I would guess it better had to be XP or better or it won't install anyhow.

Rolf Kalbermatter

Link to comment

I have to agree with Rolf, allthough it is interesting, as a substitute for VISA -> .NET is a move in the wrong direction. What is needed is a very small add-on for serial. An open-source generic C codebase with both source and binary code. Windows DLL, Shared Libraries for Linux and OS-X using identical function names and a OurSerialLib.* name for the library so that the LabVIEW Call-Library node will use the wildcards and we get some semi-platform independence.

Anything else and we might as well stick with VISA since we already have it.

Link to comment

I agree with your observations, and wasn't aware of the change to allow NI-VISA distribution with a compiled application. I always use some sort of NI hardware (GPIB, etc) so licensing has never been an issue for me. I remembered complaints by LV developers who use serial interfaces, and after reading about the SerialPort class in .NET 2.0 put 2 and 2 together, got 5 :D , and thought to ask the question.

I did revisit the M$ site and checked the OS support for .NET 2.0.

Supported Operating Systems:

Windows 2000 Service Pack 3

Windows 98

Windows 98 Second Edition

Windows ME

Windows Server 2003

Windows XP Service Pack 2

That doesn't mean it will PERFORM, but it SHOULD at least work. The later versions of NI-VISA only support NT, 2000 and XP. The .NET download is ~22 MB, and required available disk space is listed as 280 MB. The NI-MAX download is ~15 MB, the MAX folder on my PC is ~201 MB.

I noticed that NI makes reference to an open source project called Mono that intends to offer .NET support for Linux and Mac; but I don't understand how it would be called from LabVIEW.

Link to comment

The old old serial driver files from NI, before VISA, were very small. I don't recall the exact size, a couple dozen K I think. Certainly orders of magnitude less than VISA or NET. That would be a nice solution. A friend at another company did some asking and complaining to NI and eventually was told how you can use the older serial files with newer versions of LabVIEW. For him, part of the whole issue revolved around the loss of single file executables after 5.1 and support for Win98. I forget the details, but bottom line is that there is a way to use the older serial drivers, and there should also be a way to use a small open source serial library codebase if someone really needed it.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.