Sign in to follow this  
Followers 0
TerryRWood

AB SLC5/03 Bit staus math

3 posts in this topic

Hi guys.... I looking for an easy way to add up how many outputs are currently running, which obviously are a 1 status, I was going to use this value in a math equation... Any Ideas? Seems simple enough... Just never tried it Terry

Share this post


Link to post
Share on other sites
Quick off the top of my head answer: Use indirect addressing and a for next loop that increments an integer by one for each true bit. The attached program has not been tested, and was written very quickly, so may contain errors, but might be of some help. ADD_OUTPUTS.RSS

Share this post


Link to post
Share on other sites
Thanks Ken.... As usual, the machine design plan has changed in the middle of me writing the program. I may be able to use this tidbit in the future... I'll study it Thanks again You DA Man

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