Controlling Nanotec N5 motor controller using matlab webread and webwrite commands
1 回表示 (過去 30 日間)
古いコメントを表示
I am using Nanotec N5 motor controller that is shipped with a built in web interface called NanoIP.
Using this interface I can query data from the controller object dictionary using webread. For example
>> webread('http://169.254.58.57/od/6060/00')
ans =
02
Now I would like to write values as well, however, each time I try I fail and get an error messages. For example if I input the data as characters:
>> webwrite('http://169.254.58.57/od/6060/00','01')
I get this error:
Error using readContentFromWebService (line 45)
The server returned the status 400 with message "BAD REQUEST" in response to the request to URL http://169.254.58.57/od/6060/00.
Error in webwrite (line 132)
[varargout{1:nargout}] = readContentFromWebService(connection, options);
and if I input data as numbers:
>> webwrite('http://169.254.58.57/od/6060/00',1)
I get this error:
Error using webwrite (line 126)
The media type 'application/x-www-form-urlencoded' is not permissible for numeric or logical data.
Am I doing something wrong here? Should I use different data type?
0 件のコメント
回答 (1 件)
Mohammad Moataz
2019 年 1 月 28 日
2 件のコメント
Chris
2020 年 12 月 2 日
Hello,
firstly thanks for your information’s! They are really helpful for me! I use the Nanotec controller N5-2-3 and the function "webread" works fine but for "webwrite" I always get an error "Time out after 5 seconds". I try a lot of things e.g. change the header but the problem still existed. May you have an idea?
Thanks a lost!
コミュニティ
その他の回答 パワー エレクトロニクス コミュニティ
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!