You will need to use trains.
I believe there is a train tutorial on this site by atom.
Look at it, and if you have any problems with it, ask me. I know tons about trains, since you can do almost anything with trains.
Make a brush (Your Piston) and turn it into a func_train. This obviously is what moves. You can place this anywhere in your map as long as it is not outside the map, because that will cause leaks. It doesn't matter where you put it.
Make a Path_corner (Point entity) where you want your train to start. name it something like "train1". Then, go into your func_train and make the "Path_corner" thing the same name as your path_corner. This will make your piston centered on the path_corner at the start of the map.
Then, you can make multiple path corners. Make sure that you make the "Next Path_corner" option on your first one be the name of your next path_corner.
I'm sure you can figure it out from there.
Any questions, please ask, I typed this in a hurry so its probably confusing, and I might have names entities different things