# Produce a unipolar square waveform
# using a table function
#first disable the user looking to modify
!S REF.FUNC.PLAY(2) DISABLED
! S REF.FUNC.TYPE(2) NONE
#Define a trapezoidal table for User 02
! S REF.TABLE.FUNC.VALUE(02) 0|0,0.40|0,0.5|100,0.6|100,0.7|0,1.2|0
# set the user 02 function to be TABLE
! S REF.FUNC.TYPE(02) TABLE
! S REF.FUNC.PLAY(02) ENABLED
# Make it play
# 0204 = [user][basicperiods]
! S FGC.CYC.SIM 0204
# the RMS value of the current is given by:
# Irms = Iflat*sqrt[(tr+tf+3+tflat)/(3*T)]