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

Pages: [1]
1
Open Discussion / Re: ReadUDT Size
« on: December 04, 2023, 08:15:26 AM »
Guys,
Thanks for your help. I got everything working that I need to have working.
I can poll all the data I need from one UDT in 30msec. I poll every 300msec with a Timer.

Thanks again.

2
Open Discussion / Re: ReadUDT Size
« on: December 03, 2023, 10:05:50 AM »
Thanks guys for the help.
It looks like it use the array size as Godra suggested.
today I'll see if I can read the complete UDT.

3
Open Discussion / Re: ReadUDT Size
« on: December 02, 2023, 02:34:26 PM »
I've tried everything I can think of.
No luck.

4
Open Discussion / Re: ReadUDT Size
« on: December 02, 2023, 09:19:45 AM »
Looks like its the custom length strings.
I get a "Index was outside the bounds of the array."

My example:

    Public Class STR0004
        Public len1 As Int32
        Public STR4(4) As SByte
    End Class

The custom string in the controller

STR004
      Len           DINT
      DATA         SINT[4]   

5
Open Discussion / Re: ReadUDT Size
« on: December 01, 2023, 03:04:19 PM »
That's probably why.  My PLC is a 5370.
Such messy string definition , for ex. STRING_8 can contains up to 24 chars.

I was able to import it into a L330ERMS2, rework the UDT to v2.  then import to my PLC.
It took less than a second to read all tags.
see picture & attached v2.



Yes, I can read the UDT structure with the tag reader. I'm trying now to read the data with ReadUDT.
Here is what I have as the structure.


