IR beam break detection

I've failed to get this circuit working.

#define PIN_IR_DETECT 4 //tied to output of IR detector
#define IR_TRANS_PULSE_PIN 5 //tied to DATA pin of transmitter
unsigned long PULSE_WIDTH; //pulsewidth of IR receiver output
boolean IR_REC_STATUS; //is IR receiver output active LOW or HIGH?


void setup()
{
  Serial.begin(9600);
  pinMode(IR_TRANS_PULSE_PIN, OUTPUT);
  pinMode(PIN_IR_DETECT, INPUT);
  analogWrite(IR_TRANS_PULSE_PIN,127);//turn IR emitter on 1msec, off 1 msec
  
}

void loop(){

  
  PULSE_WIDTH = pulseIn(PIN_IR_DETECT, LOW);
  IR_REC_STATUS = digitalRead(PIN_IR_DETECT);
 
  Serial.print ("Pulse Width =  ");
  Serial.print (PULSE_WIDTH);
  Serial.print ("      IR Receiver Status =  ");
  Serial.println (IR_REC_STATUS);
 
}

I tried two TSOP1738 receivers. Due to the opposite digital reads of their outputs, I suspect one is bad. I read the output to the DATA pin of the transmitter with a meter (has frequency/duty function)and verified that the frequency is 1khz with a duty cycle of 50%. The output of the serial monitor is below.

Pulse Width =  0      IR Receiver Status =  0
Pulse Width =  0      IR Receiver Status =  0
Pulse Width =  0      IR Receiver Status =  0
Pulse Width =  0      IR Receiver Status =  0
Pulse Width =  0      IR Receiver Status =  0
Pulse Width =  0      IR Receiver Status =  0
Pulse Width =  0      IR Receiver Status =  0
Pulse Width =  0      IR Receiver Status =  0
Pulse Width =  0      IR Receiver Status =  0
Pulse Width =  0      IR Receiver Status =  0


Pulse Width =  0      IR Receiver Status =  1
Pulse Width =  0      IR Receiver Status =  1
Pulse Width =  0      IR Receiver Status =  1
Pulse Width =  0      IR Receiver Status =  1
Pulse Width =  0      IR Receiver Status =  1
Pulse Width =  0      IR Receiver Status =  1
Pulse Width =  0      IR Receiver Status =  1
Pulse Width =  0      IR Receiver Status =  1
Pulse Width =  0      IR Receiver Status =  1
Pulse Width =  0      IR Receiver Status =  1
Pulse Width =  0      IR Receiver Status =  1
Pulse Width =  0      IR Receiver Status =  1
Pulse Width =  0      IR Receiver Status =  1 


Pulse Width =  6295      IR Receiver Status =  1
Pulse Width =  220      IR Receiver Status =  1
Pulse Width =  214      IR Receiver Status =  1
Pulse Width =  220      IR Receiver Status =  1
Pulse Width =  220      IR Receiver Status =  1
Pulse Width =  220      IR Receiver Status =  1
Pulse Width =  214      IR Receiver Status =  1
Pulse Width =  220      IR Receiver Status =  1
Pulse Width =  220      IR Receiver Status =  1
Pulse Width =  220      IR Receiver Status =  1
Pulse Width =  220      IR Receiver Status =  1
Pulse Width =  220      IR Receiver Status =  1
Pulse Width =  220      IR Receiver Status =  1
Pulse Width =  218      IR Receiver Status =  1
Pulse Width =  220      IR Receiver Status =  1
Pulse Width =  220      IR Receiver Status =  1

The first two groups of text are the results of plugging in one receiver then the other. The last group is the result of no receiver installed leaving pin 4 of the Arduino floating. That last group indicates to me that pulseIn functions.

Something that I observed while viewing the serial monitor confuses me. When either receiver is installed the serial monitor updates about once every second. When not installed the data on the serial monitor scrolls very quickly as if it's updating as fast as the sketch allows.

Chagrin, I would rather have used those type of receivers. Wish I would have know about them.

terryking228, Those do look nice but, in this case, a bit pricey for me especially considering shipping costs when compared to a component that costs less than $2 and free shipping if you don't mind the wait. For a project that demanded reliability I would spend the money for peace of mind.

Thank you all for your replies. Got any ideas on what is going on here? - Scotty