Jan 21, 1999 (from E-mail to the TASS mailing list) HOW TO USE THE MARK III VCO SERVO PROGRAM Chris Albertson --------------------------------------------------- I keep my Mk III control computer outdoors in my unheated, detached garage. The temperature is not constant there. So I have to do a trial and error thing with the VCO setting every time the weather changes. It is pretty cold now (at 11:30PM it is 50F.) and the VCO is off so I thought I'd write that servo program and fix the problem once and for all. The attached program will set a Mk III's VCO so as to maintain a specified constant scan period. For you servo experts here is what I did: 1) Query the running Mk III driver for the current VCO setting and the current scan period. 2) Compute error in period (period-setpoint) 3) Compute what the VCO setting _should_ be based on the slope of a VCO vs. Scan Period plot 4) Tell the driver to set the VCO half way to the value computed in #3. This is a seat of the pants design. Comments are welcome. The program is simple enough that even if you don't read Perl you can still follow it. I have done a little testing, not enough yet to trust it 100% but it seems to work. Result: When I start up the servo with a setpoint a bit off the current period I notice the system adjusts the VCO in big steps. As we get closer to the desired value the step size gets smaller. I think this is the way it should be. On my system 1 VCO unit equals -0.0001 seconds. The servo seems to keep the error in the period at about .0002 seconds. Sometimes the error is as high as .0004 seconds. There is a small amount of "hunting". The VCO setting moves around over a two or three unit range which corresponds to the above reported error. HOW TO USE THIS: 1) Start up the server as you normally would. Get the initial VCO setting in your config file "close". 2) Edit the assignment statements at the start of the program as per the comments. 3) Run the program by typing it's name at the shell prompt. You can run this on any computer that has a network connection to your real- time computer or you can run it on the real-time computer itself. (This program is written is Perl and does not need o be compiled.) 4) Watch the output. There is lots. Check that it is setting the VCO correctly. 5) Try this test: set the VCO manually, while the servo program is running. check that the servo fixes this. It should only take a minute or so to get the setting back on track. The program itself is short so I have attached it to this e-mail so that maybe a few people that do know about servos but who would not download and run this would take a look at it. I'd like to hold the error in the scan periods to < 0.0002 seconds.