I use a Boss GT-100 which uses MIDI. Here is how I do it:
Fire up boss, get it to preset User 1. Go to amp, push all the buttons I want for that setting. Write/copy starts flashing. Press write/copy and hold. It flashes. Done.
Go to preset user 2, push all the buttons on amp I want for that setting... press write/copy and hold.
I think you can use the Z9 in MIDI mode right? Might need a power supply for that though.