Author Topic: AdvancedHMI on a Raspberry Pi  (Read 130296 times)

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: AdvancedHMI on a Raspberry Pi
« Reply #60 on: July 13, 2016, 01:42:58 PM »
Has anyone tried Windows 10 IoT on the Pi with AHMI?
Windows 10 IoT requires UWP applications which is a different UI and framework. I have been gradually modifying the drivers so the will also work in UWP apps, but they are not quite there yet.

DanieLoche

  • Guest
Re: AdvancedHMI on a Raspberry Pi
« Reply #61 on: August 25, 2016, 06:47:07 AM »
Hello,

Just wanted to give the following link, that gives clues about the issue using Modbus RTU on a Raspberry Pi (or more generally on any no-windows device, through mono).
http://stackoverflow.com/questions/7393818/serialport-in-mono-in-linux-not-responding-to-datareceived-event

The issue is that mono do not handle the data received events for SerialPort. This post explains 3 ways to "solve" that.

Also, here are the related state of mono about Serial communication :
http://www.mono-project.com/archived/howtosystemioports/
Indeed the ReceivedBytesThreshold method is not implemented and might be implemented manualy I suppose...
« Last Edit: August 25, 2016, 06:49:04 AM by DanieLoche »

Wayne

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #62 on: October 18, 2016, 11:12:36 PM »
Has anyone tried Windows 10 IoT on the Pi with AHMI?
Windows 10 IoT requires UWP applications which is a different UI and framework. I have been gradually modifying the drivers so the will also work in UWP apps, but they are not quite there yet.

How's that coming ?  Dying to try AHMI on an R Pi 3 with their touchscreen and ModBus comms....................................

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: AdvancedHMI on a Raspberry Pi
« Reply #63 on: October 18, 2016, 11:29:48 PM »
How's that coming ?  Dying to try AHMI on an R Pi 3 with their touchscreen and ModBus comms....................................
The ControlLogix driver for Widows10 IOT is in the works. But you can still use all of the current existing with the standard Pi image (Image) by using Mono.

Wayne

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #64 on: October 30, 2016, 11:48:39 PM »
Looking to tap the infinite knowledge here...........

Have AHMI running on a R Pi 3 (running Raspian/Jessie).

Having a problem establishing comms between the Pi/AHMI app and the PLC via ModbusRTU.    Modbus RTU driver wants "Com1, 2, 3", but Pi/Raspbian doesn't define USB ports that way. 

Anyone have a solution to offer ?

Wayne

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #65 on: November 01, 2016, 11:28:01 PM »
@Archie
In the ModbusRTU definition, where the com port is declared, can ANY string be used there, or is it restricted to "COM1, COM2, etc." ?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: AdvancedHMI on a Raspberry Pi
« Reply #66 on: November 02, 2016, 06:47:50 AM »
@Archie
In the ModbusRTU definition, where the com port is declared, can ANY string be used there, or is it restricted to "COM1, COM2, etc." ?
The driver does not put any restrictions on the value, that value is passed directly to the SerialPort object:

https://msdn.microsoft.com/en-us/library/system.io.ports.serialport.portname(v=vs.110).aspx

According to this older Mono documentation, the SerialPort implementation is not complete which would cause the serial drivers to not work:

http://www.mono-project.com/archived/howtosystemioports/


Wayne

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #67 on: November 27, 2016, 11:27:45 AM »
Archie;

Is there a chance that Mono has developed any further since the referenced article (2011) ?

I found this from 2013, but it's mostly Greek to me...............

http://antanas.veiverys.com/mono-serialport-datareceived-event-workaround-using-a-derived-class/

Wayne

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: AdvancedHMI on a Raspberry Pi
« Reply #68 on: November 27, 2016, 12:00:00 PM »
Is there a chance that Mono has developed any further since the referenced article (2011) ?

I found this from 2013, but it's mostly Greek to me...............

http://antanas.veiverys.com/mono-serialport-datareceived-event-workaround-using-a-derived-class/
I really don't keep up with the Mono framework, so I'm not sure if anything has been changed. Since Microsoft bought Xamarin, that may have brought on some changes.

