RobotStudio event

S4ProgramLoad with IRC5 [WebWare SDK]

I'm having a problem with the S4ProgramLoad command.

The problem occurs with Interlink 4.6 and RobotWare 5.06. In this example I've two programs on the robot, PROGA.PGF and PROGB.PGF. PROGA.PGF points to PROGA.MOD and PROGB.PGF points to PROGB.MOD.

I'm doing the following command from the PC.

helper.S4ProgramLoad(0, "ctrl:(HOME$)/PROGA.PGF", 3, resultId);

Now it works correct. The program PROGA is loaded.

Then we do the following command from the PC.

helper.S4ProgramLoad(0, "ctrl:(HOME$)/PROGB.PGF, 3, resultId);

The program PROGB is now loaded. The problem is that the module PROGA.MOD is not deleted, it still remains in the memory.

If I do the same thing directly from the FlexPendant the PROGA.MOD is automatically deleted.

Is this a correct behaviour?