Problem with "SendCommand" API method

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Problem with "SendCommand" API method

ソリューションへジャンプ
2,054件の閲覧回数
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,024件の閲覧回数
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,025件の閲覧回数
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,045件の閲覧回数
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 件の賞賛
返信