How to communicate with Newmark Systems linear stage?
15 次查看(过去 30 天)
显示 更早的评论
I'm trying to use Matlab to communicate with a linear stage that uses its own programming language. There is very little information on it because the company wants you to use their provided software. I am able to connect to the serial port, but any ASCII commands sent don't do anything. What am I missing??
0 个评论
回答(1 个)
Guy Lipworth
2019-9-13
There are a couple of motor options that come with the Newmark stages. I have the MDrive motor, which has a built-in encoder and does not need a separate motion controller; I don't know if that's the one you have.
I'm also in the process of trying to interface it with MATLAB; have you had any luck?
I have been able to control it using Schneider Electric's SEM Terminal software using the various examples & documentation they provide (the motors are by SE) on their website. For example, look here: https://motion.schneider-electric.com/example-mcode/basic-motion-sample-2/
I asked Newmark systems for info on interfacing with MATLAB and that's what I was told:
"We do not have sample MATLAB code. To use it with MATLAB, open the COM port and send the appropriate commands to the MDrive. Below are some example commands:
VM=100000 ’set velocity to 100000 steps/sec
MR 300000 ‘move relative 300000 steps
MR -400000 ‘move relative -400000 steps
The scale factor for the eTrack is 25000 steps/mm for the 2 mm pitch lead screw version or 4166.666 steps/mm for the 12 mm pitch version."
They'll provide you with MCode.PDF file listing the commands, or you can find these on your own online. I hope that MATLAB control can be achieved by simply opening a serial port and sending the appropriate commands (you may need additional hardware like a USB-to-RS485 converter, depending on your motor model. In hindsight I should have tried to get an ethernet-controlled motor).
3 个评论
Guy Lipworth
2019-9-13
Thanks! I'll give this a shot.
I also inquired with Newmark; the linear stage I have has switches at the ends to notify the motor when it reached the end (before it hits the bumper), but they appeared to be doing nothing. Newmark's response was:
"It looks like a FD (factor default) command was sent, clearing the setting we download to the MDrive. Type in the commands in the attached file. These are the values we send to the motor:
'MDRIVE
'Stage: ET limits
'Rev: A
S1 = 2, 1, 0 'Limit Plus
S2 = 3, 1, 0 'Limit Minus
HC = 10 'Motor Holding Current
RC = 70 'Motor Running Current
A = 1000000 'Acceleration
D = 1000000 'Deceleration
MS=250
LM=4
S
Guy Lipworth
2019-9-13
I also reached out to Schneider Electric and they responded with example MATLAB code (which I haven't tested yet, but figured I'll let you know).
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!