some debug, code added on libPLC, test in main.c