Author Topic: Slc500 Indirect addressing  (Read 1733 times)

kenjacoby

  • Newbie
  • *
  • Posts: 3
    • View Profile
Slc500 Indirect addressing
« 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

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5317
    • View Profile
    • AdvancedHMI
Re: Slc500 Indirect addressing
« Reply #1 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.

kenjacoby

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Slc500 Indirect addressing
« Reply #2 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