Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - TheColonel26

Pages: 1 [2]
16
Support Questions / OmronEthernetFINSCom Thread Safe?
« on: March 21, 2018, 01:38:25 PM »
Is the OmronEthernetFINSCom driver thread safe? Can I make calls to it from multiple threads? Or will I need to create a new instance for each thread?

17
Open Discussion / Re: Future .NET Standard support (.Net Core)?
« on: March 15, 2017, 09:14:01 AM »
No plan to do this for the Open Source version to support Hobbyists?

18
Open Discussion / Future .NET Standard support (.Net Core)?
« on: March 15, 2017, 08:19:42 AM »
Archie,

Do you plan to or are you open to moving AHMI to targeting .Net Standard? This would allow us to run AHMI on .Net Core on Linux x86 and ARM (When v2.0 is released). The only caveat being that the AHMI UI components could not be included since .Net Core does not currently have it's own UI yet, but we could use all the drivers and subscription components. To me the drivers and subscription stuff is the only reason I use AHMI I prefer to design my own UI components.

19
Support Questions / Windows CE 7
« on: March 08, 2017, 10:41:57 AM »
Can Advanced HMI be built to run on Windows CE 7? Or are there dependency that aren't available in CE?

20
Open Discussion / Re: Nuget Package like EPplus
« on: October 19, 2016, 10:35:40 AM »
You're question is rather vague.

There are a bunch of nuget chart/graph packages.
https://www.nuget.org/packages?q=chart
https://www.nuget.org/packages?q=graph

21
Open Discussion / Re: Console Application
« on: October 05, 2016, 03:11:04 PM »
Awesome! Thanks

Note: I also needed to change Line 544

Code: [Select]
m_SynchronizingObject.BeginInvoke(SubscriptionList(i).dlgCallback, x)
to

Code: [Select]
  If m_SynchronizingObject IsNot Nothing AndAlso m_SynchronizingObject.InvokeRequired Then
      m_SynchronizingObject.BeginInvoke(SubscriptionList(i).dlgCallback, x)
  Else
      SubscriptionList(i).dlgCallback(Me, f)
  End If


22
Open Discussion / Re: Console Application
« on: October 05, 2016, 12:46:21 PM »
I'm trying to do the same thing (run a test console app). but I;m getting a null reference exception thrown for OmronEthernetFINSCom.synchronizingObject.

Since I don't have a form to use as the synchronizingObject in my test app what can I do to resolve this?

Code: [Select]
            OmronEthernetFINSCom comComponent = new OmronEthernetFINSCom()
            {
                IPAddress = "192.168.1.80",
                ProtocolType = OmronEthernetFINSCom.ProtocolOptions.UDP
            };

            main.Initialize(comComponent);


Code: [Select]
public void Initialize(OmronEthernetFINSCom comComponent)
        {

            this.comComponent = comComponent;
            this.comComponent.Subscribe(RUN, 1, 100, DataSubRun_DataReceived);
            this.comComponent.Subscribe(FIXTURE_ID, 1, 100, DataSubFixtureID_DataReceived);
}

23
I like to request a change in exception handling. Currently if you throw any exception in a data subscriber event listener method/subscriber (not sure what the official .net term for that is) it will be caught in the AHMI library. I'd like to request a change so that only the exceptions that need to be caught by the library are instead of all of them.

For example in this library method when OnDataChanged(e) is called any exception thrown there is caught.
Code: [Select]
    Private Sub PolledDataReturnedValue(ByVal sender As Object, ByVal e As MfgControl.AdvancedHMI.Drivers.Common.PlcComEventArgs)
        Try
            '* Fire this event every time data is returned
            OnDataReturned(e)
            '* Case may be switched so find key based on that
            Dim TargetKey As String = ""
            For Each key In SubscribedValueList.Keys
                If String.Compare(key, e.PlcAddress, True) = 0 Then
                    TargetKey = key
                End If
            Next


            If e.Values(0) <> SubscribedValueList(TargetKey) Then
                '* Save this value so we know if it changed without comparing the invert
                SubscribedValueList(e.PlcAddress) = e.Values(0)

                If InvertValue Then
                    m_Value = Convert.ToString(Not CBool(e.Values(0)))
                Else
                    m_Value = e.Values(0)
                End If

                '* This event is only fired when the returned data has changed
                OnDataChanged(e) '* <--- any exceptions thrown by the user/programmer in a subscribed method are caught below.

            End If

        Catch ex As Exception
            DisplayError("INVALID VALUE RETURNED!")
        End Try
    End Sub


If it's not already a thing, and if it is please inform me how to do this, an implementation for Universal Apps would be good.
That will be coming in the future. All of the drivers are being updated for compatibility in UWP.
Love this


24
Open Discussion / Re: C# Data Subscriber in a non UI class
« on: October 05, 2016, 07:09:02 AM »
Just realized I never replied back. This fixed it thank you.

25
Open Discussion / C# Data Subscriber in a non UI class
« on: September 29, 2016, 10:46:55 AM »
Code: [Select]

public partial class Main : Form
    {
       
        public Main()
        {
            InitializeComponent();


            Program.Logic.Initialize(omronEthernetFINSCom1);
            Program.Logic.DataSubFixtureID.DataChanged += DataSubFixtureID_DataChanged;
            Program.Logic.SequenceDone += Logic_SequenceDone;
        }

        private void Logic_SequenceDone(object sender, Vitrek_Library.MainSequenceDoneEventArgs e)
        {
            throw new NotImplementedException();
        }

        private void DataSubFixtureID_DataChanged(object sender,
            MfgControl.AdvancedHMI.Drivers.Common.PlcComEventArgs e)
        {

            int fixtureId = Convert.ToInt32(e.Values[0]);
            lblPartNumber.Text = $@"Part Number: {fixtureId}";
        }
    }

public class Logic{
        public DataSubscriber DataSubFixtureID;

        public void Initialize(IComComponent comComponent)
        {
            data = new DataInterface();
            data.Load();

            SeqRight = new Sequences();
            SeqRight.SequenceDone += SeqRight_SequenceDone;
            SeqRight.Initialize(new System.IO.Ports.SerialPort());
            SeqLeft = new Sequences();
            SeqLeft.SequenceDone += SeqLeft_SequenceDone;
            SeqLeft.Initialize(new System.IO.Ports.SerialPort());


            DataSubFixtureID = new DataSubscriber
            {
                PLCAddressValue = new PLCAddressItem("D10"),
                ComComponent = comComponent
            };

        }
}

I get no errors but the DataChanged Event is never fired.

I have a DigitalPanelMeter using the same comComponent using the same address and it works just fine.

Pages: 1 [2]