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

Pages: [1]
1
Support Questions / Re: Compact Logix - Tags with custom type
« on: January 28, 2016, 01:55:31 PM »
My workaround was to use an equivalent class in C# with .net reflection I loop through property and read every property from a base tag

2
Support Questions / Re: Compact Logix - Tags with custom type
« on: December 15, 2015, 02:55:35 PM »
Thanks, I hope will be able to Write data also.

For my current issue, I'll have to do some check with a newer/current version of ADHMI

With an older version (3.68) I had issue with send queue full when writing large arrays or multiple values at once, and I had to add a Sleep between every Write (see: http://advancedhmi.com/forum/index.php?topic=444.msg1769#msg1769)

I updated AdvancedHMI to 3.99a, but I've not tested performance with it, and I am still using a Thread.Sleep between every Write

As I have a couple of arrays like my CustomTimers, I don't want to wait between every Write. I'll do some test to see if I still need the Sleep, as the Write is my main concern in this case, and for the moment I only have 20 values to write, but I expect to have more than 1000 values to write at once.

3
Support Questions / Compact Logix - Tags with custom type
« on: December 15, 2015, 10:40:58 AM »
Hi

I have a CompactLogix with a Custom type wich I call CustomTimer containing Delay, and Count, both integer
I also have a CustomTimers array of 10 elements of type CustomTimer

I can read and write using CustomTimers[1].Delay, but when I try to simply read CustomTimers as an array, I got Driver Exception saying "No Response from PLC"

Is there an easy way to read/write such arrays, or I really need to scan all values one by one?

Thanks

4
Support Questions / Re: AdvancedHMI.exe not working
« on: November 16, 2015, 02:38:36 PM »
can you check the content of the errors (double click), seems like a missing DLL

5
Open Discussion / Thanks for version 3.99
« on: September 08, 2015, 10:42:48 AM »
I no longer have issues with Incomplete Solution

6
Support Questions / Re: .Net 4.0 Full vs .Net 4.0 Client Profile
« on: April 30, 2015, 09:08:38 AM »
I use the advancehmi project, and then I tried to target client profile, but I can't change the target of already compiled file (Advanced HMI Drivers and Controls)

7
Support Questions / .Net 4.0 Full vs .Net 4.0 Client Profile
« on: April 28, 2015, 11:35:40 AM »
I got issue with the lib as I need to install .Net 4.0 Full on the desktop that run the application

Is there a way to get it to work on .Net 4.0 Client Profile??

8
Thanks

Another quick question, SLC aren't supposed to support address like N59:11/7 to read single bit?

9
Support Questions / OverflowException in 3.98f - AllenBradleySLCMicro
« on: April 22, 2015, 12:03:47 PM »
When I try to write to a big array[200], I have an OverflowException in WriteRawData

Code: [Select]
TNS = ProtectedTypeLogicalWrite(Convert.ToByte(DataW.Length), Convert.ToByte(PAddress.FileNumber), _
                                              Convert.ToByte(PAddress.FileType), Convert.ToByte(PAddress.Element), Convert.ToByte(PAddress.SubElement), _
                                             DataW)


in my case, PAddress.SubElement = 328

10
Hi, I have 3 problems,

I have a system that read continuously (every 100ms) some flags from a PLC (3 DInt and a small DInt array of 5 values)
When flags are ready, I send data to the PLC

First problem, When I try to send an array of 100 or 600 values it fails, so I need to send my array in small chunk (I write small array of 20, starting at index 0, 20, 40, ...)

Second problem, when I send small chunk, it works the first time, but it fails with "Send Que Full" on the second one even if I wait 2 minutes or 10 minutes
To solve this, I added a Thread.Sleep(50) before each Write.

Third, when I close, I call Dispose(), and sometimes, I receive a "Send Que Full" error on Dispose, do I need to wait before calling Dispose()


Additional info:
I created a Threadsafe Read/Write architecture to prevent multiple call at once (had issue with that), but not where every write have a Sleep(50) which is not really usefull for performance.
I also call CloseConnection() before calling Dispose()

11
Support Questions / Re: Advanced HMI Subscribe is not working
« on: September 09, 2014, 01:17:23 PM »
Update the method SubscriptionUpdate

Code: [Select]
    Private Sub SubscriptionUpdate(sender As System.Object, e As System.ComponentModel.DoWorkEventArgs)
        While Not StopSubscriptions
            If Not m_DisableSubscriptions And GroupedSubscriptionReads IsNot Nothing Then
                '* 3-JUN-13 Do not read data until handles are created to avoid exceptions
                If Not HandleCreated AndAlso m_SynchronizingObject IsNot Nothing Then
                    If m_SynchronizingObject IsNot Nothing AndAlso TypeOf (m_SynchronizingObject) Is System.Windows.Forms.Control _
                         Then
                        If Not DirectCast(m_SynchronizingObject, System.Windows.Forms.Control).IsHandleCreated Then
                            'Exit Sub
                        Else
                            HandleCreated = True
                        End If
                    End If
                Else
                    Dim i As Integer = 0
                    While i < GroupedSubscriptionReads.Count And Not StopSubscriptions

                        SyncLock (ReadLock) ' Do not let the Internal request change during another read
                            Try
                                If Not m_DisableSubscriptions Then
                                    InternalRequest = True
                                    'Dim elapsed = timer.ElapsedMilliseconds

                                    '23-OCT-11 Moved before the next 4 lines
                                    Me.Read(GroupedSubscriptionReads(i).TagName, GroupedSubscriptionReads(i).NumberToRead)
                                    'elapsed = timer.ElapsedMilliseconds

                                    InternalRequest = False
                                Else
                                    Threading.Thread.Yield()
                                End If
                            Catch ex As MfgControl.AdvancedHMI.Drivers.Common.PLCDriverException
                                Dim x As New MfgControl.AdvancedHMI.Drivers.Common.PlcComEventArgs(ex.ErrorCode, ex.Message)
                                x.Values.Add(ex.Message)
                                Dim z() As Object = {Me, x}

                                Try
                                    '****  TODO:  Send error to proper control(i indexes the grouped subscriptions, not individual subscription)
                                    If m_SynchronizingObject IsNot Nothing Then
                                        m_SynchronizingObject.BeginInvoke(SubscriptionList(i).dlgCallBack, z)
                                    Else
                                        If SubscriptionList(i).dlgCallBack IsNot Nothing Then
                                            SubscriptionList(i).dlgCallBack.Invoke(Me, x)
                                        End If
                                    End If
                                Catch ex2 As Exception
                                End Try
                            Catch ex As Exception
                                '* Send this message back to the requesting control
                                Dim x As New MfgControl.AdvancedHMI.Drivers.Common.PlcComEventArgs(-99, ex.Message)
                                x.Values.Add(ex.Message)
                                Dim z() As Object = {Me, x}

                                '****  TODO:  Send error to control
                                'm_SynchronizingObject.BeginInvoke(SubscriptionList(i).dlgCallBack, z)
                                '* Slow down the poll rate to avoid app freezing
                                SubscriptionList(i).SkipReads = 10
                            End Try
                        End SyncLock

                        i += 1
                    End While
                End If
            End If

            Threading.Thread.Sleep(m_PollRateOverride)
        End While
    End Sub

Pages: [1]