My first pass on getting my lathe turret working went okay. It turns out that shell scripts are way too slow for what I was trying to do.
The plan was to, using an M101 script, energize the rotator solenoid, which raises the turret table and starts it rotating. I then monitor the four bit binary position input for a match between the requested tool position and the current tool position. As soon as a match occurs, I activate the stop dog solenoid, wait for the table to settle, deactivate the rotator solenoid, wait for the table to descend and lock, and finally deactivate the stop solenoid. On most of the steps, the table would rotate two or more positions before an action took place. So, I went back to my pre-feedback plan. I setup the script to only rotate the table one position - rotate, sleep .1, stop, sleep .1, de-rotate, sleep .1, de-stop, check for match, repeat till done or tender. It actually works pretty well. The problem is that scripts are interpreted or compiled while the program executes. Python is the same way, I believe, so it would have the same speed issues? I may convert my script to C and then call the C program from an M101 script. Kirk Wallace ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users