DC motors are a feature that has been implemented for B1. The following lines show how a motor is defined that is controlled by a DAC (digital-analog-converter) and a ADC (analog-digital-converter):
def mot41/dev=dc_motor/mod=dc_motor/input="-read_adc(adc1)" \ /output="sdv(dac1)="/before_output="wor(oreg34)=1"\ /after_output="wor(oreg34)=0"\ /limit_min="-5"/limit_max=5/tolerance=0.05/timeout=60
MOT41 can be moved or scanned like any other motor.
The qualifiers before_output and after_output specify commands that are executed before amd after the motor is moved.
The qualifiers limit_min and limit_max specify the limits.
Online waits at most timeout seconds for the motor to reach a position which deviates at most tolerance units from the setpoint.