Author Topic: Write to tags in a different folder on PLC  (Read 1430 times)

hunkyjohn

  • Newbie
  • *
  • Posts: 2
    • View Profile
Write to tags in a different folder on PLC
« on: March 19, 2014, 09:26:16 AM »
How do I write to tags that are located in a different folder than the first folder. I can write successfully to any tags under the first Folder called "Controller" then a child folder called "Controller Tags" ie. Controller\Controller Tags.

The tags I want to write to are located at a sibling folder "Tasks" then a child folder called "Machine_Task" then a another child folder called "ProblemSolver" and finally "Program Tags"  ie. Tasks\Machine_Task\ProblemSolver\Program Tags. 

I get an error "InvalidCastException was unhandled Conversion from string "Box 1" to type 'Short' is not valid." when I try to write to this new location in the PLC.

I am new at this and I don't know anything about PLC's any help would be appreciated.

Steve

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: Write to tags in a different folder on PLC
« Reply #1 on: March 19, 2014, 09:43:13 AM »
There are two scopes of tags, Controller and Program. To access an Program scope tag, the name must be preceded by "PROGRAM:" following by the program name, then a period, then the tag name. For example:

PROGRAM:Task1.MyTag

hunkyjohn

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Write to tags in a different folder on PLC
« Reply #2 on: March 19, 2014, 09:55:52 AM »
Thanks, that worked.

Steve