Indirect addressing in UDTs and Arrays (Logix 5000)

rrparker07

Lifetime Supporting Member
Join Date
Jun 2010
Location
Winston, GA
Posts
89
Need a little help with my son's AP Statistics project! I am writing some code for my son to test reaction time variance based on music volume. He is testing 6 subjects at a time, 3 male and 3 females. Each subject get 3 tests at different volumes and there are 10 reaction recordings for each volume. He has to test a total of 36 students. I"m trying to limit the amount of code I have to write for this.

What I've planned so far is using 6 "running test" arrrays for the current test. I created a UDT called "Treatment Log" for each of the 36 students. The UDT has the 3 different volume arrays with 10 elements each. What is the best way to get this info to my storage locations? I was going to use the COP instruction but I couldn't see how to point to the right place.

Thanks in advance for your help!
 
I guess the way to do this is with indexed not indirect addressing. I'm still doing something incorrectly as I am getting an "invalid array subscript" error. The syntax I used is test_array[Y] with test_array defined as dint[10] and Y is a dint. I dunno.
 
Figured it out. I created my tag reference y at the bottom of the "edit tags" screen and it still had the asterisk on it. We are good!
 

Similar Topics

Howdy folks, I am an Allen Bradley guy currently living in an Emerson world. Working with Rx3i on PacSystems Machine Edition v. 9.6? i think...
Replies
3
Views
611
Hello, I'm very new to programming with absolutely zero schooling in this field and pretty hands off training in my new role, it's been fun...
Replies
4
Views
663
Hello Friends, I am trying to index M Bits, however GX Works2 is not allowing it with following message. https://ibb.co/zPcqj6M...
Replies
3
Views
1,372
Hi All, which the best way to do the indirect addressing in an optimize DB? Ccurrently this is my partial code inside an FB...
Replies
7
Views
2,267
Hey everyone, Just used the PLC5/Logix migration utility to convert a program, and while addressing the PCEs, I noticed a lot of errors for "XIC...
Replies
12
Views
1,949
Back
Top Bottom