Actually, can i use both IR LED and IR SENSOR in same microcontroller? Coz when ever i put irin commant besides the irout command, the irout stops working.
The IRIN is a "blocking" command where it waits for data to be received before proceeding to the next command.
If you are thinking in terms of sending and receiving at the same instant then . . .
I believe this has been done using some rapid and cunning technique - try a search of the PICAXE forum on this matter.
Otherwise, in general, the PICAXE chip can only do one thing at a time so while sending an IR signal it cannot at the same received data or perform any other task.
Some PICAXE chips do permit a timeout parameter whereby if no data is received within a specified time frame the command stops waiting and the program branches to a specified label. Again see the PICAXE manual 2 or use the "BASIC Commands" link at the top of these forum pages to read more on this topic.
Note also, you have posted in the Sandbox area which is generally used for members to test ideas, etc.
For general questions forum members should post in the "
Active Forum" area where more members look in general and you will likely receive more rapid resonses and from a greater number of other members.