A star prime sv and motor driver 24v14

I’m hoping to get some help with a motor driver sketch.

I’m having trouble getting motor 2 to turn on based off the current sensing of motor 1

I have attached the code.

thank you in advance.

motor_1_motor_2_current_sense_auto_restart.zip (1.6 KB)