Author Topic: 3.52 Bugs  (Read 5736 times)

baguinn

  • Newbie
  • *
  • Posts: 31
    • View Profile
3.52 Bugs
« on: August 13, 2013, 11:52:59 AM »
Been playing this morning.  I am connected to a MicroLogix 1100 using the SLC ethernet driver.

I have run up on a problem with toggle on all the pushbuttons and selector switches.
I also cannot do a direct read, which may be my ignorance, I know things have changed, just not sure how to address it now.  I know ReadAny doesn't work any more, and apparently Read doesn't do it either.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: 3.52 Bugs
« Reply #1 on: August 13, 2013, 12:00:45 PM »
Try this for a direct read:

Me.text=EthernetIPforPLCSLCMicroComm1.Read("N7:0",1)(0)

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: 3.52 Bugs
« Reply #2 on: August 13, 2013, 12:06:40 PM »
I am able to replicate this, working on a fix now.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: 3.52 Bugs
« Reply #3 on: August 13, 2013, 12:33:14 PM »
Try this fix. At line 2283 in AllenBradleyPCCC.vb add this one line shown here:

Code: [Select]
            If Not PLCAddressByTNS(TNSLowerByte).InternallyRequested Then
                If Not DisableEvent Then
                    Dim x As New MfgControl.AdvancedHMI.Drivers.Common.PlcComEventArgs(d, PLCAddressByTNS(TNSLowerByte).PLCAddress, TNSReturned)
 ---->              Responses(TNSReturned And 255) = x
                    If SynchronizingObject IsNot Nothing Then
                        Dim Parameters() As Object = {Me, x}
                        SynchronizingObject.BeginInvoke(drsd, Parameters)
                    Else
                        'RaiseEvent DataReceived(Me, System.EventArgs.Empty)
                        RaiseEvent DataReceived(Me, x)
                    End If
                End If
            Else
[/code[

baguinn

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: 3.52 Bugs
« Reply #4 on: August 13, 2013, 01:06:54 PM »
That does fix the toggle function, but the direct read only seems to work for one scan before it throws an error.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: 3.52 Bugs
« Reply #5 on: August 13, 2013, 06:50:58 PM »
What error do you get?

I tried to replicate this using two buttons and this code, but I am not getting an error:
Code: [Select]
    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        Button1.Text = EthernetIPforPLCSLCMicroCom2.Read("N7:0", 1)(0)
    End Sub

    Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
        EthernetIPforPLCSLCMicroCom2.Write("N7:0", CStr(Button1.Text + 1))
    End Sub

baguinn

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: 3.52 Bugs
« Reply #6 on: August 14, 2013, 07:53:37 AM »
I am using a timer set at 500 msec to triggerr the read, I get "Index Out Of Range Exception Was Unhandled" error.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: 3.52 Bugs
« Reply #7 on: August 14, 2013, 09:41:55 AM »
Download version 3.53 and try this to see if it works:

1) Add the driver to your form and set the PollRateOverride to 500
2) Add a DataSubscriber
3) Set PLCAddressValue in the DataSubscriber
4) In the properties window for the DataSubscriber, click the lightening bolt to get to the Events
5) Double click in the DataReturned so it takes you back to the code
6) Add your code and use e.Values(0) to get the retuned value

Let me know if that gives you the same problem. Later this afternoon I'll be able to setup my ML1100 and see if I can replicate the error you get using a timer.

iDeeW

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: 3.52 Bugs
« Reply #8 on: August 14, 2013, 11:39:30 AM »
Hi,

The selector switch, its giving me an error, whenever i click on it.
Register is a AB MicroLogix1400 Input coil(I:0/12) ...
Look at the below picture.
What am I doing wrong... Please help

Thank you

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: 3.52 Bugs
« Reply #9 on: August 14, 2013, 12:17:04 PM »
Hi,

The selector switch, its giving me an error, whenever i click on it.
Register is a AB MicroLogix1400 Input coil(I:0/12) ...
Look at the below picture.
What am I doing wrong... Please help

Thank you
Are you using version 3.53?

Tril

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: 3.52 Bugs
« Reply #10 on: August 14, 2013, 12:36:06 PM »
I confirm the same problem with DF1Comm and a SLC 500.

In version 3.40, the following line always succeeds :
Code: [Select]
Button1.Text = DF1Comm1.ReadAny("F8:0", 1)(0)
In version 3.53, the following line fails most of the time and sometimes succeeds:
Code: [Select]
Button1.Text = DF1Comm1.Read("F8:0", 1)(0)
when it fails, the error is :
Quote
An unhandled exception of type 'System.IndexOutOfRangeException' occurred in AdvancedHMI.exe

Additional information: Index was outside the bounds of the array.

iDeeW

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: 3.52 Bugs
« Reply #11 on: August 14, 2013, 12:47:51 PM »
Quote
Are you using version 3.53?

I'm using 3.53

baguinn

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: 3.52 Bugs
« Reply #12 on: August 14, 2013, 02:36:30 PM »
I don't believe you can write to a physical input.  You should be able to read it though.

iDeeW

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: 3.52 Bugs
« Reply #13 on: August 14, 2013, 02:46:49 PM »
Quote
I don't believe you can write to a physical input.  You should be able to read it though.

I'm using the AB emulator 500...

Anyways I tried a B register...still the same error!

iDeeW

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: 3.52 Bugs
« Reply #14 on: August 14, 2013, 02:53:27 PM »
Toggle property of MomentaryButtons when use with DF1Comm genarates the same error...!