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

Pages: [1]
1
Support Questions / Logix & ReadUDT latest AHMI -V3.99y
« on: June 29, 2018, 01:38:39 AM »
Hi all, as always great work Archie (legend),

Good chance this is a noob issue (bit rusty) apologies in advance. PLC has UDT tag DateTime02 structure/WallClock (all good)

I have the below - WriteUDT (writes no probs.) / ReadUDT I get the following error

'System.IndexOutOfRangeException' on the ReadUDT line. Any help would be appreciated.

Cheers

' -------------------------

Public Class MainForm

'some default .net here
'

    Private Sub btnReadDT_Click(sender As Object, e As EventArgs) Handles btnReadDT.Click

        '*******************************************************************************
        '* Read from UDT Tag in PLC
        '* 29/06/2018
        '*******************************************************************************
        Dim MyUDT01 As DateTimeUDT
        MyUDT01 = EthernetIPforCLXCom1.ReadUDT("DateTime02", GetType(DateTimeUDT))

        'Dim ret As String = EthernetIPforCLXCom1.Read("DateTime02") <--- this works no probs
        'MessageBox.Show(ret)

    End Sub

    Private Sub btnWriteDT_Click(sender As Object, e As EventArgs) Handles btnWriteDT.Click

        '*******************************************************************************
        '* Write to UDT Tag in PLC
        '* 29/06/2018
        '*******************************************************************************
        Dim MyUDT02 As New DateTimeUDT
        MyUDT02.Year = 1111
        MyUDT02.Month = 2
        MyUDT02.Day = 3
        MyUDT02.Hour = 4
        MyUDT02.Minute = 5
        MyUDT02.Second = 6
        MyUDT02.Microseconds = 789

        Dim MyValue As Integer
        MyValue = EthernetIPforCLXCom1.WriteUDT("DateTime02", MyUDT02)

    End Sub
End Class

Public Class DateTimeUDT

    '*******************************************************************************
    '* Testing UDT in PLC
    '* 29/06/2018
    '*******************************************************************************
    Public Year As Integer
    Public Month As Integer
    Public Day As Integer
    Public Hour As Integer
    Public Minute As Integer
    Public Second As Integer
    Public Microseconds As Integer

End Class


2
Support Questions / Re: Reading a list of Tags
« on: June 23, 2016, 12:49:32 AM »
Hey peps, hope ur all well..

Does anyone know if this has been implemented yet (reading list of program scope tags)!

Pages: [1]