Problems controlling VXM using Velmex Matlab libraries - buffer overflow

191 views
Skip to first unread message

helplessgradstudent

unread,
Feb 22, 2016, 6:18:09 PM2/22/16
to Velmex Controls
Hello all,

I'm having some issues with a 4-axis stage controlled by 2 VXM units, specifically with how to send commands using the Matlab libraries available here. Maybe someone has experienced a similar issue.

I added the files to my project and set the Current Directory correctly, as specified by the instructions. However, when I run or call MinimumCodeToRunMotor.m (with "DriverTerminalShowState" commands commented out), I get a buffer overflow on the VXM, with the yellow status light blinking continuously. There are no errors shown in Matlab. I can reset the VXM by using the command fprintf(s,'K').

The following Matlab code, using simple serial commands, works fine to move the stage:
s = serial('COM4');
s.Terminator = 'CR';
fopen(s);
fprintf(s,'C,I1M400,R');
fclose(s);

Unfortunately the source code for the libraries is not available, so I am unsure of what to do next. I have already gone through quite some effort to import the C libraries, because I discovered the hard way that there seems to be no C compiler compatible with Matlab in Windows 10, and then I realized that the Velmex libraries are written for 32-bit Matlab while I had been running 64-bit.

Has anyone else seen the buffer overflow error that I'm experiencing? Any tips would be much appreciated.

Thanks!

P.S. DriverTerminalShowState also doesn't work, but I'm going to leave that problem for later.
Reply all
Reply to author
Forward
0 new messages