RHINO RMCS –2303 Operating Manual page 31

Hide thumbs Also See for RMCS –2303:
Table of Contents

Advertisement

Functions for position control mode
rmcs.Absolute_position(slave_id,-10000);
10000 long int b=rmcs.Position_Feedback(slave_id);//Take position
feedback from drive Serial.println(b);
Special Functions
rmcs.SAVE(slave_id);
//Save all parameters
rmcs.RESET(slave_id); //Reset drive to default
parameters, rmcs.ESTOP(slave_id);
drive rmcs.STOP(slave_id);
rmcs.SET_HOME(slave_id);
0 rmcs.Restart(slave_id);
Description of code and functions used
#include<RMCS2303drive.h>
Include Downloaded library in code to use available functions for controlling RMCS2303 drive in all
modes. If
Library is not installed then follows steps as per described in "Library Installation".
RMCS2303 rmcs;
Make an object for class RMCS2303. Any object name can be set instead of "rmcs". Use the same
class in
all functions.
byte slave_id=7; int INP_CONTROL_MODE=265; int PP_gain=32; int PI_gain=16; int VF_gain=32;
int LPR=334; int acceleration=20000; int speed=320;
Set all necessary parameters value as per application.
and type
of control, values are given in Hex in Appendix 1 so convert it in integer then store in
INP_CONTROL_MODE
rmcs.Serial_selection(1);
Set hardware or software serial port to be used. Boards like Arduino Uno have only one hardware
serial port
this gets used by usb-serial. In this case software serial should be used to communicate with drive.
Boards like Arduino mega have multiple hardware serial ports, in this case use hardware serial.
Hardware Serial port:
rmcs.Serial_selection (0);
//Move to absolute position -
//E-stop the
//Stop motion
//Set current position to
//Software restart drive.
variable.
LPR
is Lines Per Rotation.
//Serial port selection:0-Hardware serial,1-Software serial
Software Serial Port:
https://www.robokits.co.in/
INP_CONTROL_MODE
rmcs.Serial_selection (1);
depends on Mode
31 |
P a g e

Advertisement

Table of Contents
loading

Table of Contents