ADICON Support Forum Applied Digital, Inc.
Page 2 of 2 <12
Topic Options
#21940 - 07/07/10 01:09 AM Re: Code for Blinds - SECU16 [Re: Just Another Joe]
ghdfans2010 Offline
newbie


Registered: 07/07/10
Posts: 3
 Originally Posted By: Just Another Joe
At line 003, you have IF RELAY IS OFF, two THEN lines, and at line 006 IF RELAY IS ON followed by a THEN line at line 007. Couldn't you replace line 007 with an ELSE, and remove line 006? I.e. musn't the relay be either on or off; no other state?

In any case, just to reinforce Guy's comments about the 'skip' instruction: I presently have a 2000 line program which loops 12 to 14 times per second, because when there are no input stimuli, most of the code is 'skipped' over.



Hey,Just Another Joe!I agree with you!
_________________________
GHDcheap ghd

Top
#21941 - 07/07/10 05:21 AM Re: Code for Blinds - SECU16 [Re: ghdfans2010]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
In that particular case yes, you could. This is because both statements are nested inside the test for the single triggering event at line #1 and are normally skipped over (line #2).
_________________________
"If you don't know what you're doing, do it neatly..."

Top
Page 2 of 2 <12


Moderator:  Dan Smith, Monte G, ADI Tech Support, Guy Lavoie 
Hop to:
Who's Online
0 registered and 65 anonymous users online.
Recent Posts
Secu16 inputs not working correctly
by ADI Tech Support
10/03/17 06:01 AM
Ocelot Battery
by ADI Tech Support
09/22/17 07:38 AM
Shout Box

Newest Members
brigiel, vevevie, zhutree, 416, saiqul
3003 Registered Users
Forum Stats
3003 Members
19 Forums
4003 Topics
23440 Posts

Max Online: 132 @ 11/13/16 10:07 AM
October
Su M Tu W Th F Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31