Sign in to follow this  
Followers 0
Brad

Micologix 1200

7 posts in this topic

Wrote a formula to count or try to count past the number 32767. Trying to keep track of cycles between rebuilds. Attached a copy of the formula, will this work. Or is there a better way? Edited by Brad

Share this post


Link to post
Share on other sites
Why use the counters at all. Can't you ADD 1 to your float file instead of counting up

Share this post


Link to post
Share on other sites
Just used the counters because they are already in the program.

Share this post


Link to post
Share on other sites
Here's another brute force method. This should tell you over 1 billion served Just noticed that my program is for a slc 5/04 not a 1200! The one shots are different (aren't they????) Edited by brucechase

Share this post


Link to post
Share on other sites
how about this? ... I think this is what Wordman had in mind ... and yes, the OSR is an ONS in the 1200 ... Edited by Ron Beaufort

Share this post


Link to post
Share on other sites
You are already using a floating point number F8:5 in rung 44 for the final result so just ditch the extra rungs, the extra multiply statement, and just use a one shot add and create your counter with a single rung of logic as shown here. I've alternately shown a counter using a long L integer. The ML1200 has long 32 bit integers avalable in L files. By using a 32 bit long (L) integer you can count to over 2.1 billion. A floating point counter will begin to loose precison at about 16 and a half million counts. While the processor supports a floating point number much larger than that, you no longer are able to resolve a value of one and at that point adding just one to F8:5 will no longer increase its value. Its not my intent to launch in to a long diatribe why that is so with single precison floating point numbers (something for you tor research if you really want to know) but rather I just wanted you to be aware of it. (try this sometime: Enter 16777230 into a floating point register and try adding 1 to it with an add instruction) Use a compare instruciton istead of a DN bit if needed. Edited by Alaric

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