PDA

View Full Version : language suggestion



vortmax
April 7th, 2011, 12:17 AM
I'm developing a program to interface with a piece of hardware over serial ports. I just spent all day writing an interface in labview only to figure out I can't use it due to version mismatch (and I'm not buying a $$$$ license to fix it). Since I have to code the serial port conversation by hand in labview, the only thing that program is giving me is a nice GUI. This is making me seriously consider ditching labview and rolling my own code...I'm just not sure what language to choose.

I need it to have solid GUI capabilities and be able to be compiled into a static windows executable (I want to avoid extraneous dependencies). Java might be an option but I don't know Java at all.

Any suggestions?

VernonA
April 8th, 2011, 06:43 PM
Java's support for serial ports is poor at best. Sun used to provide a javax.comm package but I don't think it is available any more. There may be a 3rd party lib available, but I don't know of one.
The best language for controlling hardware is C, and you will find a ton of code examples and libraries available for serial comms. When you want to add a GUI to C, that complicates things. You need to find a good library to help you out, and I suggest you start Googling. You can also search in these threads since "what's the best way to get a GUI" is a popular point of debate. To get you started have a look at Qt, wxWidgets and GTK+.

v1ad
April 9th, 2011, 02:09 AM
C is very good on the hardware layer.

youbuntu
April 9th, 2011, 02:15 AM
C is very good on the hardware layer.

+1, as almost every other language is based on C (apart from ASM, of course)

myrtle1908
April 9th, 2011, 03:28 AM
Java's support for serial ports is poor at best. Sun used to provide a javax.comm package but I don't think it is available any more. There may be a 3rd party lib available, but I don't know of one.

It's still available ...

http://www.oracle.com/technetwork/java/index-jsp-141752.html

http://en.wikibooks.org/wiki/Serial_Programming/Serial_Java

CptPicard
April 9th, 2011, 01:02 PM
+1, as almost every other language is based on C (apart from ASM, of course)

These kinds of statements need closer inspection. Conceptually speaking, yes, a lot of imperative programming languages have borrowed C's syntax for their basic constructs, but that's pretty trivial.

I guess what you're after is the idea that other languages somehow "run on" C, because, say, a lot of language interpreters are written in C. Whether this makes the language itself in any way "based on C" is IMO a questionable proposition... any Turing-complete language can be implemented on top of any other Turing-complete language. Higher-level languages are not "coupled" to C or "hosted on it" in the way that this seems to suggest.

Jonas thomas
April 10th, 2011, 12:14 AM
I'm developing a program to interface with a piece of hardware over serial ports. I just spent all day writing an interface in labview only to figure out I can't use it due to version mismatch (and I'm not buying a $$$$ license to fix it). Since I have to code the serial port conversation by hand in labview, the only thing that program is giving me is a nice GUI. This is making me seriously consider ditching labview and rolling my own code...I'm just not sure what language to choose.

I need it to have solid GUI capabilities and be able to be compiled into a static windows executable (I want to avoid extraneous dependencies). Java might be an option but I don't know Java at all.

Any suggestions?

What kind of hardware???

Jonas thomas
April 10th, 2011, 06:05 AM
I was curious to see if there where open source alternatives to labview and I ran across this little gem of a thread..
Very interesting reading. Original post in 2007 and still going strong.
http://jshoer.wordpress.com/2007/08/03/why-i-hate-despise-detest-and-loathe-labview/

slavik
April 10th, 2011, 06:42 AM
write it in C and make it a library. :)