Module HMI_UDT_Class

    Public completeData As UDT_HMI_StationStatus

    Public Class STR0004
        Public len1 As Int32
        Public STR4(4) As SByte
    End Class

    Public Class STR0016
        Public len2 As Int32
        Public STR16(16) As SByte
    End Class


    Public Class STR0024
        Public len3 As Int32
        Public STR0024(24) As SByte
    End Class

    Public Class String_24
        Public len4 As Int32
        Public Str24(24) As SByte
    End Class

    Public Class String_8
        Public len5 As Int32
        Public Str_8(24) As SByte

    End Class






    Public Class UDT_HMI_ActivePartProgram
        Public Program(19) As String
        Public SubProgram(9) As String
        Public ProgramName As String
        Public SubProgramName As String
        Public ProgramNumber As Int32
        Public SubProgramNumber As Int32
        Public ProgramLineNumber(19) As Int32
        Public SubProgramLineNumber(9) As Int32
        Public SubActive As Boolean
    End Class

    Public Class UDT_HMI_AngleOffset
        Public angleOffsetReq As Boolean
        Public angleOffsetVal As Single
    End Class

    Public Class UDT_HMI_Axis
        Public Enabled As Boolean
        Public InPos As Boolean
        Public Homed As Boolean
        Public Returned As Boolean
        Public Faulted As Boolean
        Public CmdPos As Single
        Public AbsPos As Single
        Public Speed As Single
        Public SpeedUnits As String
        Public Present As Boolean
        Public InhibitStatusButs As Int32
        Public CurrentFaultCode As Int32
        Public jogPos As Boolean
        Public jogNeg As Boolean
        Public jogEnabled As Boolean
        Public Name As STR0004
        Public MtrCurr As Single
        Public MtrCap As Single
        Public InvCap As Single
        Public PosErr As Single
    End Class

    Public Class UDT_HMI_AxisJog
        Public pos As Boolean
        Public neg As Boolean
        Public enabled As Boolean
        Public incChange As Boolean
        Public speed(5) As Single
        Public unit As String_8
        Public incSel As SByte
        Public spdSel As SByte
        Public increment(4) As Single
        Public mode As Boolean
        Public axisSelect As SByte
        Public axisPresent(32) As Boolean
        Public axisType As Int16
        Public axisName(6) As STR0004

    End Class

    Public Class UDT_HMI_Button
        Public Target As Boolean
        Public Active As Boolean
    End Class

    Public Class UDT_HMI_Coordinates
        Public X(500) As Single
        Public Y(500) As Single
        Public Angle(500) As Single
        Public Dist(500) As Single
        Public Active(500) As SByte

    End Class
    Public Class UDT_HMI_FeedrateOverride
        Public spdUnits As String_8
        Public Feedrate As Single
        Public overrideFeedrate As Single
        Public overrideEnabled As Boolean
        Public feedratePct As Single
        Public RapidPct As Int32

    End Class

    Public Class UDT_HMI_MachineStatus
        Public gStop As STR0016
        Public mStop As STR0016
        Public activeMcode(7) As STR0024
        Public activeGcode(7) As STR0024
        Public registers(15) As STR0024
        Public gBlink As Boolean
        Public mBlink As Boolean

    End Class

    Public Class UDT_HMI_Parameters
        Public Number(5) As Int32
        Public Value(5) As Single
        Public Name(5) As String_24

    End Class

    Public Class UDT_HMI_Spindle
        Public AtSpeed As Boolean
        Public Enabled As Boolean
        Public Faulted As Boolean
        Public CmdSpeed As Single
        Public ActSpeed As Single
        Public SpeedUnits As String
        Public Present As Boolean
        Public Direction As Boolean  ' 0=CW 1= CCW
        Public Name As STR0004
        Public MotorCap As Single


    End Class

    Public Class UDT_HMI_StateModle
        Public State As SByte
        Public notComplete As Boolean
        Public notCpEM As SByte

    End Class

    Public Class UDT_HMI_toolPathGraph
        Public inchMode As Boolean
        Public metricMode As Boolean
        Public SampleActive As Boolean
        Public Coordinates As UDT_HMI_Coordinates
        Public GraphClear As UDT_HMI_Button
        Public SampleRate As Single
        Public PosX As Single
        Public PosY As Single
        Public PosZ As Single
        Public UserPosX As Single
        Public UserPosY As Single
        Public UserPosZ As Single
        Public UserMaxX As Single
        Public UserMinX As Single
        Public UserMaxY As Single
        Public UserMinY As Single
        Public UserMaxZ As Single
        Public UserMinZ As Single
        Public DistThreshold As Single
        Public Units As String
        Public zoomPct As Single

    End Class



    Public Class UDT_HMI_StationStatus
        Public btnAuto As UDT_HMI_Button
        Public btnContinous As UDT_HMI_Button
        Public btnSingleStep As UDT_HMI_Button
        Public btnCycleStart As UDT_HMI_Button
        Public btnCycleStop As UDT_HMI_Button
        Public btnCycleAbort As UDT_HMI_Button
        Public btnTestMode As UDT_HMI_Button
        Public btnMode As UDT_HMI_Button
        Public btnManual As UDT_HMI_Button
        Public btnoptionalStop As UDT_HMI_Button
        Public btnBlockDelete As UDT_HMI_Button
        Public btnEmergencyReturn As UDT_HMI_Button
        Public btnControlReset As UDT_HMI_Button
        Public btnFaultReset As UDT_HMI_Button
        Public Axis01 As UDT_HMI_Axis
        Public Axis02 As UDT_HMI_Axis
        Public Axis03 As UDT_HMI_Axis
        Public Axis04 As UDT_HMI_Axis
        Public Axis05 As UDT_HMI_Axis
        Public Axis06 As UDT_HMI_Axis
        Public Axis07 As UDT_HMI_Axis
        Public Spindle01 As UDT_HMI_Spindle
        Public Spindle02 As UDT_HMI_Spindle
        Public Spindle03 As UDT_HMI_Spindle
        Public Spindle04 As UDT_HMI_Spindle
        Public Spindle05 As UDT_HMI_Spindle
        Public ActivePartProgram As UDT_HMI_ActivePartProgram
        Public AxisFault As Boolean
        Public State As Int32
        Public Mode As Int32
        Public ToolPathGraph As UDT_HMI_toolPathGraph
        Public MachineStatus As UDT_HMI_MachineStatus
        Public FeedRateOverride As UDT_HMI_FeedrateOverride
        Public stopIndicate As Boolean
        Public AxisJog As UDT_HMI_AxisJog
        Public Parameters As UDT_HMI_Spindle
        Public StateModel As UDT_HMI_StateModle
        Public AngleOffset As UDT_HMI_AngleOffset

    End Class




End Module

Read

        completeData = EthernetIPforCLXCom1.ReadUDT(Of HMI_UDT_Class.UDT_HMI_StationStatus)("Test_UDT")


I get this fault
IndexOutOfRangeException: Index was outside the bounds of the array.

6
Open Discussion / Re: ReadUDT Size
« on: November 28, 2023, 07:08:07 PM »
Thank you

7
Open Discussion / Re: ReadUDT Size
« on: November 22, 2023, 08:25:32 AM »
Thank you for trying. This UDT was supplied to me by Rockwell.
The controller is a Compact GuardLogix 5380  5069-L330ERMS2

8
Open Discussion / Re: ReadUDT Size
« on: November 15, 2023, 04:46:52 PM »
Here it is in L5X format.

9
Open Discussion / ReadUDT Size
« on: November 15, 2023, 09:06:08 AM »
Is there a size limit to a UDT?
I have a UDT that is 14244 bytes

10
Support Questions / Re: Update from 399xR1
« on: November 14, 2023, 01:14:06 PM »
Thank you!

11
Support Questions / Update from 399xR1
« on: November 14, 2023, 11:44:27 AM »
I have a solution are in progress with ver. 399xR1.
How can I update the solution to use 399yBeta38?

12
Open Discussion / Adding AHMI to an existing project/solution
« on: November 02, 2022, 10:31:00 AM »
This may be more of a Visual studio question,
How do you add the AHMI tools and Drivers to an existing project?

Pages: [1]