Closed captain-yoshi closed 10 months ago
Do you have multiple tasks that run in parallel? If yes, this is no supported atm Custom libraries should not be an issue, twingrind even supports adding profiling to multiple libraries, as long there is only 1 concurrent task and 1 PRG and only 1 call to Twingrind.Profiler()
Nope, only one task and one program. Here is what my program looks like after the prepare command:
(* @@ PROFILER @@ *)Twingrind.Profiler.Push(1245984901);(* @@ PROFILER @@ *)
Twingrind.Profiler();
CASE ProgramState OF
0: // Wait one cycle, do noting
ProgramState := 1;
1: // Initialization
....
2:
FOR JointNumber:=1 TO NUMBER_OF_JOINTS DO
IF JointsConfigured[JointNumber] <> TRUE THEN
(* @@ PROFILER @@ *)Twingrind.Profiler.Pop(1245984901); (* @@ PROFILER @@ *)RETURN;
END_IF
END_FOR
...
// Break if not properly reconfigured
FOR JointNumber:=1 TO NUMBER_OF_JOINTS DO
IF JointsConfigured[JointNumber] <> TRUE THEN
(* @@ PROFILER @@ *)Twingrind.Profiler.Pop(1245984901); (* @@ PROFILER @@ *)RETURN;
END_IF
END_FOR
END_CASE
(* @@ PROFILER @@ *)Twingrind.Profiler.Pop(1245984901);(* @@ PROFILER @@ *)
Please swap the first and second line so that Twingrind.Profiler(); is the first command and the Push command comes after it
Twingrind.Profiler();
(* @@ PROFILER @@ *)Twingrind.Profiler.Push(1245984901);(* @@ PROFILER @@ *)
I see that the readme is a misleading here, I usually run the prepare command and only then add the line Twingrind.Profiler(); … I’ll dhange the readme
Sweet ! It now works. Thanks for updating the README.
I have a PLC project which relies on a custom library. When following the procedure, I get his error: