nednor

Address incremental copy uses wrong size

4 posts in this topic

Hello there.

I have a problem with the address incremental copy function. I have a integer variable I want to increment the address of by 3 for each copy. But because of the size being 2 I can't get the next copy to have the address 4006. If I put 3 in the offset the next address is 4009, not 4006. And if I use 2 the next address is 4007.  Shouldn't an integer have size 1?

What am I doing wrong, or what is it that I don't understand?

addrinc.JPG.2ee1b73a62bbb9baa23129aecefc

Share this post


Link to post
Share on other sites

What is the Data Type of SPD_Q1?

What is the Instruction you are trying to copy?

I get the shaded out size when I am using a 'Double Value' instruction. Example MOVL (Move Long Value).

Share this post


Link to post
Share on other sites

Address Incremental Copy
To create the same group of ladder instructions more than once, the address incremental copy function can be used to reuse the instructions simply by inputting an address offset. Also, address offsets can be set individually and I/O comments can be created automatically.

What about adding another variable (dummy 4005 address) to your information? Then you will be using three addresses.

Regards,
Garry

Share this post


Link to post
Share on other sites
18 hours ago, IO_Rack said:

What is the Data Type of SPD_Q1?

What is the Instruction you are trying to copy?

I get the shaded out size when I am using a 'Double Value' instruction. Example MOVL (Move Long Value).

intmulti.JPG.3b35e24df91d0894308f64db6ae

This is the rung I want to copy with incrementing addresses. D100 is an INT and 4003 is an INT.

But any way, I figured what the problem was. The result of the multiplication instruction is two words, hence my problem, even if the result only needs one word.

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