02-20-2006 12:15 AM
02-20-2006 09:59 AM
Hi RQsz,
This looks to be a problem that should be very simple to solve using an FSM within a while look with each state containing case statements to deal with the conditions you have laid down. Unfortunately I don't really understand your algorithm as some of the code appears to be redundant i.e.
if (R4=1) then {R4=0; R3=1}
if (R3=1) then {R3=0; R2=1}
if (R2=1) then {R2=0; R1=1}
looking at this code if R4=1 then the value will cascade down as you're setting the next bit, so you know that if R4=1 then R2 will always be 0 and R1 will always be 1.
I'm wondering if you meant :-
if (R4=1) then {R4=0; R3=1}
else if (R3=1) then {R3=0; R2=1}
else if (R2=1) then {R2=0; R1=1}
I'm also a bit confused by setting Decrease and Increase to 1 at the beginning of the sequence, and then testing this condition halfway through when you don't need to, as you know they'll always be 1.
It looks as though it should be fairly straight forward problem, but it needs a bit more detail in the explanation.
02-20-2006 10:54 AM
02-20-2006 11:45 AM
02-20-2006 02:01 PM
02-20-2006 10:16 PM
David's solution is good , but a pic of it will not help you since he uses case structure with multiple conditions.
Either he has to post a pic of each case or still better, will somebody convert it to 6.1 and pass it to rqsz??
02-21-2006 01:07 AM
02-21-2006 05:48 AM
02-21-2006 10:40 AM
Hi rqsz,
Two Save for Previous and here we go--I've attached the VI in LabVIEW version 6.1. I hope that this helps (although it's still a great idea to take a look at the evaluation version). Please let me know if you have trouble with this VI.
Good luck!
Megan B.
National Instruments
02-22-2006 02:53 AM
Thanks for transforming it to Labview 6.1.
RQsz