Download NIRC2 Programmer`s Manual
Transcript
In practice these keywords do not behave as expected. All motor motions are performed by invoking subroutines which are stored in the motor controllers’ non−volatile memories (refer to section ‘’), in most cases, the subroutines perform two moves so as to compensate for backlash, and there is no mechanism for terminating a subroutine that is executing, short of a software reset. As a result a STOP will usually occur before the backlash move thus only the ‘slew’ will be killed and the backlash move will still occur. The command may have to be issued at least twice in succession, although the backlash move is so quick that it can usually not be prevented. The STOP keywords are write only and invoke either the sliderCommand() function or the wheelCommand() function, within sliders.c and wheels.c, as per the mechanism type. The calling sequences follow. Keyword library calling sequence: keyword_write (keyword.c) sliderCommand or wheelCommand (sliders.c or wheels.c) stopMechanism (mechanisms.c) motorStop −> motorCmd (motor.c) motorcmd_1 (motor_clnt.c RPC) Motor daemon calling sequence: motorcmd_1 (clientFuncs.c) animaticsCmd −> sendCommand (animatics.c) 3.29 TARG The TARG suffix provides for keywords to drive a mechanism to a named position. This is very similar to the behavior of NAME keywords except for that TARG keywords do not change while the mechanisms are moving. The TARG keywords will be automatically set whenever motion commences, in response to the writing of the keyword, which causes motor motion, but they will not be altered during the motion. This also implies that reading TARG keywords return the last values to which they were set and does not involve reading the current motor positions. A mechanism’s position names, ordinal position numbers, angular or distance positions, and encoder positions are all specified in the mechanism−specific configuration files (refer to sections ‘’ and ‘’). When a mechanism is moved via the setting of its TARG keyword, the corresponding encoder position is derived and the associated motor is commanded to that position. If an unknown name is specified then the motor is not moved and an error is returned. The writing of a TARG keyword will cause the corresponding TRGT and DEST keywords to be updated (refer to sections and ) and motor motion to be initiated. When a mechanism’s TARG keyword is read the returned value is the last value to which it was set, which may be ‘Unknown. When a TARG keyword is written, either the moveSliderCmd() function or the moveWheelCmd() function, within sliders.c and wheels.c, is invoked as per the mechanism type. The write calling sequences follow. Keyword library calling sequence: