Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: rbenz on December 08, 2014, 10:16:05 PM
-
I have set up conversion utility for converting a bunch of analog inputs into engineering units.
I have 4 real files for rawmin rawmax, engmin and engmax. I used a For Next routine with using V10 as both the indexer and the pointer - the first loop starting at 0 to 12, no problems. The next for next same V10 starting at 100 to 153 again no problems. The last analog input i again set a for next loop starting v10 at 200 to 212. It wouldn't run. I tried all sorts of things and finally had to move 200 into v10, do a scale INC and repeat over and over. I tried a bunch of things to solve this riddle even putting in a hard input inside the for next but it would latch. Im wondering if the Do more has some sort of limit on For Next Loops??
Thanks
-
There is not a limit on the FOR/NEXT.
Is this all inside a task?
Could you post your program or screenshots?
-
No limit. Happy to look at it. You can post here, or send it to support@hosteng.com.
-
Attached is a PDF of the program. The first two loops are fine as they correctly scale the WX - analog inputs - and stuff them into "R" values. The last loop doesn't run at all. I disabled the scale routine and put in run that merely moved the wx into the R and still no luck.
To get around the problem I had to put in the scaling in sequenced ladders, duplicating the loop with a bunch of ladders.
-
You have your FOR Index:V13, From: 200, To: 8.
You cannot count down with an FOR. If you want to count down then add a MATH box inside the loop that will invert the index.
-
You cannot count down with an FOR.
Yeah...sorry. We wanted to, but it was going to make the instruction implementation harder, so we opted to keep it simple.
-
Thanks. I went to a Math box and it worked. Ill buy you a beer.
-
Glad you got it going.
For the benefit of future forum users, could you post your updated program?
Thanks.