Problem with "SendCommand" API method

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem with "SendCommand" API method

Jump to solution
1,048 Views
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 Kudos
1 Solution
1,018 Views
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

View solution in original post

0 Kudos
2 Replies
1,019 Views
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 Kudos
1,039 Views
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 Kudos