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

Pages: [1] 2
1
Support Questions / Re: "The path is not of a legal form" error
« on: July 21, 2023, 03:20:02 PM »
I believe I found the source of the problem but it makes no sense to me.

If I run my application in debug mode with a command line parameter I get the error.
If I don't run a command line parameter the path passed to .Read() works as expected.

Example:
RemakePart.exe 17165  in debug mode, Dim val as string = _EthernetCommsMain.Read("RFID_Security.AOI_RFID.To_App_Reset_Request")  produces the error.

RemakePart.exe  in debug mode - no error, read PLC's path and returns the expected value.

Open CMD.exe and run RemakePart.exe 17165 from the same bits/folder - works as expected.

I am not sure what to make of this but I wanted to share what I found.

Thanks,
Shawn R




2
Support Questions / Re: "The path is not of a legal form" error
« on: July 21, 2023, 01:07:29 PM »
Thank you for the responses.

RFID_Security.AOI_RFID.To_App_Reset_Request is a BOOL type

Here is the entire stack trace

   at MfgControl.AdvancedHMI.Drivers.EthernetIPforCLX.BeginRead(String startAddress, Int32 numberOfElements)
   at MfgControl.AdvancedHMI.Drivers.EthernetIPforCLX.Read(String startAddress, Int32 numberOfElements)
   at MfgControl.AdvancedHMI.Drivers.DriverBase.Read(String startAddress)
   at hdPLC.uiPLC.ReadProgramTag(String ProgramName, String Tag) in C:\git\Framework\FrameWork_Libraries\hdPLC\uiPLC.vb:line 235

I have attached the UDT for bachphi.

I would agree it appears to be a VS2019 thing because I can run the exact same block of code in another application and it works fine.  I just have no idea where to go from here!

3
Support Questions / Re: "The path is not of a legal form" error
« on: July 21, 2023, 09:55:01 AM »
The code is as follows

Dim _EthernetCommsMain As New AdvancedHMIDrivers.EthernetIPforCLXCom
        With _EthernetCommsMain
            .IPAddress = IPAddress
            .PollRateOverride = 1000
            .ProcessorSlot = 0
        End With
Dim val as string = _EthernetCommsMain.Read("RFID_Security.AOI_RFID.To_App_Reset_Request")  <--- Error happens on this line.

The path to the tag is valid.  I have tested this path with another application to make sure it was valid.

The error returned by VS2019 is attached.

Thanks for any assistance.
"The path is not of a legal form" is the exact error message I receive.
I am running AdvancedHMIv3.9.9.25.38

4
Support Questions / "The path is not of a legal form" error
« on: July 21, 2023, 08:02:57 AM »
I have a tag that I am trying to read with AdvancedHMIDrivers.EthernetIPforCLXCom.  It is a valid tag but I get the error "The path is not of a legal form".

Here is the crazy thing, it was working and then I did a Build in VS2019 and started getting this error.

I thought I had a corrupted Visual Studio project file so I created a new project and copied the code over to the new project.  The .Read(tagname) command worked for a while.  I did multiple builds and after a few hours the new project stopped working with the "The path is not of a legal form" error.  I have no idea what to do.

Any guidance would be great.

5
In the previous version it did not error. 

