EmbeddedRelated.com
Forums

Gui application for embedded system

Started by Lanarcam June 26, 2014
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?
On 6/26/2014 1:18 PM, Lanarcam wrote:
> 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.
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]
> 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?
On Thu, 26 Jun 2014 22:18:38 +0200
Lanarcam <lanarcam1@yahoo.fr> wrote:

> 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?
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.
Le 26/06/2014 22:44, Don Y a &#4294967295;crit :
> On 6/26/2014 1:18 PM, Lanarcam wrote: >> 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. > > 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?
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.
> > What will you do in the *absence* of a Windows 7 "client"? > Will your device be usable?
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.
> Or, is the W7 machine to be > considered *the* user interface?
Yes.
> > 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 will have a look. We need however to run the user application on Windows 7, that is a requisite.
> > [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] > >> 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? >
Le 26/06/2014 22:54, Rob Gaddi a &#4294967295;crit :
> On Thu, 26 Jun 2014 22:18:38 +0200 > Lanarcam <lanarcam1@yahoo.fr> wrote: > >> 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? > > Fighting through the installation issues. Python, PySerial, and PySide > are exactly how I attack similar problems when I have to do such things > here. >
Thanks for that, I will fight through ;)
On Thu, 26 Jun 2014 13:54:06 -0700, Rob Gaddi wrote:

> On Thu, 26 Jun 2014 22:18:38 +0200 Lanarcam <lanarcam1@yahoo.fr> wrote: > >> 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? > > Fighting through the installation issues. Python, PySerial, and PySide > are exactly how I attack similar problems when I have to do such things > here.
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 http://www.wescottdesign.com
On Thu, 26 Jun 2014 22:18:38 +0200, Lanarcam <lanarcam1@yahoo.fr>
wrote:

>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?
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.
Lanarcam wrote:

> 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?
Have a look at Qt <https://qt-project.org/>. 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
Robert Wessel <robertwessel2@yahoo.com> writes:
> On Thu, 26 Jun 2014 22:18:38 +0200, Lanarcam <lanarcam1@yahoo.fr> >>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.
...
>>What would you suggest as a solution?
> 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.
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
Lanarcam <lanarcam1@yahoo.fr> wrote:

> 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?
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?