The following script will print the Sensor voltages while the motor drive is on Emergency Stop. Normally the phase voltage values should be in the range of 0.2 to 9 V (200 to 9000 mV). A value out of this range may indicate electrical noise, that if coupled in the phases during the MOSFET test, will result in a false MOSfail error. 


The script will keep on printing in a loop the last 100 values before the fault. These logs can be stored any time the USB is connected to the drive. Allow the values being print for 2 seconds and then copy the logs. 


The script follows: 


option explicit

 

dim SN1[100as integer

dim SN2[100as integer

dim SN3[100as integer

dim SN4[100as integer

dim SN5[100as integer

dim SN6[100as integer

dim fault as integer

dim as integer

 

 

Setcommand(_EX1)

wait(100)

 

while (1)

 

    SN1[i] = getvalue(_SNS,1)

    SN2[i] = getvalue(_SNS,2)

    SN3[i] = getvalue(_SNS,3)

    SN4[i] = getvalue(_SNS,4)

    SN5[i] = getvalue(_SNS,5)

    SN6[i] = getvalue(_SNS,6)    

 

    if SN1[i] < 200 or SN1[i] > 9000

       fault 1

       exit while

    end if

 

    if SN2[i] < 200 or SN2[i] > 9000

       fault 2

       exit while

    end if    

 

    if SN3[i] < 200 or SN3[i] > 9000

        fault 3

        exit while

    end if 

 

    if SN4[i] < 200 or SN4[i] > 9000

        fault 4

        exit while

    end if

 

    if SN5[i] < 200 or SN5[i] > 9000

        fault 5

        exit while

    end if

 

    if SN6[i] < 200 or SN6[i] > 9000

        fault 6

        exit while

   end if

 

    wait(1)       

 

    i++

    

    if (100)

        i=0

    end if

 

end while

 

 

while (1)

 

    print("Noise on phase:",fault,"\n")

    

    wait(100)

    

    print("SNS 1\tSNS 2\tSNS 3\tSNS 4\tSNS 5\tSNS 6\n")

        

    for i=andwhile 100    

        print(SN1[i],"\t",SN2[i],"\t",SN3[i],"\t",SN4[i],"\t",SN5[i],"\t",SN6[i],"\n")

        wait(1)

    next

 

end while