Z axis not working properly

I am new to the whole CNC router world. I inherited a used shapeko system (i think) it was fine for the past 2 months until last night. Both the x and y axis work fine in both easel and when I control them from the machine menu. However the z axis only goes down. Even when I tell it to raise it might raise one of 5 times but the other 4 it rotates the opposite direction to lower the bit. The lower function works properly and lowers the bit. It also makes an unusual noise on the raise function of the z axis. I am not sure even where to start on trying to see what I need to repair or start any suggestions?

Usual start would be to check for broken loose wires/connectors. I would then check for proper wiring (colors to terminals). If that checks out, test the motor with no load (remove the belt from the motor). And finally, swap the z motor for one of the others (but test only the z-movement).

Thank you. I am very new to this, so let me ask a few questions if you don’t mind. How do I test the motor? Is it as simple as leave it plugged in and remove it from everything?

Also what am I looking for in loose or broken wires?

sorry one more - could a build up of saw dust do it also?

I own an x-carve, so not familiar with the shapeoko. I can only go off images off the internet.

Dust might cause problems. Use a can of dust-off to gently clean any circuit boards. Make sure belts are free of debris.

Broken wires are just that. Sometimes in the x-carve world a wire might break loose from the connector at the block. Make sure things are plugged in firmly.

Remove the belt from the motor, manually move the z-axis sled, see if it binds. Use the jog buttons in the software to move the Z up and down to see if the motor is still binding.

Swap the motor out for one of the others and repeat testing.

A stepper motor require three things, besides power:
1 - Enable
2 - Step pulse
3 - Direction

The typical stepper motor have two coils that magnetise, equal two wire pairs.
If one of these four wires are broken then the motor will receive all 3 mentioned above, but lack the ability to control direction - and the motor will usually move in the direction of least resistance.

Check your wires, through their entire signal chain.