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

johwaa

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #15 on: April 15, 2015, 06:59:59 PM »
Sounds like a mission statement that I have heard in the past a time or two. I prefer to get my motivation from here:

http://www.despair.com/

daveyh

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #16 on: June 08, 2015, 12:12:21 PM »
Any hope of getting OPC support?

>>- You cannot use an OPC server because it is not a .NET application

daveyh

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #17 on: June 08, 2015, 12:22:10 PM »
What about running Windows 10 on the Pi? Would that work?

Thanks


>Any hope of getting OPC support?

>>>- You cannot use an OPC server because it is not a .NET application

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: AdvancedHMI on a Raspberry Pi
« Reply #18 on: June 08, 2015, 12:40:34 PM »
Any hope of getting OPC support?

>>- You cannot use an OPC server because it is not a .NET application
OPC is ActiveX technology based on Windows only. It won't work easily on any other OS. I'm not sure how much Windows 10 continues to support ActiveX. It is still up in the air whether Windows 10 on the Pi will be able run AdvancedHMI. All of the visual controls are based on WinForms and it looks like Windows 10 will be focused on Universal Apps.

Zip

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #19 on: August 10, 2015, 09:14:14 AM »
Hi Archie,
                  I am hoping to connect use AHMI on an RPi connected to a plc communicating via ModbusRTU. I have been using this perfectly from PC and i am fairly sure my issue lies  with the com port setting in the RTU Driver within AHMI. I assumed it should be /dev/ttyUSB0 which my pi is showing as location of the usb-serial i am using. Also tried /dev/ttyAMAO with a GPIO-serial adapter with no luck. I am fairly sure my serial setting are all set correctly via minicom so i dont think there is an issue there. Any suggestions would be greatly appreciated.

Zip

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: AdvancedHMI on a Raspberry Pi
« Reply #20 on: August 10, 2015, 08:13:46 PM »
Unfortunately I do not have any good advise. I have never setup the Pi with a serial port.

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #21 on: August 11, 2015, 01:52:43 AM »
Would Vitor's experiment provide any help:

http://advancedhmi.com/forum/index.php?topic=899.0

Zip

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #22 on: August 11, 2015, 05:37:29 AM »
No worries Archie. I will keep trying. My PLC is recieving data sent via serial from pi so i know my connection is good. 99% sure it is just identifying the com port of the Pi in the ModbusRTU driver. On my PC COM3 etc works a treat but Pis /dev/ttyAMAO or /dev/USB0 cant be opened by AHMI. I can find my way around Pis and PLC ok but my VB skills are non existant.

@Godra
I had read through this thread previously but cannot open the link inside of the downloaded files. Ethernet communication or modbusTCP via a gateway is the next route i will explore, just trying to keep it identical to how we connect via our pc's.

Thanks for your comments!
Great forum and fantastic product Archie

Vitor

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #23 on: August 11, 2015, 06:38:04 AM »
Hi,
I have corrected the link, it was missformated, sorry.

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #24 on: August 11, 2015, 12:19:49 PM »
If mono is similar to wine then you might try to use the same logic as described here:

http://g8ogj.org/files/Using%20USB%20serial%20ports%20under%20wine%20howwto%20ipb.pdf

I am not currently familiar with mono but it does sound like wine.

Here is another link, with a sample code to test serial port in mono (intended for Archie to compare with the AHMI code):

http://www.mono-project.com/archived/howtosystemioports/
« Last Edit: August 11, 2015, 12:56:46 PM by Godra »

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #25 on: August 11, 2015, 03:12:56 PM »
According to website, the SerialToIP command line version can run in Mono and list available COM ports:

http://sourceforge.net/projects/serialtoip/?source=directory

Zip

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #26 on: August 11, 2015, 10:00:27 PM »
Awesome guys. Sounds promising. Thanks for taking the time. I will have a crack as soon as i get back. Will let you know how i get on.

Zip

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #27 on: August 17, 2015, 08:19:20 AM »
Hi Guys,
             Still Bashing head on desk with this one.
Is it possible that the ModbusRTU driver is not recognising /dev/ttyUSB0 for the Port Name? Does it need a COM address. May be due to declining options but I feel as though Godra's suggestion of 'Linking' a COM port with /dev/ttyUSB0 would be successful, unfortunately I cant get that to work in Mono on my Pi. I am unfamiliar with wine, but from what i have googled/hunted for in my pi there is no equivalent to DOSDevices in MONO. I tried a symlink but could not get that to associate with Mono (damn my limited linux knowledge).
PLC is receiving bits through minicom (RX flashing when I push keys) and everything seems to check out with /dev/ttyUSB0 in set serial etc.
FYI i am using a USB to Serial converter into com port 1 of my PLC which runs perfectly with AHMI on Windows (port name COM1)
Tried installing UBUNTU MATE today to see if there was any change but coming up with the same 'FAILED TO OPEN /DEV/TTYUSB0"
At the moment I am trying to install QT Creator to see if I can get Qmodbus-master communicating. Does not do what I require but may help me whittle down where my issue lies. Just thought I would put this out there in the meantime.

@Vitor. Thankyou for reposting link. Unfortunately mu PLC doesnt support TCP without a gateway (as far as I can gather)

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #28 on: August 17, 2015, 10:22:22 AM »
I would suggest you read Vitor's pdf file again.

He is using Pi, USB-RS232 adapter, ser2net software whose configuration shows /dev/ttyUSB0:

192.168.1.5:4001:raw:300/dev/ttyUSB0:19200 8DATABITS NONE 1STOPBIT

and also com0com and Serial-Tcp software on PC side.

He even mentioned using ModbusRTU device.

Vitor

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #29 on: August 17, 2015, 11:25:52 AM »
One question... You want to run AdvHMI in Linux, using Mono and a serial port?