Gui application for embedded system

I am asking this here since you have probably met the problem. I have developped an embedded system that has a serial link (RS232) as user interface. So far we used a terminal to communicate but I now need to develop a gui application for windows 7.

I have tried doing that with Excel with a commercial active X but I get an "acces denied" error when I open the port.

I have also tried python with serial python but there are installation issues.

What would you suggest as a solution?

Reply to
Lanarcam
Loading thread data ...

Why? Are you planning on doing some additional (pre- or post-) *processing* on the Windows 7 side? Or, to layout the information in a more visible "structure" (e.g., like a "form" instead of "streaming text")? Or, just to make it pretty-pretty?

What will you do in the *absence* of a Windows 7 "client"? Will your device be usable? Or, is the W7 machine to be considered *the* user interface?

I've had some success using curses-based presentations. This can provide dialogs, menus, etc. -- many of the same "controls" (widgets) that you would typically find in a GUI "form" -- but without all the overhead

*nor* the "external Windows computer" requirement. [i.e., you could continue to use your device with a dumb terminal, an ANSI terminal, a terminal emulator, "Hyperterm", etc. and have a consistent appearance]
Reply to
Don Y

Fighting through the installation issues. Python, PySerial, and PySide are exactly how I attack similar problems when I have to do such things here.

--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com 
Email address domain is currently out of order.  See above to fix.
Reply to
Rob Gaddi

We need a more user friendly access, for instance, there is a time setting command that requires the user to enter the time in a given format such as: "TIME XX YY ZZ". A gui user interface would control the numbers ( 0 < XX < 24) format the string and send it on the serial link.

There is also the possibility of postprocessing the data to form tables or graphs. (The data are mainly time stamped digital and analog inputs.

Yes, it stores the data on a SD card which can be later transferred on a PC. (we use the FAT32 format).

However, there is also a "programming" interface that can be used to trigger actions or recordings.

Yes.

I will have a look. We need however to run the user application on Windows 7, that is a requisite.

Reply to
Lanarcam

Thanks for that, I will fight through ;)

Reply to
Lanarcam

Whatever you do, if it's with Windows (or Linux for that matter) you'll be fighting the installation issues.

--
Tim Wescott 
Wescott Design Services 
 Click to see the full signature
Reply to
Tim Wescott

Why on earth would you want to use Excel as a base?

If you want to use Windows to run the management application, just download one of the Visual Studio Express versions from MS (free), and use VB.NET (I'm thinking you might be familiar with VBA, which is why you're thinking Excel, and VB.NET would be most similar), or use C#, which is definitely a better language. And there are a million articles on accessing the serial post from C# (probably VB.NET too), but just starting with the System.IO.Ports.SerialPort documentation from MS isn't that hard.

Of course you may want to consider if you really want to tie yourself to Windows to manage your device, but that's a different issue, and if you've already decided that, it's moot.

Reply to
Robert Wessel

Have a look at Qt .

You can write your program and compile it for Windows or Linux without any changes. It comes with an IDE (QtCreator). For Windows you can use MingGW as a compiler. It is (L)GPL. That means you can keep your source secret and deploy the relevant libs. Installation on customers Windows PC consists of copying the relevant EXE and DLLs into one directory.

Beware, it's huge and the learning curve is steep. The documentation is excellent. But it's worth the effort if you will use it for more projects.

--
Reinhardt
Reply to
Reinhardt Behm

...

I warmly recommend following this suggestion. I did one gas analyzer calibration system with Excel and VBA, which was a bad idea.

It took some time to get used to the VS (I mostly code in bare metal/Linux/web world), but after that VS has served me well for developing small GUI apps whenever native Windows has been the requirement.

And if you use just the MS supplied class libraries, VSE will create an installation package and everything for you.

--
Mikko OH2HVJ
Reply to
Mikko OH2HVJ

For things like this I usually create a GUI using Java and RXTX.

Bye Jack

--
Yoda of Borg am I! Assimilated shall you be! Futile resistance is, hmm?
Reply to
Jack

I would suggest tcl/tk for a very rapid solution, with GUI and a flexible serial interface. While not the latest and greatest scripting language, (sic Python/Kivy), the learning curve is simple, the widgets are built in, and it runs on Windows, Linux, Unix and various.

HTH, Cheers, Rob.

Reply to
Spam

And it comes with support for serial ports (QSerialPort class) out of the box, so you won't have to deal with the native API calls. A potential downside is that you have to program in C++, which has its own rather steep learning curve.

Reply to
Dombo

OTOH, if you already know C++ it's a nice environment.

I didn't know it had the serial port class -- I'll be able to use that within the next month, if it has the features I need.

--
Tim Wescott 
Control system and signal processing consulting 
 Click to see the full signature
Reply to
Tim Wescott

It did not have the feature to ask how many bytes in the send-buffer. Only in case you like to switch the direction of RS485. .-)

Olaf

Reply to
Olaf Kaluza

I also second this recommendation. Been using it for a couple of months and I just love it! VERY powerful!

If you know C++, I wouldn't say it's difficult to learn how to use - just perhaps a little time-consuming. And the documentation IS excellent.

--
Randy Yates 
Digital Signal Labs 
 Click to see the full signature
Reply to
Randy Yates

I would like to thank all of those who have answered and provided good advice. I am still undecided, but I think I will try the C# way since it appears rather easy and since I don't need a multi platform solution and I won't spend too much time on it, hopefully.

Qt seems interessant also, I know C++ and I will look into that, as a second choice.

Reply to
Lanarcam

Thanks! It's good to know there's serial port support built in now. I remember we had to find a separate serial qclass for a small Qt project back in

2011.
Reply to
Anssi Saari

--
Randy Yates 
Digital Signal Labs 
 Click to see the full signature
Reply to
Randy Yates

Well... ;)

I have been able today to install the dev environment which is free and develop a first interface with a text window to display the messages exchanged and two combo boxes for the selection of the ports and the speed. I could also make a test with a loopback serial interface (two virtual ports).

It is rather easy, you find a lot of information on the web. I am not a fan of windows but I must admit that that environment looks professional, you can even deploy an installation in one click.

I will see if it works, I can't test it here, I must send it to another person, not the best conditions but that's how it is.

Reply to
Lanarcam

Well I guess I can't argue with results.

--
Randy Yates 
Digital Signal Labs 
 Click to see the full signature
Reply to
Randy Yates

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.