RCM 3100 - reading inputs of pwm type

I am trying to read a sensor, currently through port PD5. I know my sensor gives out a PWM signal of i.e. 5ms pulse, and I have connected that wire to PD5.
Now to warn you, these digital territories are unkown to me, so I’m not really sure what I’m doing and what’s the right way to do things. I have used the RdPortI() command to read the input signal and I’m printing the output on the screen as a signed integer. The numbers I see are 255 when not connected and 174 connected (which actually switches to 255 and 174 occasionally). What am I expecting to see? Shouldn’t I see a pulse coming in at say 50Hz or whatever the sensor’s cycle is? Is there an easier way to read PWM inputs?