Author Topic: Program Scope Bool Array  (Read 1603 times)

bnunes

  • Newbie
  • *
  • Posts: 2
    • View Profile
Program Scope Bool Array
« on: November 30, 2016, 12:36:29 PM »
Hi,

I came across a small problem while trying to access a program scoped boolean array. While I can read single booleans, DINT and INT arrays, I've not been able to read an array of booleans. But i can read perfectly a controller scope bool array.

string[] result = ethernetIPforCLXCom..Read("PROGRAM:Caminhos.test_dint[0]", 32) -> OK
string[] result = ethernetIPforCLXCom..Read("PROGRAM:Caminhos.test_int[0]", 32) -> OK
string result = ethernetIPforCLXCom..Read("PROGRAM:Caminhos.teste_bool) -> OK
string[] result = ethernetIPforCLXCom..Read("test_bools[0]", 32) -> OK
string[] result = ethernetIPforCLXCom..Read("PROGRAM:Caminhos.test_bools[0]", 32) -> NOT OK (Read Failed. General Error: Offset plus Number of Elements extends beyond the end of the requested tag.,  Status Code=255)

I've double checked tag definition, i tried different naming and lengths, and I can't see what I may be doing wrong.

Any suggestion?

Thank you in advance,

Bruno Nunes

dmroeder

  • Administrator
  • Full Member
  • *****
  • Posts: 217
    • View Profile
Re: Program Scope Bool Array
« Reply #1 on: November 30, 2016, 02:31:13 PM »
What revision are you using? I tested it with 3.99r and it worked fine.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5365
    • View Profile
    • AdvancedHMI
Re: Program Scope Bool Array
« Reply #2 on: November 30, 2016, 04:59:05 PM »
This may be the problem in which the latest patch for 3.99r fixes. If you try to read any element within the last 32 of a BOOL array, it will give the error. See Reply #6 and #10 of the following thread on getting the patch.

http://advancedhmi.com/forum/index.php?topic=1518.msg8204#msg8204
« Last Edit: December 01, 2016, 07:12:11 PM by Archie »

bnunes

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Program Scope Bool Array
« Reply #3 on: December 01, 2016, 07:10:55 PM »
Thank you. I will try and report back.