Jump to content

Search the Community

Showing results for tags 'subscripts'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • PLCs and Supporting Devices
    • General Topics - The Lounge
    • Allen Bradley / Rockwell Automation
    • Omron
    • Mitsubishi
    • Siemens
    • Automation Direct
    • GE / Emerson
    • Festo
    • Modicon / Telemecanique / Schneider Electric
    • Other PLCs
    • Download Comments

Categories

  • Allen Bradley
    • PLC Sample Code
    • HMI Sample Code
    • Demo Software
    • Manuals, Tutorials
  • GE
    • PLC Sample Code
    • HMI Sample Code
    • Demo Software
    • Manuals, Tutorials
  • Omron
    • PLC Sample Code
    • HMI Sample Code
    • Demo Software
    • Manuals
    • Tutorials and Quickstarts
    • Tech and Application Notes
    • Other Omron Products
    • Utilities
  • Mitsubishi
    • PLC Sample Code
    • HMI Sample Code
    • Demo Software
    • Manuals, Tutorials
  • Modicon
    • PLC Sample Code
    • HMI Sample Code
    • Demo Software
    • Manuals, Tutorials
  • Automation Direct
    • PLC Sample Code
    • HMI Sample Code
    • Demo Software
    • Manuals, Tutorials
  • Siemens
    • PLC Sample Code
    • HMI Sample Code
    • Demo Software
    • Manuals, Tutorials
  • Miscellaneous
    • Tutorials and Guides
    • Hugh Jack, Ph.D., PLC Books
    • Robots and Servos
    • Vision Systems
    • Other PLC Demo Software
    • Free Utilities

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


WhatsApp


WeChat


Line


Telegram


Discord


AIM


MSN


Yahoo


Skype


Location


Interests

Found 1 result

  1. Array A INT[32] Array Index B INT Destination C INT I am trying to move an Array (A) Element (A[2]) using a symbol (B) in ladder into a destination symbol (C) C = A [ B ] Result: ERROR: Array Index of Operand 1 out of range at rung 1 ( 6, 0 ). The documentation suggests that it is possible, but I am unsure if there is something I am doing incorrectly. Note* Fixed indexing works with no errors Is there another method to accomplish this? PLC : CJ2M CPU31 CX- Programmer: Verion 9.74 Update 1: If I go online to the PLC It does look like the array look up is working. Is the issue with the mov block? Update 2: I changed the memory locations which has caused a different error to appear. This error is clearer but does not explain the manual excerpt I posted further up ERROR: Only the constant can be specified for the index of the array. at rung 5 ( 6, 0 ). Update 3: Solution 1 I managed to hack together a proof of concept using pointers and indirect offsets Update 4: Solution 2 For some strange reason things work as expected inside of the function blocks so I made one where the array is In-Out and with an input and output respectively. Note* External reference to pointers inside of the function block produced an error. Function block Logic Update 5: Solution 3 Now I feel like I am going crazy, I tried just the original code again and it works... I have no idea why and if it was not for all the documentation I would be lost as to why it works now... Update 6: Conclusion It seems to have array indexing work the array index must exist in the D Memory Block. The reason it did not work above is because I somehow had a MOVR block when I tested after moving all the variables to the D Memory Block. I hope this journey helps someone else :)
×
×
  • Create New...