varenius / salsa

Code developed for the 2.3m radio telescopes SALSA in Onsala, Sweden
MIT License
16 stars 6 forks source link

MD01 rot2prog adaptation #43

Closed varenius closed 3 years ago

varenius commented 3 years ago

With planned use of MD01 control unit to replace RIO-based unit, some changes are necessary to the control code. This ticket can track some notes on this progress.

Good summary of MD01 commands at http://ryeng.name/blog/3. We use rot2prog2 protocol.

varenius commented 3 years ago

More commands are supported as described in the excel document available on request from the manufacturer SPID elektronik.

varenius commented 3 years ago

It is possible to change the angle readings without moving the motors by pressing "F" on the unit which will display "Motor angles" and then move the angles up/down. Could be nice to do the same via software control, if pointing adjustments are needed? There is a "calibration" mode (K-column=F9) which perhaps could be used for this. Don't know what it does yet.

Also, when calibrating we need a fixed reference. We can use elevation limit switches to know the reference point in elevation (and our proximity sensor installed in azimuth to get az reference point). However, because of the inertia of the system, we may need to run with the same power every time we hit the limit in elevation (and stepping in az), otherwise we arrive at different actual physical reference points. This could perhaps be achieved via the power-command (K=F7), with PH,PV=0..64 = power for motor 1 and 2 respectively.

varenius commented 3 years ago

It is also possible to send low-level motor on/off commands using K=14.

varenius commented 3 years ago

MD01 az limit seems to be given in "native" units. I.e. an actual limit of 370 degrees is achieved by setting the max angle to +10 degrees. So, to allow commanded angles from -10 to +370 degrees, we set the limits to -350 and +10.

varenius commented 3 years ago

Everything works with MD01. Important finding: Never send commands more often than twice per second, according to manufacturer (SPID Elektronik). I switched to once per second, and many problems (PULS TIMEOUT) went away!

What remains is to implement a new "reset" feature.

varenius commented 3 years ago

Main work to use MD01 is done, so closing this. Further specific additions can be tracked in their own tickets.