Sign in to follow this  
Followers 0
CobiaCruiser

Struct with Variable Index for CJ2M

3 posts in this topic

So I am working on a project where I am using "XFER" command and I am trying to move some words from a place into location: global_variable_1[Variable2]."Struct_Name"[INT1].member1.

The problem is that whenever I try to make "INT1" into a tag variable with data type integer. It does not work. I think this is considered a 2D array? Is this even possible? Also I did see other posts that sounded similar, but I could not make a direct connection. I have some other PLC's in my facility that seem to be able to do this with Sysmac Studio, but not with CJ2M and cx-programmer.

Is this possible to do what I want and if not is there a work around?

Share this post


Link to post
Share on other sites

That's not a 2D array, it's an array inside a structure.  But I am more familiar with Sysmac, not sure if CJ2M had this option or not.  Why is Struct_Name inside quotes?

Share this post


Link to post
Share on other sites

No particular reason why I put Struct_Name in quotes. I was trying to set it aside more. Looking at it now it appears very unnecessary.

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