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: 6406
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
2 registered (ken-h, John Vomastic) and 23 anonymous users online.
Recent Posts
SECU16IR Output Connecting To A Xantech Connecting Block
by Guy Lavoie
Today at 06:14 AM
SECU16IR Output Connecting To A Xantech Connecting Block
by Jean-Marie
Yesterday at 08:34 AM
how to post an icon
by manu
02/03/12 03:40 AM
Command Pair
by kuro
02/01/12 12:49 AM
Does anyone have a copy of the latest TSE?
by sevenzenith1
01/30/12 05:17 AM
Shout Box

Newest Members
seeooo13, feshh, manu, chuck214, Funkhauser
2747 Registered Users
Forum Stats
2747 Members
19 Forums
3837 Topics
22722 Posts

Max Online: 67 @ 08/16/11 03:08 PM
February
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