Sign in to follow this  
Followers 0
Chris Elston

Indirect Address Work Arounds for GE 90/30

6 posts in this topic

Anybody out there that has AB and GE experience? This question is for you. I've noticed that GE doesn't support indirect addressing such as the AB PLC. How on earth do you write PLC code without indirect addressing. Argh!!! Well anyway, I think what I can do is shift numbers in and out of registers, but has anyone else came up with good indirect addressing work arounds in a GE 90/30 CPU? How have you done this in the past?

Share this post


Link to post
Share on other sites
Chris, Check out the ARRAY_MOVE and ARRAY_SEARCH instructions. The ARRAY_MOVE sets up two tables of registers (source and destination). You can set additional registers to hold the source and destination indexes. For example, an ARRAY_MOVE instruction with a LEN parameter of 100, source address (SR) %R001, destination address (DS) %R101, source index (SNX) %R201, destination index (DNX) %R202, N (number of elements moved) parameter of 1. With a value of 10 in %R201, and a value of 0 in %R202, when the instruction is executed, the value in %R11 will get copied into %R101. With zero in both %R201 and %R202, the value in %R1 will get copied to %R101. With zero in %R202 and 10 in %R202, the value in %R1 will get copied to %R111. The 90-70 makes it a lot easier. In that one, for indirect addressing, use the address @Rxxx instead of %Rxxx.

Share this post


Link to post
Share on other sites
The newest GE Fanuc PLC the RX7i and RX3i support the same type of indirect addressing as the 90-70.

Share this post


Link to post
Share on other sites
In the example below: %R00001 is the first register in the source array %R00050 is the first register in the destination array %R00100 is the source index or offset, this is how far from the first value you want to start. With GE the value to point to first value in an array is 1 not zero. %R00101 is the destination index or offset. See source rules. The N here is a constant of 5 but can also be a register value. This is how many values to move from the source to the destination. Don't forget LEN. This is easily forgotten but will prevent the code from working. The LEN is the length of the arrays and must be set to the length of the longest of the two arrays. |         _____ |%I00001 |     | |——| |———|ARRAY|— |        |_MOVE| |        |_WORD| |%R00001—|SR DS|—%R00050 |        | LEN | |        |00016| |%R00100—|SNX  | |        |     | |        |     | |%R00101—|DNX  | |        |     | |        |     | | CONST —|N    | |  00005 |_____| | GE Parameter Description enable When the function is enabled, the operation is performed. SR SR contains the starting address of the source array. For ARRAY_MOVE_BIT, any reference may be used; it does not need to be byte aligned. However, 1 bit, beginning with the reference address specified, is displayed online. SNX SNX contains the index of the source array. DNX DNX contains the index of the destination array. N N provides a count indicator. ok The ok output is energized whenever the function is enabled. If NX is out of range, ok will not be energized. DS DS contains the starting address of the destination array. For ARRAY_MOVE_BIT, any reference may be used; it does not need to be byte aligned. However, 1 bit, beginning with the reference address specified, is displayed online. LEN LEN specifies the number of elements starting at SR and DS that make up each array. GE Technical Description Use the Array Move (ARRAY_MOVE) function to copy a specified number of data elements from a source array to a destination array. The ARRAY_MOVE function has six input parameters and two output parameters. When the function receives power flow, the number of data elements in the count indicator (N) is extracted from the input array starting with the indexed location (SR + SNX – 1). The data elements are written to the output array starting with the indexed location (DS + DNX – 1). The LEN operand specifies the number of elements that make up each array. For ARRAY_MOVE_BIT, when word-oriented memory is selected for the parameters of the source array and/or destination array starting address, the least significant bit of the specified word is the first bit of the array. The value displayed contains 16 bits, regardless of the length of the array. The indices in an ARRAY_MOVE instruction are 1-based. In using an ARRAY_MOVE, no element outside either the source or destination arrays, as specified by their starting address and length, may be referenced.

Share this post


Link to post
Share on other sites
DesertDog and Steve, Thanks alot guys. I think this will work for me. I'll be ready to code this in about three weeks. When I get it finished I'll post my code and let you "grade" my work. Thanks again.

Share this post


Link to post
Share on other sites
Hey guys got this working like a champ. I have another system that I will do the software from the ground up, but here is what I edited, (a piece of it). I didn't do the sequence, I only did the pallet tracking code which involves the MOVE-ARRAY. When I write the next one from scratch all add it do the download section, but you can preview what I did attached to this post. Thanks for the guidance, it works really good. Basically each pallet has it's own register r1101 = pallet 1 r1102 = pallet 2 r1103 = pallet 3 r1115 = pallet 15 then each station has it's own register r1201 = station 1 r1202 = station 2 r1203 = station 3 r1215 = station 15 At the top of the code I read the pallet information into the station register. Do the sequence, then set the bits for the pallet while the information is in the station register. Once the sequence is complete, I take the station register and write it back into the pallet register with the arraymove command at the bottom of the code. Worked out sweet. MoveArray.pdf

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0