View Single Post
Old July 21st, 2021, 01:06 PM   #3
Steve Bailey
Lifetime Supporting Member + Moderator
United States

Steve Bailey is online now
 
Steve Bailey's Avatar
 
Join Date: Apr 2002
Location: The boondocks of Western Massachusetts USA
Posts: 7,609
The 90-30 did not support indirect addressing. The Array instructions are a work-around. You should be able to duplicate the function by creating a 33-element integer tag array in Studio 5000 and using indexed addressing to copy one of the elements of the array to a destination tag.

The ARRAY_MOVE instruction in your example defines a source array of 33 integers starting at %R5001. It also defines a destination array of the same length starting at %R6000, although only %R6000 is actually used. The value in %R7003 at SNX parameter is the index into the source array. The N parameter specifies that one value is moved. The DNX parameter specifies that the value gets moved to the first element of the destination array (%R6000). So, if %R7003 contains a value of 5, the function copies the contents of %R5005 to %R6000.

Last edited by Steve Bailey; July 21st, 2021 at 01:19 PM.
  Reply With Quote