1 800 642-6446 Toll-free
1 585 657-6151 In New York
VelmexControls
Velmex
|
BiSlide
|
XSlide
Download
Download Driver
How To
Add To Your Project
Call From Your Project
Driver Functions
LoadDriver
ReleaseDriver
DriverTerminalShowState
PortOpen
PortClose
PortIsOpen
PortSendCommands
PortReadReply
PortCountChars
PortSearchForChars
PortClear
PortRemoveChars
MotorPosition
PortWaitForChar
PortWaitForCharWithMotorPosition
DriverResetFunctions
Example Code
Examples
VXM Driver Documentation - MATLAB 7 - Examples
All functions assume you followed directions in the "How To Add To Your Project"
Examples
Minimal Code
WITHOUT
Wait
Below is the MINIMUM amount of code to make a motor move.
function M = MinimumCodeToMoveMotor
LoadDriver
%The DriverTerminalShowState command is for debug purposes
%and not necessary to move the VXM motor
DriverTerminalShowState(1, 0) %Show Terminal on Desktop
PortOpen(1, 9600) %Open Com1 at 9600 Baud
PortSendCommands('F,C,I1M400,I1M-400,R') %Motor 1 Move 400 steps each direction
PortClose
DriverTerminalShowState(0, 0) %Hide Terminal
ReleaseDriver
end
Minimal Code
WITH
Wait
Below is the MINIMUM amount of code to make a motor move if you want your code to wait for the VXM program to finish before your code continues.
function M = MinimumCodeToMoveMotor
LoadDriver
%The DriverTerminalShowState command is for debug purposes
%and not necessary to move the VXM motor
DriverTerminalShowState(1, 0) %Show Terminal on Desktop
PortOpen(1, 9600) %Open Com1 at 9600 Baud
PortSendCommands('F,C,I1M400,I1M-400,R') %Motor 1 Move 400 steps each direction
PortWaitForChar('^', 0) %Halt program until VXM sends a "^" (program complete)
PortClose
DriverTerminalShowState(0, 0) %Hide Terminal
ReleaseDriver
end