Sign in to follow this  
Followers 0
justwhy2003

6 status change over

7 posts in this topic

Hi Is there a command in an Fx3u that i can use to change the status of 6 M registers on a rolling basis? I have 6 dutys for 3 blowers (123, 132, 213 etc) that can be changed by the user. In the past i have had 2 duties that either the user can change or I pulse the alt command every monday morning to toggle the duty automatically. Is there an easy way to do this with 6 duties where i can maybe pulse a command that sets M1 this monday morning and clears M2..M6 then next monday mornings pulse set M2 and clears M1 and M3..M6? or will i need to use some extra coding? Thanks Justin

Share this post


Link to post
Share on other sites
There are drum sequencers INCD and ICNR which might be worth a look.. It might be easier to code it yourself if you just want to set M1,then M2 etc each week, using a Z index or similar. Or even create an STL/SFC chart to deal with the sequence. Examples might follow....depending on time...

Share this post


Link to post
Share on other sites
I would move a K value to bits, such as MOV K4 K2M0. This would write 00000100 to M0 through M7.

Share this post


Link to post
Share on other sites
Using a FX1n... Note : additional bits are used. (For FX2 or 3 the mul. can be replaced with a ROR) Edit : The first M1 should be M0..oops. Edited by Veganic

Share this post


Link to post
Share on other sites
which is faster for CPU? B=A*2 or B=A+A

Share this post


Link to post
Share on other sites
I dunno, but I'd guess at A+A?

Share this post


Link to post
Share on other sites
you are correct. there are huge improvements in modern CPUs so difference is getting smaller but in most cases it is still there. even for desktop processors it took decades before simple multiplication was one clock. i remember time when multiplication was taking hundreds of clock cycles (division was even worse) so it was common to write lengthy code using more efficient instructions to get faster execution time (and today we have to live with bloat of garbage on our computers....). here is execution time for few FX instructions:

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