problem in sending serial data to monochromator controller
이전 댓글 표시
I have a AMS DCB-241 Stepper motor controller controlling the Monochromator's grating motion.
I am trying to automate this system with MATLAB, i am using serial communication port USB-SIN11 adapter cable to connect computer to the controller.
With the propitiatory software commands like ex. '-1000' (move the grating to 1000nm clockwise), '+1000' move the grating to 0th positing anticlock wise) 'V=1000' (slew speed 1000 steps/s) etc...
When i send these commands through the Matlab code, Controller is NOT responding by moving the stepper motor in the monochormator.
Can you please help me out in resolving ths issue? Is there a problem with the code?
Kindly do the needful and oblige.
Here is the mat lab code i wrote:
s1 = serial ('com3', 'BaudRate', 9600, 'DataBits', 8);
fopen(s1);
fprintf (s1, 'i=50');
fprintf (s1, 'k=100,100');
fprintf (s1, 'v=1000');
fprintf (s1, '-8908');
pause (20);
fprintf (s1, '-213');
pause (10);
fprintf (s1, '-240');
pause (10);
fprintf (s1, '-133');
pause (10);
fprintf (s1, '+9494');
pause (20);
fclose(s1);
delete(s1);
Thanks in advance
채택된 답변
추가 답변 (1개)
Shailendra
2014년 1월 21일
카테고리
도움말 센터 및 File Exchange에서 Texas Instruments C2000 Processors에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!