"rx always return as "empty" at toolbox"
You didn't say what kind of processor you're working with.? Depending on the model, using a "standard" cable could be your downfall.? If you have pins 1, 4, 6 and/or 9 wired in that cable, it could be causing your coms to not work properly.
You also mention a serial "module".? Which one?
You should have a SYMBOL in your program for the RS232 port you have the switch connected to, and signals on the tx$ and rx$ connections of that symbol.? Are you monitoring the signal connected to the symbol's rx$ in debugger?
? - Chip