robs745

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #69 on: December 08, 2016, 12:51:38 PM »
I have created a Dataliner using Advanced HMI 3.99 and it works great on my windows computer but i want to get it running on Raspberry Pi 3.  I ran through the steps from the beginning of this post but it doesn't want to work. The following is the response i get back from it:

root@raspberrypi:/home/pi/AdvancedHMI/bin/Debug# mono DataLiner.exe

Unhandled Exception:
System.InvalidOperationException: WinForms_SeeInnerException ---> System.InvalidProgramException: Method MfgControl.AdvancedHMI.MainForm:InitializeComponent () is too complex.
  at MfgControl.AdvancedHMI.MainForm..ctor () [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at MfgControl.AdvancedHMI.My.MyProject+MyForms.Create__Instance__[MainForm] (MfgControl.AdvancedHMI.MainForm Instance) [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyProject+MyForms.get_MainForm () [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyApplication.OnCreateMainForm () [0x00000] in <filename unknown>:0
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun () [0x00000] in <filename unknown>:0
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run (System.String[] commandLine) [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyApplication.Main (System.String[] Args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: WinForms_SeeInnerException ---> System.InvalidProgramException: Method MfgControl.AdvancedHMI.MainForm:InitializeComponent () is too complex.
  at MfgControl.AdvancedHMI.MainForm..ctor () [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at MfgControl.AdvancedHMI.My.MyProject+MyForms.Create__Instance__[MainForm] (MfgControl.AdvancedHMI.MainForm Instance) [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyProject+MyForms.get_MainForm () [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyApplication.OnCreateMainForm () [0x00000] in <filename unknown>:0
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun () [0x00000] in <filename unknown>:0
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run (System.String[] commandLine) [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyApplication.Main (System.String[] Args) [0x00000] in <filename unknown>:0
root@raspberrypi:/home/pi/AdvancedHMI/bin/Debug#[/color]

I would really appreciate it if anyone had any thoughts on what i could be doing wrong or if i need to change something to allow it to operate on raspberry pi.

Thanks

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #70 on: December 08, 2016, 01:09:00 PM »
Check reply #46 to see if that might help remove any errors.

You should read all the posts in this topic since some might provide clues related to your setup.

bachphi

  • Hero Member
  • *****
  • Posts: 671
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #71 on: December 10, 2016, 10:54:26 AM »
Would a USB barcode scanner that act as a keyboard work on AAHMI-Pi ?  TIA.
===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================

ShawnE

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #72 on: December 13, 2016, 01:28:21 PM »
Hi All,

New here and I have a question. I am running a Ras Pi 3 w/ the official 7" touch screen. I have gotten OpenPlc and AHMI 3.99s running on it. I'm running AHMI under mono 3.2.8 and the latest Raspian Jesse. I see the same problem that you can see in the screenshot in the 1st post. The desktop bleeds through the background in the tank and pipe controls. I've tried all the variants of background images and fills on the main form and the individual components to no avail.

BTW, I don't see this behavior when running the solution on a Win7 machine. While I have an ugly workaround (make the main form a solid color and the desktop the same color with no icons) and can live with it if necessary, I was wondering if there might be a solution or if this is just a limitation of the way mono handles the transparency in the components.

Thanks,
Shawn
 

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: AdvancedHMI on a Raspberry Pi
« Reply #73 on: December 13, 2016, 07:00:28 PM »
Since this "bleed through" is actually a problem with Mono and not AdvancedHMI, you may get better feedback from the Mono Winforms bug reporting:

http://www.mono-project.com/docs/gui/winforms/

ShawnE

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #74 on: December 14, 2016, 09:45:35 AM »
Thanks Archie. That is what I thought. After searching the Mono Bugzilla, I didn't find a report that matched. I'm not going to do a bug report for an ancient Mono release. Since this is a hobby project, I'll go old school and not use any of your controls that have this issue. I can always draw something and use it as an image if I really need it.

As an aside, Mono is in the 4.xx series now, but mono-vbnc is broken against it. I really don't want to go through the change of life trying to build it against the new runtime. I think that I'll just concentrate on making OpenPlc talk to my external hardware and adding a Mqqt to Modbus-TCP gateway on the Pi.

AHMI and OpenPlc make a pretty cool and cheap stand alone controller. Thanks for releasing AHMI as a semi open source project.