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

Pages: 1 2 3 [4] 5 6 ... 43
46
Open Discussion / Re: Siemens S7 driver
« on: April 07, 2023, 10:12:03 PM »
I have to work with siemens s7-1500, what is the best easy and reliable way to do it with adhmi, and if possible?.
I think following Archie's steps is the easiest way. Any chance you can show us your way if that is possible.

48
Open Discussion / Re: Adding New Forms To An Existing Project
« on: April 06, 2023, 09:39:40 PM »
Are you too lazy to read?  The first link from the search result, Archie stated "Right click the AdvancedHMI project in Solution Explorer and select Add Form".

50
Support Questions / Re: Importing Data for use in Spline Chart
« on: March 31, 2023, 12:49:13 PM »
Archie is the world best mind reader or you can try post it at alt.read.my.mind

Now, if I can read your mind correctly,  your BRX already generate a CSV file. If you can have a batch file to run daily and move to a new location. New file is automatically generated.
Once the file is in the new location, just use excel with some macro, you should be able to generate a chart.
I dont see a need for AAHMI here.

51
Support Questions / Re: Rockwell PLC via EN2T backplane
« on: March 29, 2023, 08:58:26 PM »
Simplify, ping it first.

52
Open Discussion / Re: App freeze AHMI V3.99x +Keyence SDK+SQLCE
« on: March 20, 2023, 01:44:31 PM »
Try this

Code: [Select]
Imports Keyence.AutoID.SDK
...
Dim m_reader As ReaderAccessor = New ReaderAccessor("192.168.111.104")
...

m_reader.Connect(AddressOf ReceivedDataAction)
...
Private Sub ReceivedDataAction(data As Byte())
        'Define received data actions here.Defined actions work asynchronously.
        '"ReceivedDataWrite" works when reading data was received.
        BeginInvoke(New delegateUserControl(AddressOf ReceivedDataWrite), System.Text.Encoding.ASCII.GetString(data))
End Sub
...
m_reader.Dispose()

Make sure to install the run time C++ library SR SDK.
Referencing two Keyence.AutoID.SDK.dll & Communication.dll

53
Support Questions / Re: Comms Loss/Lockup
« on: December 22, 2022, 01:08:59 PM »
You have a heartbeat at PLC/machine side, but what if the PLC/machine power is off during weekend for maintenance?



54
Support Questions / Re: GetTagList() suggestion for future enhancement
« on: December 22, 2022, 09:25:47 AM »
Have you tried the latest version?
 also

try connecting directly with PLC.

I know I tried some 20MB program with lots of UDT and it took quite a few minutes to get it.

55
Support Questions / Re: ReadUDT() problem with array of UDT
« on: December 19, 2022, 08:43:21 PM »
I am using 3.9.9.2538 which is the latest version of AHMIv399yBeta38.
But I was just lucky both times apparently.

Here is what I meant, below is an example that works:
Code: [Select]
    Public Class U02_Station
        Public Limits(1) As U01_Limit
        Public Name20 As String
    End Class

But this wont work:
Code: [Select]
    Public Class U02_Station
        Public Name20 As String
        Public Limits(1) As U01_Limit
    End Class

Since custom string is treated as a UDT. you will need to define it first:
Code: [Select]
    Public Class String20
        Public Length As Integer
        Public Characters() As System.SByte
        Public Sub New()
            MyBase.New
            Me.Characters = New System.SByte((20) - 1) {}
        End Sub
        Public Sub New(ByVal value As String)
            MyBase.New
            Me.Length = Math.Min(20, value.Length)
            If (value.Length > 20) Then
                value = value.Substring(0, 20)
            End If

            Dim TmpArray() As Byte = New Byte((20) - 1) {}
            System.Text.ASCIIEncoding.ASCII.GetBytes(value).CopyTo(TmpArray, 0)
            Me.Characters = CType(CType(TmpArray, Array), System.SByte())
        End Sub
        Public Overrides Function ToString() As String
            Return System.Text.Encoding.ASCII.GetString(Array.ConvertAll(Characters, Function(a) CByte(a)))
        End Function
    End Class

then

Code: [Select]
    Public Class U02_Station
        Public Name20 As New String20
        Public Limits(1) As U01_Limit
    End Class

56
Support Questions / Re: ReadUDT() problem with array of UDT
« on: December 19, 2022, 08:08:05 AM »
It worked for me:

Code: [Select]
    Public Class UDT_Test
        Public Limits(1) As U01_Limits
        Public S20 As String
    End Class

57
Support Questions / Re: ReadUDT() problem with array of UDT
« on: December 16, 2022, 04:22:14 PM »
In the other post from the link I gave, I stated that custom length of string does work.

And why do like to repeat your mistake as seeing in your previous post. Check  'Property'

58
Support Questions / Re: ReadUDT() problem with array of UDT
« on: December 16, 2022, 02:19:01 PM »
UDT within a UDT or nested UDT.  Here is an example that works:

Code: [Select]
Public Class U01_Limits
        Public LowLimit As Single
        Public Hi_Limit As Single
    End Class

    Public Class UDT_Test
        Public Limits(1) As U01_Limits
    End Class

...

        Dim myTestUDT As UDT_Test = PLC.ReadUDT(Of UDT_Test)("myUDT")


For further example, see here:

https://www.advancedhmi.com/forum/index.php?topic=2670.msg16897#msg16897

59
Support Questions / Re: How to handle ReadUDT() with an array of boolean
« on: December 09, 2022, 06:07:31 PM »
"Index out of range"
Test1.TestBool BOOL[3]
 for i = 0 to 2


can you figure out now?

60
Open Discussion / Re: Absolute Beginner
« on: November 10, 2022, 03:49:45 PM »
I propose to Archie to add some addendum to the UsageAndLicense file:

Code: [Select]
No absolute beginner shall use AAHMI with a Raspberry PI as a PLC.

Pages: 1 2 3 [4] 5 6 ... 43