I use [ client.simxCreateSubscriber] Create a continuous dedicated topic.
I want to modify parameters in the run.So I used this method: remove and then create it.
But This will cause the simulation to jam.But it looks stupid so It doesn't seem to be the right way.
What should I do? Please give me some advice.
How do I modify parameters when the[ client.simxCreateSubscriber] is running
Re: How do I modify parameters when the[ client.simxCreateSubscriber] is running
Hello,
what kind of parameters do you want to modify on the fly? What do you remove and recreate? The subscriber?
With the B0-based remote APi, you better not remove/recreate subscribers constantly. Simply create several subscribers and keep them. Or use a single one of them have have the behaviour modulated by calling simxCallScriptFunction for it: from within the called function (which will be automatically constantly called) you can decide to return valid or invalid data (e.g. if you only want to publish data every 10th simulation step instead of each simulation step, for instance)
Cheers
what kind of parameters do you want to modify on the fly? What do you remove and recreate? The subscriber?
With the B0-based remote APi, you better not remove/recreate subscribers constantly. Simply create several subscribers and keep them. Or use a single one of them have have the behaviour modulated by calling simxCallScriptFunction for it: from within the called function (which will be automatically constantly called) you can decide to return valid or invalid data (e.g. if you only want to publish data every 10th simulation step instead of each simulation step, for instance)
Cheers