Hi Kiven,
You can see in the image below how to manage your own function in processor expert code. Write your function in any other part out from the main function, then you have to add the prototype of the function just like a global variable. You can use your function in any part of your code, I hope the image explains all clearly.

Where says "Do not write your code here" it is because this for the use of PE, just a security measure. If you write your code there every-time you generate new code with Processor Expert all the code that is written there will be erased.
I hope this information can help you.
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. It would be nice!
-----------------------------------------------------------------------------------------------------------------------
*************************************************************************************************************
Hola Kevin,
La imagen te muestra cómo manejar el uso de tus propias funciones. Primero debes de escribir la función en cualquier parte fuera de main, después tienes que agregar el prototipo de la función como si agregaras una variable global. Puedes usar tu función en cualquier parte del código, espero que la imagen explique todo con detalle.
Donde dice "Do not write your code here" es porque esto es uso exclusivo de PE, como una medida de seguridad. Si escribes código ahí cada vez que generes nuevo código con Processor Expert ese código se borrará.
Espero que esta información te ayude.
-----------------------------------------------------------------------------------------------------------------------
Nota: Si esta respuesta responde tu pregunta, porfavor dale Click en el botón Correct Answer. Muchas gracias!
-----------------------------------------------------------------------------------------------------------------------