Search found 13 matches

by matto
Thu Mar 07, 2013 10:50 am
Forum: Application Development
Topic: Get Tag Array Elements by String
Replies: 16
Views: 62674

Re: Get Tag Array Elements by String

OK. Matching the datatype in the code to the tag datatype helps. The root of the problem here is that the tag array was only used in the script, and the "Always Active" box was not checked, so that Tag1 was never getting updated. Hence, it was always zero. I suspect that my original project has the ...
by matto
Wed Mar 06, 2013 4:51 pm
Forum: Application Development
Topic: Get Tag Array Elements by String
Replies: 16
Views: 62674

Re: Get Tag Array Elements by String

Thank you for the example project. Here is what I found: The project as-is works fine (I changed only the target display). The project with a modbus controller and addresses does not work. All I changed was 1. changed the controller from DEMO to a modbus master (tcp/ip) that points to my 3rd party d...
by matto
Tue Mar 05, 2013 11:36 am
Forum: Application Development
Topic: Get Tag Array Elements by String
Replies: 16
Views: 62674

Re: Get Tag Array Elements by String

I may be misunderstanding, but let me throw this out there: I WANT modbus to override the tag arrays. I have another device out on ethernet, and it is supposed to fill these tag arrays. Then, in code, I have to do some parsing. Also, a non array tag displays 40400 correctly, but I cannot grab the va...
by matto
Mon Mar 04, 2013 4:53 pm
Forum: Application Development
Topic: Get Tag Array Elements by String
Replies: 16
Views: 62674

Re: Get Tag Array Elements by String

As a sanity check, //GlobalDataItem eventTag = GetGlobalDataItem("arr_EventRegisterGroup_0"); GlobalDataItem eventTag = GetGlobalDataItem("Event0"); Globals.Tags.Event14.SetAnalog(eventTag[0].Value); works well. The AnalogNumeric 2 finally shows 40995 as expected. This is what I am using for the Get...
by matto
Mon Mar 04, 2013 4:43 pm
Forum: Application Development
Topic: Get Tag Array Elements by String
Replies: 16
Views: 62674

Re: Get Tag Array Elements by String

To simplify further, I tried the following: //remove the local array variable AND change to uint instead of ushort uint arrEvent; GlobalDataItem eventTag = GetGlobalDataItem("arr_EventRegisterGroup_0"); arrEvent=eventTag[0].Value; Globals.Tags.Event14.SetAnalog(arrEvent); and just to be thorough, //...
by matto
Mon Mar 04, 2013 3:54 pm
Forum: Application Development
Topic: Get Tag Array Elements by String
Replies: 16
Views: 62674

Re: Get Tag Array Elements by String

I tried what you suggested, Mark, except that I used Event14. The new analog numeric on the screen also displays Event14 as zero at all times. My Event0 and Event1 tags now point to the first and second addresses of the arr_EventRegisterGroup_0 array also, and they are both non-zero. ushort[] arrEve...
by matto
Mon Mar 04, 2013 1:15 pm
Forum: Application Development
Topic: Get Tag Array Elements by String
Replies: 16
Views: 62674

Re: Get Tag Array Elements by String

I still am not getting it to work. Let me back up and explain a bit more. I have multiple tags set up (name @ modbus address): arr_EventRegisterGroup_0 @ 40400...40413 arr_EventRegisterGroup_1 @ 40414...40427 (irrelevant for this test) Event0 @ 40411 Event1 @ 40412 Event2 (internal) Event3 (internal...
by matto
Mon Mar 04, 2013 11:01 am
Forum: Application Development
Topic: Get Tag Array Elements by String
Replies: 16
Views: 62674

Re: Get Tag Array Elements by String

Thank you for responding. However, its still not working for me: for (int j=0;j<40;j++) { ushort[] arrEvent=new ushort[14]; GlobalDataItem eventTag = GetGlobalDataItem("arr_EventRegisterGroup_" + (j).ToString()); for (int k=0;k<14;k++) { arrEvent[k]=eventTag[k].Values; } //'Neo.ApplicationFramework....
by matto
Fri Mar 01, 2013 4:09 pm
Forum: Application Development
Topic: Get Tag Array Elements by String
Replies: 16
Views: 62674

Re: Get Tag Array Elements by String

Actually, even better: for (int j=0;j<max;j++) { GlobalDataItem eventTag = GetGlobalDataItem("arrTag_" + (j).ToString()); } has worked for me in multiple places in my code. But that GlobalDataItem is an array, and I want each array element of that. eventTag[0], for example. I guess I am not sure whi...
by matto
Fri Mar 01, 2013 12:13 pm
Forum: Application Development
Topic: Get Tag Array Elements by String
Replies: 16
Views: 62674

Get Tag Array Elements by String

I have many tag arrays: arrTag_0[0...13] arrTag_1[0...13] ... arrTag_n[0...13] At a certain point, I process each of them as arrTag_j (j is a loop counter from 0 to n) in a loop by using: ushort[] arrEvent=new ushort[14]; for (int k=0;k<14;k++) { GlobalDataItem eventTag = GetGlobalDataItem("arrTag_"...