Sign in to follow this  
Followers 0
CoolBreeze

Mitsubishi

3 posts in this topic

Q02HCPU GX Dev. 8.32J version Registers Spare Registers D100 D300 D101 D301 D102 D302 D103 I want to know if there is an easier way to add 4 registers and divide the sum by 4 to get an average. I know that I can [+ D100 D101 D300] , then [+ D102 D300 D301] , [+ D103 D301 D302] , and then [/ D302 K4 D110] , which this will give me what I want, but I didn't know if you coul add all the values and divide in some sort of expression. AB will let you ( (D100+D101+D102+D103) / 4 ), so I was wondering if there is an easier way with Mitsu.?

Share this post


Link to post
Share on other sites
You can use [WSUM D100 D300 K4], then divide. Edited by Mitsu

Share this post


Link to post
Share on other sites
Thank you, that worked a whole lot easier than having 3 lines of code.

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