Problem with "SendCommand" API method

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Problem with "SendCommand" API method

跳至解决方案
2,050 次查看
lucabarbiero
Contributor IV

Hello,

I have configured my FreeMASTER project with one application command, which is handled on target side. This is the definition:

lucabarbiero_0-1660652631957.png

And everything works as long as I use the desktop app. Now I want to send this command from MATLAB through the ActiveX server, but I fail as follows:

lucabarbiero_1-1660652736692.png

And I get the same error message, whatever the string I pass to SendCommand. What am I doing wrong? I have followed this piece of documentation:

lucabarbiero_2-1660652834960.png

 

What is the right syntax to use in the string I pass to SendCommand?

 

Regards,

Luca

 
 

 

 

0 项奖励
回复
1 解答
2,020 次查看
TomasK
NXP Employee
NXP Employee

Hello,

reason for the error is another mandatory argument unfortunately missing in the documentation:

Boolean argument "wait" - set true to wait for the command processing to finish.

So the line could look like:

pcm.SendCommand('enableLogging(1)', false);

 

The documentation will be updated in the next version.

 

Thanks.

Tomas

在原帖中查看解决方案

0 项奖励
回复
2 回复数
2,021 次查看
TomasK
NXP Employee
NXP Employee

Hello,

reason for the error is another mandatory argument unfortunately missing in the documentation:

Boolean argument "wait" - set true to wait for the command processing to finish.

So the line could look like:

pcm.SendCommand('enableLogging(1)', false);

 

The documentation will be updated in the next version.

 

Thanks.

Tomas

0 项奖励
回复
2,041 次查看
lucabarbiero
Contributor IV

Eventually I found out by myself what the right API method usage is. It seems that

pcm.SendCommand('enableLogging', '1');
 
works. So with the argument passed as a second parameter.
0 项奖励
回复