Red Car Thank you for your advice.
I appreciate your help and I am tidying up the program with indents.
I got some advice from gerivega and fixed the problem its working well.
Getting back to your earlier email where you suggested serial printing for debugging.
I totally agree and thanks for the tip.
I tried to load that bit of code that you gave me into my program and could not work out where to put it.
Also how would I connect a printer ? I have printer connected to my computer but …
I also note that there is a serial monitor as part of the IDU screen (if that is what it’s called) can I use that ? is that what I could use?
I feel much better now things seem to be working
Cliff