I’m modifying a working urcap that embeds an xmlrpc server so that the program can access values set in the installation node (basically the installation node provides functions that call the xmlrpc methods and those use model.get).
Now I added a method that stores values (i.e. uses model.set) and that stops the program execution (I tried on the simulator, a colleague tried on the real robot and it says it stops but it’s neither in run or in stop mode, the schröedinger robot ).
I tried to wrap the method in a TimerTask and in an EventQueue, same result.
I tried to add a ProgramNode that in turn calls the xmlrpc method, same result.
The “funny” thing is the sequence of messages in the log (I added some log messages to my method):
- Program xxx starting
- My method starts
- My method ends
- Program xxx started
- Program xxx stopped
i.e. my method is called before the program has started (even if there are several program nodes before the one invoking the function).
The highlited node is where it stops. The following one is my program node that does the same, and it would stop there if I remove node 10.
Forgot to say: I’m using the 1.10.0-sdk, I looked at the release notes of 1.11.0 and 1.12.0 (I cannot use 1.13.0 since it’s not available for cb3 robots) and I couldn’t see any improvement/fix related to this issue.
The datamodel is used to persist the program and installation. If you are changing the running program the execution is stopped.
So the behavior you experience is intended. Can you elaborate on your use case?
I guessed so (though a log message or something indicating the abuse/misuse of the api would have been helpful).
Since this urcap is used to create recipes to screw several parts (i.e. in each recipe you define the screw points for the first part then the first screw of each additional part), the use case would be to keep a running total of correct/incorrect operations for each recipe/part/screw, show it in the urcap itself and/or export it as a csv file.
I know this is not the best way (especially for the wear and tear of the flash memory) but that’s what I’ve been asked to do.
I could keep the results in an sqlite database, though it wouldn’t be that good for the flash memory either.