Picaxe Programming HELP!

Hi guys, if someone coud make a sample picaxe program for me to use and message it or post it in this forum it woud be greatly appreciated, as i cannot find a program for my system anywhere.

The picaxe is a 14M2 model. It's input is the SRF005 Ultrasonic Range sensor which sends a signal through the picaxe chip (14M2). The output (where the signal is desired to go) is a starter module motor driver kit that is connected to the 14M2 circuit. Only one of the motor driver inputs are being used which is connected to a relay, which that relay is connected to a 12V AC solenoid and a 12 power supply for that solenoid. The idea is to give power to the solenoid without frying the picaxe. The whole purpose of the system is to send a signal from the sensor to activate the solenoid. 

Please help, i need a program to run this system.

It seems like you need to do some homework.

I have no doubt there are a number of people here that could write the program for you. I could probably knock out a good skeleton. I would rather you did the research and show us your work so that we can help with whatever you may have issues with. You will learn very little by someone else writting your program for you. There are a few robots around here that use US and a motor driver with a PICAXE. I would lay pretty good odds that at least a couple have the code included. I will even be nice and suggest you look at China Syndrome by ChuckCrunch. It is using an 08m2(?), but, the code should be similar. I am pretty sure JAX has some US/PICAXE based robots with code posted as well.