What if the generated pulse is longer (say 10x of the specified 60 ms)
Will it damage solenoid? Will it still correctly turn on/off.?
No it will actuate again if the timing is not followed, so make sure the timing and voltage are followed properly.
The electrical current applied to a latching valve is very brief,
typically in pulses of 20 to 50 milliseconds. The device's electrical
control system must control these pulses precisely. If they are too
short, the valve will not respond and if they are too long the valve
will open and then close again or vise versa. This is commonly
referred to as re-latching. The voltage must also be stable not
varying more than +10% or -15% of rated voltage.
Source: https://www.solenoidsolutionsinc.com/custom-solutions/latching-solenoid-valves--low-energy/
I was thinking of using pwm(pulse wave modulation) technique to
generate pulse. So I was thinking of using 60% duty cycle for time
period of 100ms. Then after sleeping for 100ms, I would disable pwm.
So there is always potential of two pulses instead of one, (or more)
going out. Am I thinking on correct lines?
A better way is to use a hardware timer on the microprocessor (which is available on almost any processor) to run the GPIO's. If that can't be done then use a loop and lock out interrupts while using the loop to avoid timing issues.