C# 클래스 AForge.Robotics.TeRK.Qwerk.Motors

Provides access to Qwerk's motors' controllers.

The class allows to manipulate Qwerk's motors. The total number of available motors equals to Motors.Count.

Sample usage:

// get Qwerk's motors service Qwerk.Motors motors = qwerk.GetMotorsService( ); // stop all motors motors.StopMotors( ); // run first motor motors.SetMotorVelocity( 0, 10000 );
파일 보기 프로젝트 열기: holisticware-admin/MonoVersal.AForgeNET 1 사용 예제들

공개 메소드들

메소드 설명
Motors ( AForge.Robotics.TeRK.Qwerk qwerk )

Initializes a new instance of the Qwerk.Motors class.

SetMotorVelocity ( int motor, int velocity ) : void

Set velocity of specified motor.

The method sets specified motor's velocity, which is measured in ticks per second. "Ticks" is a made-up term, which does not depend on specific motor, but is an unknown in distance and rotation (see Qwerk documentation for details).

StopMotor ( int motor ) : void

Stop specified motor.

StopMotors ( ) : void

Stop all motors.

비공개 메소드들

메소드 설명
CreateCommand ( ) : TeRK.MotorCommand
ExecuteCommand ( TeRK command ) : void

메소드 상세

Motors() 공개 메소드

Initializes a new instance of the Qwerk.Motors class.
The passed reference to object is not connected to /// Qwerk board. Failed connecting to the requested service. Failed accessing to the requested service.
public Motors ( AForge.Robotics.TeRK.Qwerk qwerk )
qwerk AForge.Robotics.TeRK.Qwerk Reference to object, which is connected to Qwerk board.

SetMotorVelocity() 공개 메소드

Set velocity of specified motor.

The method sets specified motor's velocity, which is measured in ticks per second. "Ticks" is a made-up term, which does not depend on specific motor, but is an unknown in distance and rotation (see Qwerk documentation for details).

Invalid motor is specified. No connection to Qwerk or its service. Connestion to Qwerk is lost.
public SetMotorVelocity ( int motor, int velocity ) : void
motor int Motor to set velocity for, [0, ).
velocity int Velocity to set.
리턴 void

StopMotor() 공개 메소드

Stop specified motor.
Invalid motor is specified. No connection to Qwerk or its service. Connestion to Qwerk is lost.
public StopMotor ( int motor ) : void
motor int Motor to stop, [0, ).
리턴 void

StopMotors() 공개 메소드

Stop all motors.
No connection to Qwerk or its service. Connestion to Qwerk is lost.
public StopMotors ( ) : void
리턴 void