Velmex - Matlab

28 views
Skip to first unread message

Vini Chenier

unread,
Jun 25, 2024, 11:33:40 AM6/25/24
to Velmex Controls
I am trying to get the position of motor 1 of my Velmex Rotary Stage B4872 via MATLAB. 

Here is the documentation I used :  
 Send position of motor 1 to the host. When the VXM receives the single character " " it will transmit the value from it's motor 1 Absolute Position Register. Below is what the host would receive if motor 1 is at negative 1200. This command can be used when the motor is indexing. 

and here is my code :  
delete(instrfind({'Port'},{'COM3'}));

%Open serial port
s = serial('COM3', 'BaudRate', 9600) ;
fopen(s);

%Make mvmt command
command1 = strcat('C,F,I1M5000,R');

%Send mvmt command
fprintf(s, command1);

% Get motor 1 position?
fprintf(s,'X')

%Close port
fclose(s)

Thank you in advance. 

Vincent
Reply all
Reply to author
Forward
0 new messages