I am just posting here without creating a new thread.
Why don't you open a new thread? You have a complete different question.
I am new to Karel but trying to understand all the functions.
I have created the code to send and receive the values from the controller to the PLC via a ProfiNET.
But unfortunately it is not working.
What do you mean by 'it is not working'?
Imho this code even won't be compiled. So it can't work.
F.e. you define an array of integer: FANUC_OUT
then you use FANUC_OUT as a structure FANUC_OUT.bHCodeREQ[i].
This will not be compiled.
Your main program
--SECTION 4: MAIN PROGRAM
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
BEGIN
WRITEHM
END WRITEHM
doesn't do anything but calling itself, so what other things should this program do instead of nothing?
Even worse, this is a endless recursive calling, you will get a stack overflow or something similar.