Generation working and Compilation of MARTe components
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import time
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
import test_async
|
||||
import test_sync
|
||||
import test_ready_hw
|
||||
import test_setup_hw
|
||||
import test_standby_hw
|
||||
import test_ready
|
||||
import test_setup
|
||||
import test_standby
|
||||
|
||||
|
||||
""""
|
||||
Test GYB operation with Async mode.
|
||||
This code can be executed when WaitPermit state.
|
||||
"""
|
||||
# turn on permit
|
||||
print '2.. set PulseLengthLimitMode to 1 flag'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1.SVAL 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-MD1-LIM 1000000', shell = True)
|
||||
time.sleep(1)
|
||||
print '3. Write PERMIT'
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM.SCAN Passive', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM.SIML ', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM.SIMM 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM 1', shell=True)
|
||||
time.sleep(1)
|
||||
# trun on HVON trigger
|
||||
print '4. Write HVON'
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SCAN Passive', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SIML ', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SIMM 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 1', shell=True) #HVON signal from PLC
|
||||
time.sleep(11)
|
||||
print '5. Confirm generated pulse'
|
||||
print '6. Reset HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 0', shell=True)
|
||||
time.sleep(1)
|
||||
print '7. Reset PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM 0', shell=True)
|
||||
print "end of async, non-prepro mode test!"
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import time
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
import test_async
|
||||
import test_sync
|
||||
import test_ready_hw
|
||||
import test_setup_hw
|
||||
import test_standby_hw
|
||||
import test_ready
|
||||
import test_setup
|
||||
import test_standby
|
||||
|
||||
#
|
||||
# Some EPICS PVs need to be simulation mode when we test code without PXI board.
|
||||
# When user uses sim mode, new value must be written into PV.SVAL and PV itselfself.
|
||||
#
|
||||
print '### Start State Machine Sequence Test ###'
|
||||
|
||||
print '---------- Pre setup for the test ----------'
|
||||
test_setup.test_setup()
|
||||
#test_setup_hw.test_setup()
|
||||
|
||||
print 'Enter to continue test:'
|
||||
inpval = raw_input()
|
||||
################################################################################
|
||||
# set SELECT and STANDBY signal
|
||||
################################################################################
|
||||
print '---------- WatiStandby test ----------'
|
||||
test_standby.test_standby()
|
||||
#test_standby_hw.test_standby()
|
||||
|
||||
print 'Enter to continue test'
|
||||
inpval = raw_input()
|
||||
|
||||
################################################################################
|
||||
# set READY and CCPS_ON_REQUEST signal
|
||||
################################################################################
|
||||
print '---------- WatiReady test ----------'
|
||||
test_ready.test_ready()
|
||||
#test_ready_hw.test_ready()
|
||||
|
||||
print 'Enter to continue test'
|
||||
inpval = raw_input()
|
||||
################################################################################
|
||||
# set PERMIT and ON signal
|
||||
################################################################################
|
||||
print 'Simulate PERMIT signal. State should go to WaitHVON state'
|
||||
while(1):
|
||||
print '''Select test type and push enter key:
|
||||
1: GYA / Async mode
|
||||
2: GYB / Async mode
|
||||
3: Two Gyrotron operation
|
||||
4: Mode limit detection
|
||||
5: Short pulse
|
||||
6: Long pulse
|
||||
7: PrePro operation
|
||||
8: SYNC mode operation
|
||||
9: GYA / Async mode --- operator set delay and pulse length on HMI
|
||||
10: GYB / Async mode --- operator set delay and pulse length on HMI
|
||||
'''
|
||||
inpval = raw_input()
|
||||
|
||||
if inpval == "1":
|
||||
test_async.test_async_GYA()
|
||||
elif inpval == "2":
|
||||
test_async.test_async_GYB()
|
||||
elif inpval == "3":
|
||||
test_async.test_async_both()
|
||||
elif inpval == "4":
|
||||
test_async.test_async_limit()
|
||||
elif inpval == "5":
|
||||
test_async.test_async_shortpulse()
|
||||
elif inpval == "6":
|
||||
test_async.test_async_longpulse()
|
||||
elif inpval == "7":
|
||||
test_async.test_async_prepro()
|
||||
elif inpval == "8":
|
||||
test_sync.test_sync()
|
||||
elif inpval == "9":
|
||||
test_async.test_async_GYA_manual()
|
||||
elif inpval == "10":
|
||||
test_async.test_async_GYB_manual()
|
||||
else:
|
||||
print 'invalid value. Enter 1 to 10!'
|
||||
continue
|
||||
|
||||
print '..... End of test code .....'
|
||||
@@ -0,0 +1,414 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import time
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
|
||||
def test_async():
|
||||
""""
|
||||
Simulate permit signal and ON signal from PLC.
|
||||
Confirm pulse generation with async mode. 10ms
|
||||
"""
|
||||
print '1.set beam-on schedule (10ms diff + 3s pulse.)'
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-HVON 10000000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-HVON 20000000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PMF:STAT-DT-HVON 30000000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-SWON 40000000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-SWON 50000000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-DT-SHOTLEN 1000000', shell=True)
|
||||
# turn on permit
|
||||
print '2.. set PulseLengthLimitMode to 1 flag'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1.SVAL 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-MD1-LIM 10000000', shell = True)
|
||||
time.sleep(1)
|
||||
print '3. Write PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM 1', shell=True)
|
||||
time.sleep(1)
|
||||
# trun on HVON trigger
|
||||
print '4. Write HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 1', shell=True) #HVON signal from PLC
|
||||
time.sleep(1)
|
||||
print '5. Confirm generated pulse'
|
||||
print '6. Reset HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 0', shell=True)
|
||||
time.sleep(1)
|
||||
print '7. Reset PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM 0', shell=True)
|
||||
print "end of async, non-prepro mode test!"
|
||||
|
||||
def test_async_limit():
|
||||
""""
|
||||
Mode Limit Stop test.
|
||||
Pulse lenght was set to 3s, but it stop in 1s because of mode limit.
|
||||
"""
|
||||
print '1.set beam-on schedule'
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-HVON 1000000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-HVON 11000000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PMF:STAT-DT-HVON 21000000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-SWON 31000000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-SWON 41000000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-DT-SHOTLEN 3000000', shell=True)
|
||||
# turn on permit
|
||||
print '2.. set PulseLengthLimitMode to 1 flag'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1.SVAL 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-MD1-LIM 1000000', shell = True)
|
||||
time.sleep(1)
|
||||
print '3. Write PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM 1', shell=True)
|
||||
time.sleep(1)
|
||||
# trun on HVON trigger
|
||||
print '4. Write HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 1', shell=True) #HVON signal from PLC
|
||||
time.sleep(6)
|
||||
print '5. Confirm generated pulse'
|
||||
print '6. Reset HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 0', shell=True)
|
||||
time.sleep(1)
|
||||
print '7. Reset PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM 0', shell=True)
|
||||
print "end of async, non-prepro mode test!"
|
||||
|
||||
def test_async_prepro():
|
||||
"""PrePro mode test"""
|
||||
print '1.set beam-on schedule'
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-HVON 100000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-HVON 200000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PMF:STAT-DT-HVON 300000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-SWON 400000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-SWON 500000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-DT-SHOTLEN 3000000', shell=True)
|
||||
print '2.. set PulseLengthLimitMode to 1 flag'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1.SVAL 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-MD1-LIM 10000000', shell = True)
|
||||
time.sleep(1)
|
||||
print '1.Set Pre-Pro flag'
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-PREP-MODE 1', shell = True)
|
||||
time.sleep(1)
|
||||
print '2.Reset Mode 1 flag'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1.SVAL 0', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1 0', shell = True)
|
||||
print '3.Write PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM 1', shell=True)
|
||||
time.sleep(2)
|
||||
print '4.Write HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 1', shell=True)
|
||||
time.sleep(4)
|
||||
print '5.Reset HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 0', shell=True)
|
||||
time.sleep(3)
|
||||
print '6.Reset Pre-Pro flag'
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-PREP-MODE 0', shell = True)
|
||||
time.sleep(1)
|
||||
print '7. Reset PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM 0', shell=True)
|
||||
print 'end of async, prepro mode testscript!'
|
||||
|
||||
def test_async_shortpulse():
|
||||
"""Short Pulse Mode test"""
|
||||
#print '1.Set puls length to 1ms (1ms diff)'
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF:STAT-SHORT-PULSE 1', shell=True) #Set short pulse mode.
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1 1', shell = True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-HVON 1000', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-HVON 2000', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PMF:STAT-DT-HVON 3000', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-SWON 4000', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-SWON 5000', shell=True) #Should be grater than 1ms.
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF:STAT-DT-SHOTLEN 1000', shell=True)
|
||||
print '1.Set puls length to 100us (100us diff)'
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF:STAT-SHORT-PULSE 1', shell=True) #Set short pulse mode.
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1 1', shell = True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-HVON 100', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-HVON 200', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PMF:STAT-DT-HVON 300', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-SWON 400', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-SWON 800', shell=True) #Should be grater than 1ms.
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF:STAT-DT-SHOTLEN 100', shell=True)
|
||||
print '1.Set puls length (100us diff)'
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-SHORT-PULSE 1', shell=True) #Set short pulse mode.
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-HVON 100', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-HVON 200', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PMF:STAT-DT-HVON 300', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-SWON 400', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-SWON 800', shell=True) #Should be grater than 1ms.
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-DT-SHOTLEN 500', shell=True)
|
||||
print '2.Write PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM 1', shell=True)
|
||||
time.sleep(1)
|
||||
print '3.Write HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 1', shell=True) #HVON signal from PLC
|
||||
time.sleep(1)
|
||||
print '4.Reset HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 0', shell=True)
|
||||
time.sleep(1)
|
||||
print '5.Reset PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM 0', shell=True)
|
||||
print '6.Reset short pulse mode'
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-SHORT-PULSE 0', shell=True) #Set short pulse mode.
|
||||
print "-----------------------------------------\n"
|
||||
|
||||
def test_async_longpulse():
|
||||
""""
|
||||
Simulate permit signal and ON signal from PLC.
|
||||
Confirm pulse generation with async mode. 10ms
|
||||
"""
|
||||
print '1.set beam-on schedule (10ms diff + 50ms pulse.)'
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-HVON 10000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-HVON 20000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PMF:STAT-DT-HVON 30000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-SWON 40000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-SWON 50000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-DT-SHOTLEN 3600000000', shell=True)
|
||||
# turn on permit
|
||||
print '2.. set PulseLengthLimitMode to 1 flag'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1.SVAL 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-MD1-LIM 180000000', shell = True)
|
||||
time.sleep(1)
|
||||
print '3. Write PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM 1', shell=True)
|
||||
time.sleep(1)
|
||||
# trun on HVON trigger
|
||||
print '4. Write HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 1', shell=True) #HVON signal from PLC
|
||||
time.sleep(185)
|
||||
print '5. Confirm generated pulse'
|
||||
print '6. Reset HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 0', shell=True)
|
||||
time.sleep(1)
|
||||
print '7. Reset PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM 0', shell=True)
|
||||
print "end of async, non-prepro mode test!"
|
||||
|
||||
def test_async_both():
|
||||
""""
|
||||
Simultanious operation test.
|
||||
"""
|
||||
print '1.set beam-on schedule (10ms diff + 500ms pulse.)'
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-HVON 10000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-HVON 20000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PMF:STAT-DT-HVON 30000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-SWON 40000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-SWON 50000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-DT-SHOTLEN 500000', shell=True)
|
||||
|
||||
res = subprocess.call('caput EC-GN-P01-PA2F:STAT-DT-HVON 10000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB2F:STAT-DT-HVON 20000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB2F:STAT-DT-SWON 40000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA2F:STAT-DT-SWON 50000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF:STAT-DT-SHOTLEN 500000', shell=True)
|
||||
# turn on permit
|
||||
print '2.. set PulseLengthLimitMode to 1 flag'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1.SVAL 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-MD1-LIM 1000000', shell = True)
|
||||
time.sleep(1)
|
||||
print '3. Write PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM 1', shell=True)
|
||||
time.sleep(1)
|
||||
# trun on HVON trigger
|
||||
print '4. Write HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 1', shell=True) #HVON signal from PLC
|
||||
time.sleep(1)
|
||||
print '5. Confirm generated pulse'
|
||||
print '6. Reset HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 0', shell=True)
|
||||
time.sleep(1)
|
||||
print '7. Reset PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM 0', shell=True)
|
||||
print "end of async, non-prepro mode test!"
|
||||
|
||||
def test_async_GYA():
|
||||
""""
|
||||
Test GYA operation with Async mode.
|
||||
"""
|
||||
#print '1.set beam-on schedule (1s diff + 1s pulse.)'
|
||||
#print '1.set beam-on schedule (100ms diff + 1s pulse.)'
|
||||
#res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-HVON 100000', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-HVON 200000', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PMF:STAT-DT-HVON 300000', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-SWON 400000', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-SWON 500000', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF:STAT-DT-SHOTLEN 1000000', shell=True)
|
||||
#print '1.set beam-on schedule (10ms diff + 100ms pulse.)'
|
||||
#res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-HVON 10000', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-HVON 20000', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PMF:STAT-DT-HVON 30000', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-SWON 40000', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-SWON 50000', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF:STAT-DT-SHOTLEN 100000', shell=True)
|
||||
#print '1.set beam-on schedule (1ms diff + 10ms pulse.)'
|
||||
#res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-HVON 1000', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-HVON 2000', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PMF:STAT-DT-HVON 3000', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-SWON 4000', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-SWON 5000', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF:STAT-DT-SHOTLEN 10000', shell=True)
|
||||
print '1.set beam-on schedule (1s diff + 20s pulse.)'
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-HVON 1000000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-HVON 2000000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PMF:STAT-DT-HVON 3000000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-SWON 4000000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-SWON 5000000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-DT-SHOTLEN 20000000', shell=True)
|
||||
# turn on permit
|
||||
print '2.. set PulseLengthLimitMode to 1 flag'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1.SVAL 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-MD1-LIM 1000000', shell = True)
|
||||
time.sleep(1)
|
||||
print '3. Write PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM 1', shell=True)
|
||||
time.sleep(1)
|
||||
# trun on HVON trigger
|
||||
print '4. Write HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 1', shell=True) #HVON signal from PLC
|
||||
time.sleep(30)
|
||||
print '5. Confirm generated pulse'
|
||||
print '6. Reset HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 0', shell=True)
|
||||
time.sleep(1)
|
||||
print '7. Reset PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM 0', shell=True)
|
||||
print "end of async, non-prepro mode test!"
|
||||
|
||||
def test_async_GYB():
|
||||
""""
|
||||
Test GYB operation with Async mode.
|
||||
"""
|
||||
print '1.set beam-on schedule (1s diff + 1s pulse.)'
|
||||
res = subprocess.call('caput EC-GN-P01-PA2F:STAT-DT-HVON 1000000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB2F:STAT-DT-HVON 2000000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PMF:STAT-DT-HVON 3000000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB2F:STAT-DT-SWON 4000000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA2F:STAT-DT-SWON 5000000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF:STAT-DT-SHOTLEN 20000000', shell=True)
|
||||
# turn on permit
|
||||
print '2.. set PulseLengthLimitMode to 1 flag'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1.SVAL 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-MD1-LIM 1000000', shell = True)
|
||||
time.sleep(1)
|
||||
print '3. Write PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM 1', shell=True)
|
||||
time.sleep(1)
|
||||
# trun on HVON trigger
|
||||
print '4. Write HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 1', shell=True) #HVON signal from PLC
|
||||
time.sleep(30)
|
||||
print '5. Confirm generated pulse'
|
||||
print '6. Reset HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 0', shell=True)
|
||||
time.sleep(1)
|
||||
print '7. Reset PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM 0', shell=True)
|
||||
print "end of async, non-prepro mode test!"
|
||||
def test_async_GYA_manual():
|
||||
""""
|
||||
Test GYA operation with Async mode.
|
||||
"""
|
||||
print '1.. Set delays and pulse length on HMI and set sleep time here:'
|
||||
inp_val = raw_input()
|
||||
try:
|
||||
sleep_time = float(inp_val)
|
||||
except:
|
||||
return
|
||||
# turn on permit
|
||||
print '2.. set PulseLengthLimitMode to 1 flag'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1.SVAL 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-MD1-LIM 1000000', shell = True)
|
||||
time.sleep(1)
|
||||
print '3. Write PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM 1', shell=True)
|
||||
time.sleep(1)
|
||||
# trun on HVON trigger
|
||||
print '4. Write HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 1', shell=True) #HVON signal from PLC
|
||||
time.sleep(sleep_time)
|
||||
print '5. Confirm generated pulse'
|
||||
print '6. Reset HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 0', shell=True)
|
||||
time.sleep(1)
|
||||
print '7. Reset PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM 0', shell=True)
|
||||
print "end of async, non-prepro mode test!"
|
||||
|
||||
def test_async_GYB_manual():
|
||||
""""
|
||||
Test GYA operation with Async mode.
|
||||
"""
|
||||
print '1.. Set delays and pulse length on HMI and set sleep time here:'
|
||||
inp_val = raw_input()
|
||||
try:
|
||||
sleep_time = float(inp_val)
|
||||
except:
|
||||
return
|
||||
# turn on permit
|
||||
print '2.. set PulseLengthLimitMode to 1 flag'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1.SVAL 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-MD1-LIM 1000000', shell = True)
|
||||
time.sleep(1)
|
||||
print '3. Write PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM 1', shell=True)
|
||||
time.sleep(1)
|
||||
# trun on HVON trigger
|
||||
print '4. Write HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 1', shell=True) #HVON signal from PLC
|
||||
time.sleep(sleep_time)
|
||||
print '5. Confirm generated pulse'
|
||||
print '6. Reset HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 0', shell=True)
|
||||
time.sleep(1)
|
||||
print '7. Reset PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM 0', shell=True)
|
||||
print "end of async, non-prepro mode test!"
|
||||
Binary file not shown.
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import time
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
def test_ready():
|
||||
"""In the WaitReady state, simulate READY signal from PLC."""
|
||||
print '---------- WatiReady test ----------'
|
||||
print '1. Simulate READY signal. State should go to WaitPermit state.'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST2R.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST2R 1', shell=True)
|
||||
print '2. Set CCPS trianguler waveform parameters(1V, 1Hz)'
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-CCPS:STAT-AMP 3', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-CCPS:STAT-FREQ 1', shell=True) #Hz
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-CCPS:STAT-AMP 4', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-CCPS:STAT-FREQ 1', shell=True) #Hz
|
||||
time.sleep(1)
|
||||
print '3. load csv file.'
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-CSV-NAME test.csv', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-CSV-LOAD 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF:STAT-CSV-NAME test2.csv', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF:STAT-CSV-LOAD 1', shell=True)
|
||||
time.sleep(1)
|
||||
print '4. Simulate CCPS_ON_REQUEST signal'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YON-CCPS1.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YON-CCPS1 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YON-CCPS2.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YON-CCPS2 1', shell=True)
|
||||
time.sleep(1)
|
||||
print '5. Confirm CCPS_ON flag and triangular waveform generation.'
|
||||
print '6. Simulate CCPS status PVs.'
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-CCPS:STAT-OP-V-DIFF.SCAN Passive', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-CCPS:PSU2320-TR 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-CCPS:STAT-OP-V-DIFF.SCAN Passive', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-CCPS:PSU2320-TR 1', shell=True)
|
||||
print '7. Confirm PCF state changes to WaitPermit state.'
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import time
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
def test_ready():
|
||||
"""In the WaitReady state, simulate READY signal from PLC."""
|
||||
print '---------- WatiReady test ----------'
|
||||
print '1. Simulate READY signal. State should go to WaitPermit state.'
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST2R.SVAL 1', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST2R 1', shell=True)
|
||||
print 'Enter to continue test'
|
||||
inpval = raw_input()
|
||||
print '2. Set CCPS trianguler waveform parameters(1V, 1Hz)'
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-CCPS:STAT-AMP 3', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-CCPS:STAT-FREQ 1', shell=True) #Hz
|
||||
#res = subprocess.call('caput EC-GN-P01-GBF-CCPS:STAT-AMP 4', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GBF-CCPS:STAT-FREQ 1', shell=True) #Hz
|
||||
print 'Enter to continue test'
|
||||
inpval = raw_input()
|
||||
time.sleep(1)
|
||||
print '3. load csv file.'
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-CSV-NAME test.csv', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-CSV-LOAD 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF:STAT-CSV-NAME test2.csv', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF:STAT-CSV-LOAD 1', shell=True)
|
||||
time.sleep(1)
|
||||
print '4. Simulate CCPS_ON_REQUEST signal'
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YON-CCPS1.SVAL 1', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YON-CCPS1 1', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YON-CCPS2.SVAL 1', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YON-CCPS2 1', shell=True)
|
||||
print 'Enter to continue test'
|
||||
inpval = raw_input()
|
||||
print '5. Confirm CCPS_ON flag and triangular waveform generation.'
|
||||
print '6. Simulate CCPS status PVs.'
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-CCPS:STAT-OP-V-DIFF.SCAN Passive', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-CCPS:PSU2320-TR 0', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GBF-CCPS:STAT-OP-V-DIFF.SCAN Passive', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GBF-CCPS:PSU2320-TR 0', shell=True)
|
||||
print '7. Confirm PCF state changes to WaitPermit state.'
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import time
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
import test_async
|
||||
import test_sync
|
||||
import test_ready_hw
|
||||
import test_setup_hw
|
||||
import test_standby_hw
|
||||
import test_ready
|
||||
import test_setup
|
||||
import test_standby
|
||||
import test_setup_rup_confirm
|
||||
|
||||
#
|
||||
# Some EPICS PVs need to be simulation mode when we test code without PXI board.
|
||||
# When user uses sim mode, new value must be written into PV.SVAL and PV itselfself.
|
||||
#
|
||||
print '### Start State Machine Sequence Test ###'
|
||||
|
||||
print '---------- Pre setup for the test ----------'
|
||||
test_setup_rup_confirm.test_setup()
|
||||
#test_setup.test_setup()
|
||||
#test_setup_hw.test_setup()
|
||||
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import time
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
#
|
||||
# Some EPICS PVs need to be simulation mode when we test code without PXI board.
|
||||
# When user uses sim mode, new value must be written into PV.SVAL and PV itselfself.
|
||||
#
|
||||
print '### Start State Machine Sequence Test ###'
|
||||
|
||||
def test_setup():
|
||||
"""
|
||||
Setup EPICS PVs for testing.
|
||||
Turn simulation mode ON for unavailable device
|
||||
"""
|
||||
print '---------- Start setup for the test ----------'
|
||||
|
||||
print '1. set PVs to simulation mode'
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF:STAT-AI-SIMM YES', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GBF:STAT-AI-SIMM YES', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-DI-SIMM YES', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF:STAT-DI-SIMM YES', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-MCPS:STAT-SIMM YES', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-MCPS:STAT-SIMM YES', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-GCPS:STAT-SIMM YES', shell=True) #turn off for GCPS test.
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-GCPS:STAT-SIMM YES', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-CCPS:STAT-SIMM YES', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-CCPS:STAT-SIMM YES', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-FHPS:STAT-SIMM YES', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-FHPS:STAT-SIMM YES', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:PSU3000-YFLT.SCAN Passive', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:PSU3000-YFLT.SIMM YES', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:PSU3000-YFLT.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:PSU3000-YFLT 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:PSU1000-YFLT.SCAN Passive', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:PSU1000-YFLT.SIMM YES', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:PSU1000-YFLT.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:PSU1000-YFLT 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA2F:PSU4000-YFLT.SCAN Passive', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA2F:PSU4000-YFLT.SIMM YES', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA2F:PSU4000-YFLT.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA2F:PSU4000-YFLT 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB2F:PSU2000-YFLT.SCAN Passive', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB2F:PSU2000-YFLT.SIMM YES', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB2F:PSU2000-YFLT.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB2F:PSU2000-YFLT 0', shell=True)
|
||||
time.sleep(1)
|
||||
print '2. Change SCAN mode from I/O Inter to Passive to write sumulated values.'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-OPGY1.SCAN Passive', shell=True)#SELECT
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-OPGY2.SCAN Passive', shell=True)#SELECT
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST1R.SCAN Passive', shell=True) #STANDBY
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST2R.SCAN Passive', shell=True) #READY
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SCAN Passive', shell=True) #ON
|
||||
res = subprocess.call('caput EC-GN-P01-PMF:PSU0000-TYSTA.SCAN Passive', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:PSU3000-YSTA.SCAN Passive', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:PSU1000-YSTA.SCAN Passive', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM.SCAN Passive', shell=True) #PERMIT
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM.SCAN Passive', shell=True) #PERMIT
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1.SCAN Passive', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD2.SCAN Passive', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD3.SCAN Passive', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD4.SCAN Passive', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YSTA-MPSS.SCAN Passive', shell = True) #SYNC/ASYNC
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YON-CCPS1.SCAN Passive', shell=True) #CCPS ON REQUEST
|
||||
time.sleep(1)
|
||||
print '3. Set pulse length limit mode value and state.'
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-MD1-LIM 10000', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-MD2-LIM 100000', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-MD3-LIM 1000000', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-MD4-LIM 10000000', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1.SVAL 0', shell = True) #Pulse lenght mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1 0', shell = True) #Pulse lenght mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD2.SVAL 0', shell = True) #Pulse lenght mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD2 0', shell = True) #Pulse lenght mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD3.SVAL 0', shell = True) #Pulse lenght mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD3 0', shell = True) #Pulse lenght mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD4.SVAL 0', shell = True) #Pulse lenght mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD4 0', shell = True) #Pulse lenght mode
|
||||
print '4. Set other operation modes'
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-PREP-MODE 0', shell = True) #Pre-pro mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YSTA-MPSS.SVAL 0', shell = True) #SYNC/ASYNC mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YSTA-MPSS 0', shell = True) #SYNC/ASYNC mode
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-SHORT-PULSE 0',shell = True) #Short pulse mode
|
||||
time.sleep(1)
|
||||
print '5. Set a beam-on schedule(10ms diff + 100ms pulse)'
|
||||
#res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-HVON 10000', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-HVON 20000', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PMF:STAT-DT-HVON 30000', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-SWON 40000', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-SWON 50000', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF:STAT-DT-SHOTLEN 100000', shell=True)
|
||||
time.sleep(1)
|
||||
print '6. Reset PLC INTERLOCK'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTRP.SIMM 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTRP.SCAN 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTRP.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTRP 0', shell=True) #CCPS_IS_OPERATION
|
||||
res = subprocess.call('caput EC-GN-P01-GAFP:FMC4310-YTRP.SIMM 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAFP:FMC4310-YTRP.SCAN 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAFP:FMC4310-YTRP.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAFP:FMC4310-YTRP 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBFP:FMC4310-YTRP.SIMM 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBFP:FMC4310-YTRP.SCAN 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBFP:FMC4310-YTRP.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBFP:FMC4310-YTRP 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-RST-FLT 1', shell=True)
|
||||
print '---------- END setup for the test ----------'
|
||||
Binary file not shown.
@@ -0,0 +1,93 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import time
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
#
|
||||
# Some EPICS PVs need to be simulation mode when we test code without PXI board.
|
||||
# When user uses sim mode, new value must be written into PV.SVAL and PV itselfself.
|
||||
#
|
||||
print '### Start State Machine Sequence Test ###'
|
||||
|
||||
def test_setup():
|
||||
"""
|
||||
Setup EPICS PVs for testing.
|
||||
Turn simulation mode ON for unavailable device
|
||||
"""
|
||||
print '---------- Start setup for the test ----------'
|
||||
|
||||
print '1. set PVs to simulation mode'
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF:STAT-AI-SIMM YES', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GBF:STAT-AI-SIMM YES', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF:STAT-DI-SIMM YES', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GBF:STAT-DI-SIMM YES', shell=True)
|
||||
#temporary commentout 2 lines
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-MCPS:STAT-SIMM YES', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GBF-MCPS:STAT-SIMM YES', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-GCPS:STAT-SIMM YES', shell=True)
|
||||
#temporary commentout following line
|
||||
#res = subprocess.call('caput EC-GN-P01-GBF-GCPS:STAT-SIMM YES', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-CCPS:STAT-SIMM YES', shell=True)
|
||||
#temporary commentout following line
|
||||
#res = subprocess.call('caput EC-GN-P01-GBF-CCPS:STAT-SIMM YES', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-FHPS:STAT-SIMM YES', shell=True)
|
||||
#temporary commentout following line
|
||||
#res = subprocess.call('caput EC-GN-P01-GBF-FHPS:STAT-SIMM YES', shell=True)
|
||||
time.sleep(1)
|
||||
print '2. Change SCAN mode from I/O Inter to Passive to write sumulated values.'
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-OPGY1.SCAN Passive', shell=True)#SELECT
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-OPGY2.SCAN Passive', shell=True)#SELECT
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST1R.SCAN Passive', shell=True) #STANDBY
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST2R.SCAN Passive', shell=True) #READY
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SCAN Passive', shell=True) #ON
|
||||
#res = subprocess.call('caput EC-GN-P01-PMF:PSU0000-TYSTA.SCAN Passive', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PA1F:PSU3000-YSTA.SCAN Passive', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-PB1F:PSU1000-YSTA.SCAN Passive', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM.SCAN Passive', shell=True) #PERMIT
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM.SCAN Passive', shell=True) #PERMIT
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1.SCAN Passive', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD2.SCAN Passive', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD3.SCAN Passive', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD4.SCAN Passive', shell = True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YSTA-MPSS.SCAN Passive', shell = True) #SYNC/ASYNC
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YON-CCPS1.SCAN Passive', shell=True) #CCPS ON REQUEST
|
||||
time.sleep(1)
|
||||
print '3. Set pulse length limit mode value and state.'
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-MD1-LIM 10000', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-MD2-LIM 100000', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-MD3-LIM 1000000', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-MD4-LIM 10000000', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1.SVAL 0', shell = True) #Pulse lenght mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1 0', shell = True) #Pulse lenght mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD2.SVAL 0', shell = True) #Pulse lenght mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD2 0', shell = True) #Pulse lenght mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD3.SVAL 0', shell = True) #Pulse lenght mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD3 0', shell = True) #Pulse lenght mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD4.SVAL 0', shell = True) #Pulse lenght mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD4 0', shell = True) #Pulse lenght mode
|
||||
print '4. Set other operation modes'
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-PREP-MODE 0', shell = True) #Pre-pro mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YSTA-MPSS.SVAL 0', shell = True) #SYNC/ASYNC mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YSTA-MPSS 0', shell = True) #SYNC/ASYNC mode
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-SHORT-PULSE 0',shell = True) #Short pulse mode
|
||||
time.sleep(1)
|
||||
print '5. Set a beam-on schedule(10ms diff + 100ms pulse)'
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-HVON 10000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-HVON 20000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PMF:STAT-DT-HVON 30000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-SWON 40000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-SWON 50000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-DT-SHOTLEN 100000', shell=True)
|
||||
time.sleep(1)
|
||||
print '6. Reset PLC INTERLOCK'
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTRP.SIMM 1', shell=True) #PLC Interlock
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTRP.SCAN 0', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTRP.SVAL 0', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTRP 0', shell=True) #CCPS_IS_OPERATION
|
||||
#res = subprocess.call('caput EC-GN-P01-GAFP:FMC4310-YTRP.SIMM 1', shell=True) #cRIO Interlock
|
||||
#res = subprocess.call('caput EC-GN-P01-GAFP:FMC4310-YTRP.SCAN 0', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAFP:FMC4310-YTRP.SVAL 0', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAFP:FMC4310-YTRP 0', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GPF:STAT-RST-FLT 1', shell=True)
|
||||
print '---------- END setup for the test ----------'
|
||||
Binary file not shown.
@@ -0,0 +1,106 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import time
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
#
|
||||
# Some EPICS PVs need to be simulation mode when we test code without PXI board.
|
||||
# When user uses sim mode, new value must be written into PV.SVAL and PV itselfself.
|
||||
#
|
||||
print '### Start State Machine Sequence Test ###'
|
||||
|
||||
def test_setup():
|
||||
"""
|
||||
Setup EPICS PVs for testing.
|
||||
Turn simulation mode ON for unavailable device
|
||||
"""
|
||||
print '---------- Start setup for the test ----------'
|
||||
|
||||
print '1. set PVs to simulation mode'
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF:STAT-AI-SIMM YES', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GBF:STAT-AI-SIMM YES', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-DI-SIMM YES', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF:STAT-DI-SIMM YES', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-MCPS:STAT-SIMM YES', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GBF-MCPS:STAT-SIMM YES', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-GCPS:STAT-SIMM YES', shell=True) #turn off for GCPS test.
|
||||
#res = subprocess.call('caput EC-GN-P01-GBF-GCPS:STAT-SIMM YES', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-CCPS:STAT-SIMM YES', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GBF-CCPS:STAT-SIMM YES', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-FHPS:STAT-SIMM YES', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GBF-FHPS:STAT-SIMM YES', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:PSU3000-YFLT.SCAN Passive', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:PSU3000-YFLT.SIMM YES', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:PSU3000-YFLT.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:PSU3000-YFLT 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:PSU1000-YFLT.SCAN Passive', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:PSU1000-YFLT.SIMM YES', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:PSU1000-YFLT.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:PSU1000-YFLT 0', shell=True)
|
||||
time.sleep(1)
|
||||
print '2. Change SCAN mode from I/O Inter to Passive to write sumulated values.'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-OPGY1.SCAN Passive', shell=True)#SELECT
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-OPGY2.SCAN Passive', shell=True)#SELECT
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST1R.SCAN Passive', shell=True) #STANDBY
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST2R.SCAN Passive', shell=True) #READY
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SCAN Passive', shell=True) #ON
|
||||
res = subprocess.call('caput EC-GN-P01-PMF:PSU0000-TYSTA.SCAN Passive', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:PSU3000-YSTA.SCAN Passive', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:PSU1000-YSTA.SCAN Passive', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM.SCAN Passive', shell=True) #PERMIT
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM.SCAN Passive', shell=True) #PERMIT
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1.SCAN Passive', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD2.SCAN Passive', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD3.SCAN Passive', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD4.SCAN Passive', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YSTA-MPSS.SCAN Passive', shell = True) #SYNC/ASYNC
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YON-CCPS1.SCAN Passive', shell=True) #CCPS ON REQUEST
|
||||
time.sleep(1)
|
||||
print '3. Set pulse length limit mode value and state.'
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-MD1-LIM 10000', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-MD2-LIM 100000', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-MD3-LIM 1000000', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-MD4-LIM 10000000', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1.SVAL 0', shell = True) #Pulse lenght mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1 0', shell = True) #Pulse lenght mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD2.SVAL 0', shell = True) #Pulse lenght mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD2 0', shell = True) #Pulse lenght mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD3.SVAL 0', shell = True) #Pulse lenght mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD3 0', shell = True) #Pulse lenght mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD4.SVAL 0', shell = True) #Pulse lenght mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD4 0', shell = True) #Pulse lenght mode
|
||||
print '4. Set other operation modes'
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-PREP-MODE 0', shell = True) #Pre-pro mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YSTA-MPSS.SVAL 0', shell = True) #SYNC/ASYNC mode
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YSTA-MPSS 0', shell = True) #SYNC/ASYNC mode
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-SHORT-PULSE 0',shell = True) #Short pulse mode
|
||||
time.sleep(1)
|
||||
print '5. Set a beam-on schedule(10ms diff + 100ms pulse)'
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-HVON 10000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-HVON 20000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PMF:STAT-DT-HVON 30000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-SWON 40000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-SWON 50000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-DT-SHOTLEN 100000', shell=True)
|
||||
time.sleep(1)
|
||||
print '6. Reset PLC INTERLOCK'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTRP.SIMM 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTRP.SCAN 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTRP.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTRP 0', shell=True) #CCPS_IS_OPERATION
|
||||
res = subprocess.call('caput EC-GN-P01-GAFP:FMC4310-YTRP.SIMM 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAFP:FMC4310-YTRP.SCAN 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAFP:FMC4310-YTRP.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAFP:FMC4310-YTRP 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-RST-FLT 1', shell=True)
|
||||
print '7. Simulate SELECT signal. State should go to WatiStandby from Disabled.'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-OPGY1.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-OPGY1 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-OPGY2.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-OPGY2 1', shell=True)
|
||||
time.sleep(1)
|
||||
print '8. Simulate STANDBY signal. MCPS, GCPS, FHPS rampup must be started.'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST1R.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST1R 1', shell=True)
|
||||
print '---------- END setup for the test ----------'
|
||||
Binary file not shown.
@@ -0,0 +1,73 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import time
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
|
||||
def test_standby():
|
||||
"""
|
||||
In the WaitStandby State, simulate PLC STANDBY signal.
|
||||
Turn on FHPS by push auto-on button.
|
||||
Turn on SCM PSs automatically.
|
||||
State transition condition is checked at last.
|
||||
"""
|
||||
print '---------- Start WatiStandby test ----------'
|
||||
print '1. Simulate SELECT signal. State should go to WatiStandby from Disabled.'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-OPGY1.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-OPGY1 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-OPGY2.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-OPGY2 1', shell=True)
|
||||
time.sleep(1)
|
||||
print '2. Set MCPS rampup parameter(target current, sweep rate.)'
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-MCPS:PSU2120-TRG-CURR-SET-MI 4', shell=True) #For A
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-MCPS:PSU2120-TRG-SWPR-SET 1.5', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-GCPS:PSU2130-TRG-CURR-SET-MI 4', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-GCPS:PSU2130-TRG-SWPR-SET 1.5', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-MCPS:PSU2120-TRG-CURR-SET-MI 4', shell=True) #For B
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-MCPS:PSU2120-TRG-SWPR-SET 1.5', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-GCPS:PSU2130-TRG-CURR-SET-MI 4', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-GCPS:PSU2130-TRG-SWPR-SET 1.5', shell=True)
|
||||
time.sleep(1)
|
||||
print '3. Simulate STANDBY signal. MCPS, GCPS, FHPS rampup must be started.'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST1R.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST1R 1', shell=True)
|
||||
time.sleep(1)
|
||||
print '4. Set FHPS rampup parameter and start it.'
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-FHPS:PSU2610-AUTO-TAGV 6', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-FHPS:PSU2610-AUTO-RU-TIME 10', shell=True) #in second.
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-FHPS:PSU2610-AUTO-START 1', shell=True) #in second.
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-FHPS:PSU2610-AUTO-TAGV 6', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-FHPS:PSU2610-AUTO-RU-TIME 10', shell=True) #in second.
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-FHPS:PSU2610-AUTO-START 1', shell=True) #in second.
|
||||
time.sleep(10)
|
||||
print '5. Simulate FHPS, MCPS and GCPS state.'
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-MCPS:PSU2120-ACT-RB.SVAL 3', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-MCPS:PSU2120-ACT-RB 3', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-MCPS:PSU2120-CURR-MON.SVAL 4', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-MCPS:PSU2120-CURR-MON 4', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-GCPS:PSU2130-ACT-RB.SVAL 3', shell=True) #turn off for GCPS test
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-GCPS:PSU2130-ACT-RB 3', shell=True) #turn off for GCPS test
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-GCPS:PSU2130-CURR-MON.SVAL 4', shell=True)#turn off for GCPS test
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-GCPS:PSU2130-CURR-MON 4', shell=True) #turn off for GCPS test
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-FHPS:PSU2610-OUTON-RB.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-FHPS:PSU2610-OUTON-RB 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-FHPS:PSU2610-MEAS-ACV.SVAL 6', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-FHPS:PSU2610-MEAS-ACV 6', shell=True)
|
||||
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-MCPS:PSU2120-ACT-RB.SVAL 3', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-MCPS:PSU2120-ACT-RB 3', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-MCPS:PSU2120-CURR-MON.SVAL 4', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-MCPS:PSU2120-CURR-MON 4', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-GCPS:PSU2130-ACT-RB.SVAL 3', shell=True) #turn off for GCPS test
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-GCPS:PSU2130-ACT-RB 3', shell=True) #turn off for GCPS test
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-GCPS:PSU2130-CURR-MON.SVAL 4', shell=True)#turn off for GCPS test
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-GCPS:PSU2130-CURR-MON 4', shell=True) #turn off for GCPS test
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-FHPS:PSU2610-OUTON-RB.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-FHPS:PSU2610-OUTON-RB 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-FHPS:PSU2610-MEAS-ACV.SVAL 6', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-FHPS:PSU2610-MEAS-ACV 6', shell=True)
|
||||
time.sleep(1)
|
||||
print '6. Confirm FHPS and SCM ramp-up complete. The state goes to WaitREADY from WaitStandby.'
|
||||
print '---------- END WaitStandby test ----------'
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,76 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import time
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
|
||||
def test_standby():
|
||||
"""
|
||||
In the WaitStandby State, simulate PLC STANDBY signal.
|
||||
Turn on FHPS by push auto-on button.
|
||||
Turn on SCM PSs automatically.
|
||||
State transition condition is checked at last.
|
||||
"""
|
||||
print '---------- Start WatiStandby test ----------'
|
||||
print '1. Simulate SELECT signal. State should go to WatiStandby from Disabled.'
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-OPGY1.SVAL 1', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-OPGY1 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-OPGY2.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-OPGY2 1', shell=True)
|
||||
print 'Enter to continue test'
|
||||
inpval = raw_input()
|
||||
print '2. Set MCPS rampup parameter(target current, sweep rate.)'
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-MCPS:PSU2120-TRG-CURR-SET-MI 4', shell=True) #For A
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-MCPS:PSU2120-TRG-SWPR-SET 1.69', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-GCPS:PSU2130-TRG-CURR-SET-MI 4', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-GCPS:PSU2130-TRG-SWPR-SET 1.0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-MCPS:PSU2120-TRG-CURR-SET-MI 4', shell=True) #For B
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-MCPS:PSU2120-TRG-SWPR-SET 1.69', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-GCPS:PSU2130-TRG-CURR-SET-MI 4', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-GCPS:PSU2130-TRG-SWPR-SET 1.0', shell=True)
|
||||
time.sleep(1)
|
||||
print '3. Simulate STANDBY signal. MCPS, GCPS, FHPS rampup must be started.'
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST1R.SVAL 1', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST1R 1', shell=True)
|
||||
print 'Enter to continue test'
|
||||
inpval = raw_input()
|
||||
print '4. Set FHPS rampup parameter and start it.'
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-FHPS:PSU2610-AUTO-TAGV 6', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-FHPS:PSU2610-AUTO-RU-TIME 60', shell=True) #in second.
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-FHPS:PSU2610-AUTO-START 1', shell=True) #in second.
|
||||
#res = subprocess.call('caput EC-GN-P01-GBF-FHPS:PSU2610-AUTO-TAGV 6', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GBF-FHPS:PSU2610-AUTO-RU-TIME 60', shell=True) #in second.
|
||||
#res = subprocess.call('caput EC-GN-P01-GBF-FHPS:PSU2610-AUTO-START 1', shell=True) #in second.
|
||||
print 'Enter to continue test'
|
||||
inpval = raw_input()
|
||||
print '5. Simulate FHPS, MCPS and GCPS state.'
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-MCPS:PSU2120-ACT-RB.SVAL 3', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-MCPS:PSU2120-ACT-RB 3', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-MCPS:PSU2120-CURR-MON.SVAL 4', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-MCPS:PSU2120-CURR-MON 4', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-GCPS:PSU2130-ACT-RB.SVAL 3', shell=True) #turn off for GCPS test
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-GCPS:PSU2130-ACT-RB 3', shell=True) #turn off for GCPS test
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-GCPS:PSU2130-CURR-MON.SVAL 4', shell=True)#turn off for GCPS test
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-GCPS:PSU2130-CURR-MON 4', shell=True) #turn off for GCPS test
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-FHPS:PSU2610-OUTON-RB.SVAL 1', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-FHPS:PSU2610-OUTON-RB 1', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-FHPS:PSU2610-MEAS-ACV.SVAL 6', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-FHPS:PSU2610-MEAS-ACV 6', shell=True)
|
||||
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-MCPS:PSU2120-ACT-RB.SVAL 3', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-MCPS:PSU2120-ACT-RB 3', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-MCPS:PSU2120-CURR-MON.SVAL 4', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-MCPS:PSU2120-CURR-MON 4', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-GCPS:PSU2130-ACT-RB.SVAL 3', shell=True) #turn off for GCPS test
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-GCPS:PSU2130-ACT-RB 3', shell=True) #turn off for GCPS test
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-GCPS:PSU2130-CURR-MON.SVAL 4', shell=True)#turn off for GCPS test
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-GCPS:PSU2130-CURR-MON 4', shell=True) #turn off for GCPS test
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-FHPS:PSU2610-OUTON-RB.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-FHPS:PSU2610-OUTON-RB 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-FHPS:PSU2610-MEAS-ACV.SVAL 6', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-FHPS:PSU2610-MEAS-ACV 6', shell=True)
|
||||
time.sleep(1)
|
||||
print '6. Confirm FHPS and SCM ramp-up complete. The state goes to WaitREADY from WaitStandby.'
|
||||
print '---------- END WaitStandby test ----------'
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,97 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import time
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
def test_sync():
|
||||
"""Test Sync Mode"""
|
||||
print '1. Set beam-on schedule'
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-HVON 100000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-HVON 200000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PMF:STAT-DT-HVON 300000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-SWON 400000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-SWON 500000', shell=True)
|
||||
|
||||
res = subprocess.call('caput EC-GN-P01-PA2F:STAT-DT-HVON 100000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB2F:STAT-DT-HVON 200000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB2F:STAT-DT-SWON 400000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA2F:STAT-DT-SWON 500000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-DT-SHOTLEN 300000000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF:STAT-DT-SHOTLEN 300000000', shell=True)
|
||||
print '2. Set SYNC flag'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YSTA-MPSS.SVAL 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YSTA-MPSS 1', shell = True)
|
||||
print '3. Set Mode 1 flag'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1.SVAL 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-MD1-LIM 600000000', shell = True)
|
||||
print '4. Write PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM 1', shell=True)
|
||||
time.sleep(1)
|
||||
print '5. Write HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 1', shell=True)
|
||||
print '6. Wait SDN commands.'
|
||||
print 'Enter to stop operation(Trun off PLC_HVON)'
|
||||
inpval = raw_input()
|
||||
print '7. Write 0 to HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 0', shell=True)
|
||||
time.sleep(2)
|
||||
print '8. Reset PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY2PRM 0', shell=True)
|
||||
print '9. Reset Mode 1 flag'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1.SVAL 0', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1 0', shell = True)
|
||||
print 'end of sequence.'
|
||||
|
||||
def test_sync_prepro():
|
||||
"""Test Sync PrePro Mode"""
|
||||
print '1. Set beam-on schedule'
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-HVON 100000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-HVON 200000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PMF:STAT-DT-HVON 300000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PB1F:STAT-DT-SWON 400000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-PA1F:STAT-DT-SWON 500000', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-DT-SHOTLEN 300000000', shell=True)
|
||||
print '2. Set SYNC flag'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YSTA-MPSS.SVAL 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YSTA-MPSS 1', shell = True)
|
||||
print '3. Set Mode 1 flag'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1.SVAL 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1 1', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPF:STAT-MD1-LIM 600000000', shell = True)
|
||||
print '4.Set Pre-Pro flag'
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-PREP-MODE 1', shell = True)
|
||||
time.sleep(1)
|
||||
print '5. Write PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM 1', shell=True)
|
||||
time.sleep(1)
|
||||
print '6. Write HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 1', shell=True)
|
||||
print '7. Wait SDN commands.'
|
||||
print 'Enter to stop operation(Trun off PLC_HVON)'
|
||||
inpval = raw_input()
|
||||
print '8. Write 0 to HVON'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST3R 0', shell=True)
|
||||
time.sleep(2)
|
||||
print '9. Reset PERMIT'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM.SVAL 0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-GY1PRM 0', shell=True)
|
||||
print '10.Reset Pre-Pro flag'
|
||||
res = subprocess.call('caput EC-GN-P01-GAF:STAT-PREP-MODE 0', shell = True)
|
||||
time.sleep(1)
|
||||
print '11. Reset Mode 1 flag'
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1.SVAL 0', shell = True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-MD1 0', shell = True)
|
||||
print 'end of sequence.'
|
||||
Binary file not shown.
Reference in New Issue
Block a user