Seriously, what you're saying doesn't make sense. You may think it does, but it doesn't. You seem to be missing something fundamental about how a Timer works.
Forget about code for the moment. Explain precisely how you want your app to behave, step by step, and then we can look at writing code to implement that behaviour because the code you have at the moment is just wrong. We're going round in circles because you're trying top explain what you need in terms of code, but code is the implementation of the solution, not the solution itself.
What's not to understand about a Timer? For my app I set it for 1 second:=1sec on 1sec off,1sec on,1sec off and so on.Or not? Tired of arguing with you about it myself.
So,I'll try to explain as best I can,about what I want. I already have working code for what I need so far,but if you'd like to re-invent "My" wheel, then feel free.Would be easier for us all to get timer1 to stop after the first interval though.
The 1st problem you will have is ,you will need to simulate the signals cause you don't have my dyno.
Here goes.
So basicly I need code to do the following.
The pickup senses signals from the roller ,sent to the PC over any available comport.
(I use the RS232 comport1 connection on my PC.Serialport1 on my form is set to baud rate 115200,so the second problem is this.If we use a USB comport.I will need a serial to usb adapter ,and the most only accept 9600 baud as far as I know).
The program converts the signals into RPM readings from the formula. (the actual
calculations should be in radians. RPM is shown here for easy understanding.
1 RPM = 6.28 Radians).
RPM = (Number of signals per sample / Sampling time) * 60 seconds
Note: The signals from the dyno are generated from a disk, with 6 holes, spinning through an IR device.This means 6 signals per revolution.If your sampling time is 1 sec., then you are measuring frequency (Hz).To get the RPM you must do the math.
Hz. / 6= revolutions per sec.
revs per sec.*60 = RPM
The same as (Hz./6)*60= RPM ,or just Hz*10=RPM.
The program converts the reading into angular acceleration (RPM acceleration)
Angular acceleration = ((Current RPM - Previous RPM) / Sampling Time) * 1 seconds
The program calculates the roller torque based on known roller inertia .
Torque = Rotational Inertia * Angular Acceleration
Then the program calculates the roller power based on calculated torque and roller RPM (angular velocity in radians per second) from the formula
Power = Roller Torque * Angular Velocity
Then the data should be plotted in understandable graphs with the user selected axis. Usually TQ/RPM or HP/RPM or TQ/Time or HP/Time or TQ/Distance or HP/Distance etc.
Programm should start when the first signal from the dyno is present and stop when the signals no longer change ( Top Speed).
Whatever code you write, if any, needs to be something I can edit myself.I have 4 different sizes of rollers for different vehicle types (ie. 2Wd/4Wd,electric/gas powered ect.) each with different inertial properties and need to be able to change parameters in the code as need be.Basicly,each dyno will have it's own software that will only funtion properly with said dyno.
Here some good reading to understand what I'm doing.
Technical Article: How our Inertial Dynamometer Works