View Full Version : SELECT withing IF/THEN?
polymemnon
3rd February 2010, 07:50 PM
The Help file says that SELECT blocks cannot be used within SEQUENCEs, but what about within IF/THEN and IF/THEN/ELSE blocks?
I'm getting a Check Script error, and I think this is the problem, but I'm not sure.
Bob Church
4th February 2010, 10:15 AM
Hi Polymemnon,
Probably. It generally doesn't like function blocks within if/then blocks. The script is single-threaded and can't stop. If it has to wait on ainything in the block and while it's waiting the if goes FALSE, then the inner block may never complete or complete but run erratically. On a single-threaded processor, it can completely stall the machine. The error check in the script editor should put the cursor at the point in the script where it detected the error, usually just past the actual error.
Best regards,
- Bob
The StickWorks
http://www.stickworks.com
Powered by vBulletin® Version 4.1.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.