AdvancedHMI Software

General Category => Open Discussion => Topic started by: kenjacoby on March 10, 2017, 10:37:37 AM

Title: Slc500 Indirect addressing
Post by: kenjacoby on March 10, 2017, 10:37:37 AM
Good morning.  Is there a way to access a tag indirectly?  I am trying to access N63:[N7:0].  This is using the SLC ethernet IP driver.

Thanks,
Kenneth
Title: Re: Slc500 Indirect addressing
Post by: Archie on March 10, 2017, 10:43:47 AM
Maybe something like this:

EthernetIPForSLCMicroCom1.Read("N63:[" & EthernetIPForSLCMicroCom1.Read("N7:0") & "]")

As for doing it with the PLCAddress* properties, it is not possible.
Title: Re: Slc500 Indirect addressing
Post by: kenjacoby on March 10, 2017, 01:32:11 PM
Thanks, this is what I ended up coming up with after posting this thread. 

read
            tag(0) = Label2.Text & ":" & BasicLabel1.Text
            Label3.Text = EthernetIPforSLCMicroCom1.Read(tag(0))

write
               Dim tag = Label2.Text & ":" & BasicLabel1.Text
                EthernetIPforSLCMicroCom1.Write(tag, TextBox1.Text)

The labels are the integer file I want to read, N63 for instance.  Then the basic label reads the current part number for the recipe file, so in this example it gives me N63:34.   Then I have a text box with the value I wish to set the tag to.

Thanks,
Kenneth