Author Topic: Solution for Pi + mono AAHMI + ML1000 ??  (Read 5092 times)

bachphi

  • Hero Member
  • *****
  • Posts: 642
    • View Profile
Re: Solution for Pi + mono AAHMI + ML1000 ??
« Reply #15 on: January 23, 2017, 09:36:16 PM »
Archie,

Since all my experiments have failed, I found the SerialPortLib driver that claims to overcome  the lack of DataReceived event in Mono. https://github.com/genielabs/serialport-lib-dotnet/
I wonder if it's possible to use the SerialPortLib driver, get the data in and pass it on to SerialDF1forSLCMicroCom1 driver.
Below is the codes I have. Thank You.

Code: [Select]
Imports SerialPortLib
Private Shared _serialPort As SerialPortLib.SerialPortInput
Private Sub MainForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        _serialPort = New SerialPortInput()
        AddHandler _serialPort.ConnectionStatusChanged AddressOf SerialPortLib_ConnectionStatusChanged
        AddHandler _serialPort.MessageReceived AddressOf SerialPortLib_MessageReceived

        _serialPort.SetPort("/dev/ttyUSB0", 38400)
        _serialPort.Connect()

    End Sub

    Private Shared Sub SerialPortLib_MessageReceived(sender As Object, args As MessageReceivedEventArgs)
        Console.WriteLine("Received message: {0}", BitConverter.ToString(args.Data))
        _serialPort.SendMessage(New Byte() {&H6})   'send an ACK message back
    End Sub

    Private Shared Sub SerialPortLib_ConnectionStatusChanged(sender As Object, args As ConnectionStatusChangedEventArgs)
        Console.WriteLine("Serial port connection status = {0}", args.Connected)
    End Sub
===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================

mirkoelettronics

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Solution for Pi + mono AAHMI + ML1000 ??
« Reply #16 on: May 17, 2017, 02:45:37 AM »
Are there any news on this topic?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5260
    • View Profile
    • AdvancedHMI
Re: Solution for Pi + mono AAHMI + ML1000 ??
« Reply #17 on: May 17, 2017, 04:21:00 PM »
I currently have a device in the testing phase that is essentially an Ethernet to Serial gateway that uses a special AdvancedHMI driver. If this all proves out to be stable, I hope to have these available for purchase from the main web site for around $50. An alternative is an ENI module from Allen Bradley.

Noe

  • Full Member
  • ***
  • Posts: 205
    • View Profile
Re: Solution for Pi + mono AAHMI + ML1000 ??
« Reply #18 on: May 17, 2017, 05:23:45 PM »
Or you can get one of these:
http://www.rtaautomation.com/product/515rtaeni/

I have not used this particualr model, but some other ASCII to Ethernet/IP gateways, and they are pretty good! Really easy to configure (web server), they are cheaper than AB, and they have more capacity and features. Really a no brainer.

bachphi

  • Hero Member
  • *****
  • Posts: 642
    • View Profile
Re: Solution for Pi + mono AAHMI + ML1000 ??
« Reply #19 on: December 12, 2017, 09:05:01 PM »
I think there may be a solution for this now, from here: http://advancedhmi.com/forum/index.php?topic=1744.0


So theoretically speaking, install DF1 daemon on the pi, this will taking care of serial communication, then run Mono AHMI with loopback
===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================