ronny_resistor
Member
I have another question hopefully someone can answer for me.
I have a 5/04 Processor and a 24 Vdc digital input card. The program that is executing has a background task (interupt) I have tried to make this sensor count pulses to show number of revolutions, my resolution is quite low, as in Maximum 100 Pulses per revolution. I have tried using the scan time (adding by 1´s) and using a timer to pulse to 30 and 60 seconds it is close but it is never the same. (I averaged the count out by counting pulses to 3006 multiplying by 2 and a second counter counted to 6012, adding these two together then dividing by 2) The machine is quite stable and I see almost no RPM changes on my Handheld Tachometer but my count is all over the place. Does any one have any code that will count the 100 pulses per Rev. and display it. I don't want to wait for 5 minutes during ramp up to stabelize the count either, it would be nice to show the count as the machine ramps up.I have a digital input card. I have tried the IIM statement and the HSC statement neither has given me any satisfactory results.
incidentally the target is aproximately 1 inch wide, the sensor sees the target for the complete 1 inch. the diameter of the tube that is rotating is aproximately 15 inches. all i want is 45, 46, 45, 44, 45. what i am getting is 44, 47, 41, 42, 44, 40 I think the scan is affecting the count.
Thanks in advance for any assistance here, I am starting to get lost in what I thought was simple.
I have a 5/04 Processor and a 24 Vdc digital input card. The program that is executing has a background task (interupt) I have tried to make this sensor count pulses to show number of revolutions, my resolution is quite low, as in Maximum 100 Pulses per revolution. I have tried using the scan time (adding by 1´s) and using a timer to pulse to 30 and 60 seconds it is close but it is never the same. (I averaged the count out by counting pulses to 3006 multiplying by 2 and a second counter counted to 6012, adding these two together then dividing by 2) The machine is quite stable and I see almost no RPM changes on my Handheld Tachometer but my count is all over the place. Does any one have any code that will count the 100 pulses per Rev. and display it. I don't want to wait for 5 minutes during ramp up to stabelize the count either, it would be nice to show the count as the machine ramps up.I have a digital input card. I have tried the IIM statement and the HSC statement neither has given me any satisfactory results.
incidentally the target is aproximately 1 inch wide, the sensor sees the target for the complete 1 inch. the diameter of the tube that is rotating is aproximately 15 inches. all i want is 45, 46, 45, 44, 45. what i am getting is 44, 47, 41, 42, 44, 40 I think the scan is affecting the count.
Thanks in advance for any assistance here, I am starting to get lost in what I thought was simple.