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

Pages: [1]
1
Open Discussion / Re: VB.NET DataReceived Not Working CLX Driver
« on: March 21, 2018, 01:25:47 PM »
Thanks Archie and Godra for your fast replies. After I rebooted my computer the problem fixed itself. But now I am having other problems. When I try to use

mystrng = Me.EthernetIPforCLXCom1.Read("AndOnBoard_Excel_REAL[2]") to read I keep getting the following error.
MfgControl.AdvancedHMI.Drivers.Common.PLCDriverException
  HResult=0x80131500
  Message=Read Failed. Path Segment Error (Invalid Tag Name),  Status Code=4

The IP is correct and the tag is a controller tag. What is going on?

If I Dim myplc As New EthernetIPforCLXCom
        myplc.IPAddress = "192.168.1.8"
and then mystrng = myplc.Read("AndOnBoard_Excel_REAL[2]") it works??


2
Open Discussion / Re: VB.NET DataReceived Not Working CLX Driver
« on: March 21, 2018, 11:23:01 AM »
When I click the button I do not get any errors. Still nothing is being displayed.
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Dim MyStr As String
        Dim PLC1Read(10) As String
        Try
            PLC1Read(0) = ("Cell1.PerfTrackReport.PLC1SinceLastResetHours")
            PLC1Read(1) = ("Cell1.PerfTrackReport.PLC1SinceLastResetMinutes")
            PLC1Read(2) = ("Cell1.PerfTrackReport.PLC1SinceLastResetSeconds")
            PLC1Read(3) = ("AndOnBoard_DINT[1]") ' Idle Time Seconds
            PLC1Read(4) = ("AndOnBoard_DINT[2]") ' Idle Time Minutes
            PLC1Read(5) = ("AndOnBoard_DINT[3]") ' Idle Time Hours
            PLC1Read(6) = ("AndOnBoard_Excel_DINT[6]") ' Hourly Count
            PLC1Read(7) = ("AndOnBoard_Excel_DINT[7]") ' Shift Count
            PLC1Read(8) = ("AndOnBoard_Excel_DINT[4]") ' Good Parts Count
            PLC1Read(9) = ("AndOnBoard_Excel_DINT[5]") ' Bad Parts Count
            PLC1Read(10) = ("AndOnBoard_Excel_REAL[1]") ' Average Cycle Time
            PLC1Read(10) = ("AndOnBoard_Excel_REAL[2]") ' Last Cycle Time
            EthernetIPforCLXCom2.BeginReadMultiple(PLC1Read)
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try

    End Sub

    Private Sub EthernetIPforCLXCom2_DataReceived(sender As Object, e As Drivers.Common.PlcComEventArgs) Handles EthernetIPforCLXCom2.DataReceived
        MsgBox(e.PlcAddress & "=" & e.Values(0))
    End Sub

    Private Sub EthernetIPforCLXCom2_ComError(sender As Object, e As Drivers.Common.PlcComEventArgs) Handles EthernetIPforCLXCom1.ComError
        MsgBox("Com Error = " & e.ErrorMessage)
    End Sub
End Class

3
Open Discussion / Re: VB.NET DataReceived Not Working CLX Driver
« on: March 21, 2018, 11:02:15 AM »
This is what I have now but still cannot get it to fire.

 Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Dim MyStr As String
        Dim PLC1Read(10) As String
        PLC1Read(0) = ("Cell1.PerfTrackReport.PLC1SinceLastResetHours")
        PLC1Read(1) = ("Cell1.PerfTrackReport.PLC1SinceLastResetMinutes")
        PLC1Read(2) = ("Cell1.PerfTrackReport.PLC1SinceLastResetSeconds")
        PLC1Read(3) = ("AndOnBoard_DINT[1]") ' Idle Time Seconds
        PLC1Read(4) = ("AndOnBoard_DINT[2]") ' Idle Time Minutes
        PLC1Read(5) = ("AndOnBoard_DINT[3]") ' Idle Time Hours
        PLC1Read(6) = ("AndOnBoard_Excel_DINT[6]") ' Hourly Count
        PLC1Read(7) = ("AndOnBoard_Excel_DINT[7]") ' Shift Count
        PLC1Read(8) = ("AndOnBoard_Excel_DINT[4]") ' Good Parts Count
        PLC1Read(9) = ("AndOnBoard_Excel_DINT[5]") ' Bad Parts Count
        PLC1Read(10) = ("AndOnBoard_Excel_REAL[1]") ' Average Cycle Time
        PLC1Read(10) = ("AndOnBoard_Excel_REAL[2]") ' Last Cycle Time
        EthernetIPforCLXCom2.BeginReadMultiple(PLC1Read)
    End Sub


    Private Sub EthernetIPforCLXCom2_DataReceived(sender As Object, e As Drivers.Common.PlcComEventArgs) Handles EthernetIPforCLXCom2.DataReceived
        MsgBox(e.PlcAddress & "=" & e.Values(0))
    End Sub
End Class

4
Open Discussion / VB.NET DataReceived Not Working CLX Driver
« on: March 21, 2018, 10:43:04 AM »
I need to pull the data from the BeginReadMultiple values but cannot. Bellow is the code, what am doing wrong? Or is there another way to do this?

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Dim MyStr As String
        Dim PLC1Read(10) As String
        Dim PLC1 As New EthernetIPforCLXCom
        PLC1.IPAddress = "192.168.1.8"
   
        PLC1Read(0) = ("Cell1.PerfTrackReport.PLC1SinceLastResetHours")
        PLC1Read(1) = ("Cell1.PerfTrackReport.PLC1SinceLastResetMinutes")
        PLC1Read(2) = ("Cell1.PerfTrackReport.PLC1SinceLastResetSeconds")
        PLC1Read(3) = ("AndOnBoard_DINT[1]") ' Idle Time Seconds
        PLC1Read(4) = ("AndOnBoard_DINT[2]") ' Idle Time Minutes
        PLC1Read(5) = ("AndOnBoard_DINT[3]") ' Idle Time Hours
        PLC1Read(6) = ("AndOnBoard_Excel_DINT[6]") ' Hourly Count
        PLC1Read(7) = ("AndOnBoard_Excel_DINT[7]") ' Shift Count
        PLC1Read(8) = ("AndOnBoard_Excel_DINT[4]") ' Good Parts Count
        PLC1Read(9) = ("AndOnBoard_Excel_DINT[5]") ' Bad Parts Count
        PLC1Read(10) = ("AndOnBoard_Excel_REAL[1]") ' Average Cycle Time
        PLC1Read(10) = ("AndOnBoard_Excel_REAL[2]") ' Last Cycle Time
        PLC1.BeginReadMultiple(PLC1Read)
    End Sub

    Private Sub PLC1_DataReceived(sender As Object, e As Drivers.Common.PlcComEventArgs) Handles EthernetIPforCLXCom1.DataReceived
        MsgBox(e.PlcAddress & "=" & e.Values(0))
    End Sub

Pages: [1]