Author Topic: Micro800 series array tag name  (Read 1004 times)

thunting

  • Newbie
  • *
  • Posts: 6
    • View Profile
Micro800 series array tag name
« on: July 13, 2020, 02:15:56 PM »
Hello,
I'm testing AHMI to use on our plant floor. I'm not experienced with VB. The PLC is a Micro850. I'm using the EthernetIPforMicro800Com driver.

I'm trying a basic tag read and write HMI with a button and a label using the Properties / PLC Properties dialogue. I can read / write to the 1 dimensional array SensorGPM[1] without a problem. I can read / write to the 2 dimensional array Recipe[1,1].

Trying to read / write to the 2 dimensional array Recipe[RecipeSelect,1] results in invalid tag name. Both tags a global. I must have the formatting wrong, can someone please help me out?

Thanks

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5317
    • View Profile
    • AdvancedHMI
Re: Micro800 series array tag name
« Reply #1 on: July 13, 2020, 03:49:11 PM »
I assume RecipeSelect is a tag in the PLC. The PLC cannot decipher tags embedded into another.

You must first read the value of RecipeSelect, then use that value

Dim RecipeSelectValue as string = EthernetIPforCLXCom1.Read("RecipeSelect")
Dim RecipeValue as string = EthernetIPforCLXCom1.Read("Recipe[" & RecipeSelectValue & ",1]")

thunting

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Micro800 series array tag name
« Reply #2 on: July 15, 2020, 10:21:35 AM »
Thank you, I can see the pattern now.