justwhy2003 Posted May 22, 2009 Report Posted May 22, 2009 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
Veganic Posted May 22, 2009 Report Posted May 22, 2009 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...
Crossbow Posted May 28, 2009 Report Posted May 28, 2009 I would move a K value to bits, such as MOV K4 K2M0. This would write 00000100 to M0 through M7.
Veganic Posted May 28, 2009 Report Posted May 28, 2009 (edited) 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 May 28, 2009 by Veganic
panic mode Posted May 29, 2009 Report Posted May 29, 2009 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:
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now