However, in the previous version I was not able to use the TreeNode code (https://www.advancedhmi.com/forum/index.php?topic=2670.msg16853#msg16853) because the CLXTemplateObject was not found.

That was why I upgraded.

Thanks for any help you can give me.
Shawn R

6
Open Discussion / GetTagList errors with "Error from Get Attribure List"
« on: January 26, 2023, 08:48:07 AM »
After upgrading to 3.9.9.2538 (AdvancedHMI399yBeta38), I am getting this error when running GetTagList

Dim EthernetIPforCLXCom1 As New AdvancedHMIDrivers.EthernetIPforCLXCom

        With EthernetIPforCLXCom1
            .IPAddress = "192.168.1.9"
            .PollRateOverride = 1000
            .ProcessorSlot = 0
        End With
        Dim AllTags() As AdvancedHMI.Drivers.CLXTag = EthernetIPforCLXCom1.GetTagList

The stack trace is as follows:
"   at MfgControl.AdvancedHMI.Drivers.CIP.CLXTemplateObject.ParseGetAttributeListResponse(Byte[] data)" & vbCrLf & "   at MfgControl.AdvancedHMI.Drivers.CIP.CLXTemplateObject..ctor(Byte[] data)" & vbCrLf & "   at MfgControl.AdvancedHMI.Drivers.CIP.CIPforCLX.GetUDTInfo(UInt16 dataType, UInt16 sequenceNumber, Int64 ownerObjectID)" & vbCrLf & "   at MfgControl.AdvancedHMI.Drivers.CIP.CIPforCLX.GetCLXTags(Int32 timeout, Int32 transactionNumber, Int64 ownerObjectID)" & vbCrLf & "   at MfgControl.AdvancedHMI.Drivers.EthernetIPforCLX.GetTagList(Int32 timeOut)" & vbCrLf & "   at MfgControl.AdvancedHMI.Drivers.EthernetIPforCLX.GetTagList()" & vbCrLf & "   at Test_AdvancedHMI_GetTagList.Form1.Button1_Click(Object sender, EventArgs e) in C:\git\Framework\Framework_Dev_Line4\Test_AdvancedHMI_GetTagList\Form1.vb:line 12"

I am not sure what to try...
Thanks,
Shawn R

7
Support Questions / Re: GetTagList() suggestion for future enhancement
« on: January 26, 2023, 06:28:15 AM »
Never mind.  I am not sure what I was doing wrong before but the code in my post yesterday is working well now.

Thanks,
Shawn R

8
Support Questions / Re: GetTagList() suggestion for future enhancement
« on: January 25, 2023, 04:23:18 PM »
bachphi,

I don't understand what you mean by "try connecting directly with PLC". 

Could you point me in the right direction? 

Currently I am doing this:
       Dim EthernetIPforCLXCom1 As New AdvancedHMIDrivers.EthernetIPforCLXCom

        With EthernetIPforCLXCom1
            .IPAddress = "192.168.1.9"
            .PollRateOverride = 1000
            .ProcessorSlot = 0
        End With

        Dim AllTags() As AdvancedHMI.Drivers.CLXTag = EthernetIPforCLXCom1.GetTagList

Thank you.

9
Support Questions / GetTagList() suggestion for future enhancement
« on: December 21, 2022, 10:02:03 AM »
I have tried to use the AdvancedHMIDrivers.EthernetIPforCLXCom  .GetTagList() on a number of PLCs we have.  It works on some but others fail due to a timeout.  If I set the timeout on a few of the PLCs to a ridiculous amount it still times out.  Those PLCs have a very large amount of tags.

I would like to suggest a new option where the base tag that you want to look at is passed as a parameter and it only looks within that tag.  We have a lot of tags that are UDTs with child lists and UDTs, so in my case it would make sense I believe.

I figured it wouldn't hurt to put it out there.  Maybe you already have something like this.

Thanks,
Shawn R

10
Support Questions / Re: ReadUDT() problem with array of UDT
« on: December 20, 2022, 08:02:58 AM »
Thank you so much, I have it working now.  I hadn't considered that the custom string is a UDT.

Thank you for the example code.  It saved me a lot of time.

Shawn R

11
Support Questions / Re: ReadUDT() problem with array of UDT
« on: December 19, 2022, 04:11:00 PM »
What version are you using? 
I am running 3.9.9.2533.

Thanks again for your help.
Shawn R

12
Support Questions / Re: ReadUDT() problem with array of UDT
« on: December 19, 2022, 07:43:39 AM »
Thank you again for your help.

1.  I saw your statement that custom length strings work.  In my working sample app I made 1 change and that was to make 1 tag have a max length.  This change caused the app to no longer work.  I don't know what I am doing wrong (because custom string lengths should work according to your post) so that is why I am asking for help.
2. I normally use Public Property so that I can define public access to variables.  The ReadUDT() appears to like Public over Public Property when using arrays so I switched to Public in those cases.
3. I changed my sample app's code from using "Public Property" to just "Public" and continue to error when using a custom length string.

Thanks,
Shawn R


13
Support Questions / Re: ReadUDT() problem with array of UDT
« on: December 16, 2022, 03:01:37 PM »
Thank you for the reply, but the problem comes to the surface when a property is a string with a max size defined.

So in your example, if Hi_Limit was a string in the vb code but in the PLC was defined as a string data type with a max character limit.  (see image)

14
Support Questions / ReadUDT() problem with array of UDT
« on: December 16, 2022, 11:30:19 AM »
I am attempting to use the ReadUDT() function with a UDT that has a an array(1).
The array type is a second UDT which has a tag that is a defined length string.

I get an "Index was out of range." error when making the call   plc.ReadUDT(Of sr_ParentUDT)("srTestTag")

The tags are in the attached image.

If I change srTestTag.TestList[0].Name from a defined length string of 20 to just a string it works fine.

If I use ReadUDT() on the array element directly the defined length string works as expected.
plc.ReadUDT(Of sr_ChildUDT)("srTestTag.TestList[0]")


Hopefully this makes sense.  It is hard to describe in words.

Thanks for any help.
Shawn R

15
Support Questions / Re: How to handle ReadUDT() with an array of boolean
« on: December 12, 2022, 10:06:20 AM »
I believe I got it to work.

Public Property BoolTest As New List(Of Boolean) and the Sub New() did not work

Removing the Sub New() and changing BoolTest to

Public BoolTest(31) as boolean solved the issue.

Note, you can't define a Public Property BoolTest(31) as boolean

Pages: [1] 2