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

Pages: [1]
1
Support Questions / Re: Changing DataSubscriber settings at runtime
« on: September 07, 2017, 06:29:25 PM »
worked like a charm. Thanks Archie

2
Support Questions / Changing DataSubscriber settings at runtime
« on: September 07, 2017, 01:48:03 PM »
hey everyone, got a small problem here.

I'm building an application that has settings built into the form for changing the DataSubscriber ComComponent as well as the PLCAdressValue at run-time. i am currently doing this with the BasicIndicator with success but the problem is that the DataSubscriber doesn't seem to want to change the setting that it was given at development. i have tried doing it at the time of form load and after everything is running. do i have to re-initiate the connection? or is it supposed to happen automatically? is there a bug? an i missing something? help is appreciated.


Here are some snippets of code:

Private Sub MainForm_Load(sender As Object, e As EventArgs) Handles Me.Load

        MessageCenterDisplay.AppendText("*******************************************************" & System.Environment.NewLine & "Start Time:     " & DateAndTime.Now & System.Environment.NewLine & "*******************************************************" & System.Environment.NewLine)
        EthernetIPforSLCMicro.IPAddress = My.Settings.IP_Address
        IPDriverAddressDisplay.Text = EthernetIPforSLCMicro.IPAddress
        Lbl_PLC_Tag.Text = DataSubscriberPrint.PLCAddressValue.PLCAddress
        FilePath.Text = My.Settings.File_Path
        TemplateName.Text = My.Settings.Template_Name
        FileExtension.Text = My.Settings.File_Extension
        DataSubscriberPrint.PLCAddressValue.PLCAddress = My.Settings.PLC_Tag
        ChboxMicrologix.CheckState = My.Settings.MicroLogixPLC_selected
        ChboxControlLogix.CheckState = My.Settings.ControlLogixPLC_Selected


        '    ' If ChboxMicrologix.CheckState = 1 Then
        '     DataSubscriber1.ComComponent = EthernetIPforSLCMicro
        '      IndicatorPrintRequested.ComComponent = EthernetIPforSLCMicro
        '      End If

        '      If ChboxControlLogix.CheckState = 1 Then
        '      DataSubscriber1.ComComponent = EthernetIPforCLXCom1
        '     IndicatorPrintRequested.ComComponent = EthernetIPforCLXCom1
        ' End If

    End Sub


 Private Sub Bttn_Save_Trigger_Settings_Click(sender As Object, e As EventArgs) Handles Bttn_Save_Trigger_Settings.Click
        If txt_PLC_Tag.Text <> "" Then
            Try
                'Loads the settings into the PLC Tag setting

                DataSubscriberPrint.PLCAddressValue.PLCAddress = txt_PLC_Tag.Text
                Lbl_PLC_Tag.Text = DataSubscriberPrint.PLCAddressValue.PLCAddress
                IndicatorPrintRequested.PLCAddressSelectColor2 = txt_PLC_Tag.Text

                txtIndicatorCom.Text = DataSubscriberPrint.ComComponent.ToString


            Catch ex As MfgControl.AdvancedHMI.Drivers.Common.PLCDriverException
                If ex.ErrorCode = 1808 Then
                    MsgBox(" PLC Address not found")
                Else
                    MsgBox(ex.Message)
                End If
            Catch ex As Exception
                '* V3.99w - Catch a more general exception
                MsgBox("GE. " & ex.Message)
            End Try
            MessageCenterDisplay.AppendText("Tag Address Save Successful" & " " & TimeOfDay & System.Environment.NewLine)
            MessageCenterDisplay.ScrollToCaret()

        Else
            MessageCenterDisplay.AppendText("Tag Value Cannot be Null" & " " & TimeOfDay & System.Environment.NewLine)
            MessageCenterDisplay.ScrollToCaret()

        End If


    End Sub


 Private Sub MainForm_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
        Dim index As Integer
        While index < My.Application.OpenForms.Count
            If My.Application.OpenForms(index) IsNot Me Then
                My.Application.OpenForms(index).Close()
            End If
            index += 1
        End While
        'save settings while form closing


        My.Settings.IP_Address = EthernetIPforSLCMicro.IPAddress
        My.Settings.File_Path = FilePath.Text
        My.Settings.Template_Name = TemplateName.Text
        My.Settings.File_Extension = FileExtension.Text
        My.Settings.PLC_Tag = DataSubscriberPrint.PLCAddressValue.PLCAddress
        My.Settings.MicroLogixPLC_selected = ChboxMicrologix.CheckState
        My.Settings.ControlLogixPLC_Selected = ChboxControlLogix.CheckState


        'Generate File for History
        MessageCenterDisplay.AppendText("*******************************************************" & System.Environment.NewLine & "End Time:     " & DateAndTime.Now & System.Environment.NewLine & "*******************************************************" & System.Environment.NewLine)
        Dim StorageDirectory As String = FilePath.Text & "\"
        Dim Path As String = FilePath.Text & "\" & "Print History" & "." & "RTF"
        MessageCenterDisplay.SaveFile(Path)

    End Sub

3
Support Questions / Advanced HMI using 3.5 Famework
« on: August 29, 2017, 03:24:37 PM »
I have a project where I have to tie an existing 3.5 framework form that is controlling a barcode reader and database to the Advanced HMI software. When I merge the two programs together I get issues because one is built using framework 3.5 and the other using 4.0. Is there an older version of Advanced HMI that uses the 3.5 Framework? I believe this would solve my issue. I already contacted the Manufacture of the barcode reader which is using 3.5 and they don't have any SDK's for the newer framework(4.0).


Any Suggestions?

Pages: [1]