I finally got it! and removed
strcpy(value,"0000");
Now with your help it is working.
Thank you very much everybody