matlab connection

Typically: "How do I... ", "How can I... " questions
Post Reply
sampits
Posts: 20
Joined: 11 Feb 2020, 11:15

matlab connection

Post by sampits »

Hi im making a connection with matlab and i have a problem :)
okbro=sim.simxSetIntegerSignal(clientID,'ok1',0,sim.simx_opmode_oneshot_wait);
when i have the operation mode oneshot_wait it always gives me 0 and if i dont have the wait part it always gives me one but i obviously want it to change between 0 and 1. really lost on this one.

coppelia
Site Admin
Posts: 10366
Joined: 14 Dec 2012, 00:25

Re: matlab connection

Post by coppelia »

Hello,

not sure what you want to achieve. Have a look at what the return codes mean. Setting an integer signal will not return anything useful (it is setting something, not getting something), except whether the function executed correctly (that's the return code).

So calling:

Code: Select all

sim.simxSetIntegerSignal(clientID,'ok1',0,sim.simx_opmode_oneshot);
is just fine, and will set that signal OK1 to 0, in CoppeliaSim. Make sure to carefully read how the legacy remote API works, in order to avoid confusions.

Cheers

Post Reply