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!