Generation working and Compilation of MARTe components
This commit is contained in:
1 parent
3a5e378d99
commit
4faee3802a
1571 files changed
+611466
No files matched your search
@@ -0,0 +1 @@
|
||||
<mxfile modified="2019-01-30T06:37:41.537Z" host="www.draw.io" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/9.3.1 Chrome/66.0.3359.181 Electron/3.0.6 Safari/537.36" etag="0oGlI-OD7UdUI-OyySUI" version="10.1.6" type="device"><diagram name="Page-1" id="c7558073-3199-34d8-9f00-42111426c3f3">7V1Zd+K4Ev41Oefeh/TxvjwSlpDbYRkgSfe8cBww4G5jM8ZkmV9/Je+WBMjGNg50P6RtYWup+lRVqirJN3xz/XHvaJtVz57r5g3HzD9u+NYNx0kcC/7Cgk+/QJAkv2DpGHO/iI0Lxsa/elDIBKU7Y65vUw+6tm26xiZdOLMtS5+5qTLNcez39GML20y3utGWOlYwnmkmXvpizN2VX6pwUlze1Y3lKmyZlVT/l1dt9nvp2DsraO+G4xfeP//ntRbWFQx0u9Lm9nuiiG/f8E3Htl3/av3R1E1I2pBs/nudPb9G/XZ0y6V5YbP6+/bVXm9s9y9xvdD+ni6Vx1tV9qt508xdQJAXzXDHrmbNXz+DjrufIbG84eqwQuaGv3tfGa4+3mgz+Os7QAcoW7lrE9yx4BLvYNDnN91x9Y9EUdDhe91e664DmmWCXzmV918JwRXQ8j3mFBvSd5XgUvicFoBjGdUcEwhcBDTKQi8Fo4k+B3gKbm3HXdlL29LMdlx6l6ZagkL6h+H+gMXfxODuZ+KX1kfwhnfzGdz80l33M5hG2s61QVHc6qNtb45Rf2vvnJlOgQlXc5a6S/EgpMBBbjq6qbnGW3rGFc4blgnxFYN5sFiYhqXXDsiccm4kswyHUatlbLVXE5Dl7ORiakctgSgoh7qzNtzz0wuTk+cnmIgRbOgAVQoEgbWsHcFE7vwEk4gIG+navH6KWDq7JmYZFaMXrputeQPaiOBuZmrbrTFDFLAFuuJrYFkM73+Gahf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fNZh14alF1oF/+c3nGnVjyHSEtfIq6CTDsUa+dFDQJcQxaCoQSbM9d+Y/AAxijyrMqklQSQS6cOwvbQoA+6vg4n9nrta9pxq2+Z2bNfnsD8jru6DMdGDHz7LQncTfsRmnsJTaQmb/o1KFoo1E1ho4hJjrS+Irm5WG+7RN5Gdn20P9fuzl5SOmIcqd/4qDlLKxcLFJkaKbp7k/5FKu3/imxDFyzZezsJtnXkjCddPpflymVjbVNhK/haAIu+4xPGB3edCHy/pycpld2TyFX/UFHTIvZkJ2FGBSGAUMDWZJgaaFas4OyNmwQlsD7jnfR6aQVN3Q6H+tCxol8JVBLHcpe+OokOL88s9RGaXqH3cX0b2DUD5CTJjYMBFBjobBAxBaAEi6K+JYY300A+fjWLbcvQGsDwb0wPdfjypjPAf5LiEnsO9044d2TSAdYsEoRge623mkI/7x2P5vfe389q4v2y2vvNtsHLwMKnxiPoHKtfoWQKhZjyhspwEOdZXlKiSDIFpeqEASHt9bXBAUssy8dI7vTXBUqwgExgZbAdkDicXBrO+7KXtqWZrbjUkRInumQyF+6636OjX9hN7UdUNRAoEe9fbQ92R/n3iC4OYrCQ8nGx2M8PlpxcFKjjla+H+om+ctDRe0QwTQggaRZdohw4VEQVeQzEcmGfxTsys51OpGlqLine truncated
|
||||
@@ -0,0 +1,463 @@
|
||||
**********
|
||||
* EXAMLE *
|
||||
**********
|
||||
|
||||
State1 // RT application state name
|
||||
==========
|
||||
1. // Numbered GAMs in order of execution
|
||||
if (signal_A == 1) // Execution function of the GAM
|
||||
{
|
||||
set signal_B = 3
|
||||
change state to State2
|
||||
}
|
||||
----------
|
||||
|
||||
|
||||
|
||||
*****************
|
||||
* RT APP STATES *
|
||||
*****************
|
||||
|
||||
WaitStandby
|
||||
==========
|
||||
1. // DONE
|
||||
if (EC-GN-P01-GAF:PLC4110-CON-OPGY1 == 0) //If a Gyrotron is not selected by PLC.
|
||||
{
|
||||
change state to Disabled
|
||||
}
|
||||
----------
|
||||
2. // DONE
|
||||
if (EC-GN-P01-GPF:PLC4110-YTS-ST1R == 1) //If STANDBY signal come from PLC, start Coil&Fil PSs.
|
||||
{
|
||||
// TODO should these signals be set only once every time this state is entered?
|
||||
set signal EC-GN-P01-GAF-MCPS:PSU2120-ACT-SP = 1
|
||||
set signal EC-GN-P01-GAF-GCPS:PSU2130-ACT-SP = 1
|
||||
set signal EC-GN-P01-GAF-FHPS:PSU2610-AUTO-START = 1
|
||||
}
|
||||
----------
|
||||
3. // DONE
|
||||
if (EC-GN-P01-GAF-MCPS:PSU2120-ACT-RB == 1
|
||||
AND
|
||||
EC-GN-P01-GAF-MCPS:PSU2120-CURR-MON > 0
|
||||
AND
|
||||
EC-GN-P01-GAF-FHPS:PSU2610-OUTON-RB == 1
|
||||
AND
|
||||
EC-GN-P01-GAF-FHPS:PSU2610-CURR-RB > 0)
|
||||
{
|
||||
change state to Offline
|
||||
}
|
||||
----------
|
||||
|
||||
|
||||
|
||||
Disabled
|
||||
==========
|
||||
1. // DONE
|
||||
if (EC-GN-P01-GAF:PLC4110-CON-OPGY1 == 1)
|
||||
{
|
||||
change state to WaitStandby
|
||||
}
|
||||
----------
|
||||
|
||||
|
||||
|
||||
Offline
|
||||
==========
|
||||
1. // DONE
|
||||
if (EC-GN-P01-GAF:PLC4110-CON-OPGY1 == 0) //If Gyrotron selection is turned off.
|
||||
{
|
||||
change state to Disabled
|
||||
}
|
||||
----------
|
||||
2. // DONE
|
||||
// If READY signal come from PLC is equal 1, app starts CCPS.
|
||||
if (EC-GN-P01-GPF:PLC4110-YTS-ST2R == 1
|
||||
AND
|
||||
EC-GN-P01-GAF-CCPS:PLC4110-YON-CCPS1 == 1)
|
||||
{
|
||||
// TODO should this signal be set only once every time this state is entered?
|
||||
set signal EC-GN-P01-GAF-CCPS:PSU2320-OUTON-SP = 1
|
||||
}
|
||||
----------
|
||||
3. // DONE (with a temporary signal that needs to be changed when the record is added)
|
||||
// TODO: Do we also have to check, that GAM 2. executed? So do we also have to check that EC-GN-P01-GPF:PLC4110-YTS-ST2R == 1?
|
||||
if (EC-GN-P01-GAF-CCPS:PSU2320-STAT == 1) // TODO: there is no signal named EC-GN-P01-GAF-CCPS:PSU2320-STAT
|
||||
// MEMO: I need add this record to check whether CCPS in running or stop.
|
||||
{
|
||||
change state to WaitPermit
|
||||
}
|
||||
----------
|
||||
4. // DONE
|
||||
// Wait CSV-LOAD trigger. When the app detect it, save data into the app.
|
||||
if (EC-GN-P01-GAF:STAT-CSV-LOAD == 1)
|
||||
{
|
||||
open csv file (file name: EC-GN-P01-GAF:STAT-CSV-NAME)
|
||||
load time series data into memory
|
||||
write data into EPICS waveform PSs.(EC-GN-P01-???:STAT-PREP-WF) // TODO do we realy write first data here or do we wait for PreHeating?
|
||||
set signal EC-GN-P01-GAF:STAT-CSV-LOADED = 1 // TODO do we write 1 here?
|
||||
If there is error, write EC-GN-P01-GAF:STAT-CSV-ERROR. // TODO there is no signal named EC-GN-P01-GAF:STAT-CSV-ERROR
|
||||
}
|
||||
|
||||
|
||||
WaitPermit
|
||||
==========
|
||||
1. // DONE
|
||||
if (EC-GN-P01-GAF:PLC4110-CON-OPGY1 == 0) //If Gyrotron is un-selected.
|
||||
{
|
||||
change state to Disabled
|
||||
}
|
||||
----------
|
||||
2. // DONE
|
||||
if (EC-GN-P01-GAF:STAT-PREP-MODE == 1
|
||||
AND
|
||||
EC-GN-P01-GAF:PLC4110-CON-GY1PRM == 1)
|
||||
{
|
||||
change state to PreHeating
|
||||
}
|
||||
----------
|
||||
3. // DONE
|
||||
if (EC-GN-P01-GAF:STAT-PREP-MODE == 0
|
||||
AND
|
||||
EC-GN-P01-GAF:PLC4110-CON-GY1PRM == 1)
|
||||
{
|
||||
change state to WaitReady
|
||||
}
|
||||
----------
|
||||
4. // DONE
|
||||
if (EC-GN-P01-GAF:STAT-CSV-LOAD == 1)
|
||||
{
|
||||
open csv file (file name: EC-GN-P01-GAF:STAT-CSV-NAME)
|
||||
load time series data into memory
|
||||
write data into EPICS waveform PSs.(EC-GN-P01-???:STAT-PREP-WF)
|
||||
set signal EC-GN-P01-GAF:STAT-CSV-LOADED = 1
|
||||
If there is error, write EC-GN-P01-GAF:STAT-CSV-ERROR.
|
||||
}
|
||||
|
||||
PreHeating
|
||||
==========
|
||||
1. // DONE
|
||||
every 10 ms do
|
||||
{
|
||||
else
|
||||
{
|
||||
// TODO do we use float32 for the type of waveform signals?
|
||||
// TODO is this the right order of columns? Time point is in column 1.
|
||||
// TODO on what signal do we write time?
|
||||
set signal EC-GN-P01-PB1F:PSU1000-EREF = setpoint column 2
|
||||
set signal EC-GN-P01-PA1F:PSU3000-EREF = setpoint column 3 // TODO there are two EC-GN-P01-PA1F:PSU3000-EREF signals. One ending with -P and one with -N.
|
||||
set signal EC-GN-P01-GAF-MCPS:PSU2120-TRG-CURR-SET = setpoint column 4
|
||||
set signal EC-GN-P01-GAF-GCPS:PSU2130-TRG-CURR-SET = setpoint column 5
|
||||
set signal EC-GN-P01-GAF-FHPS:PSU2320-EREF = setpoint column 6
|
||||
}
|
||||
}
|
||||
----------
|
||||
2. // DONE
|
||||
if (time == 0)
|
||||
{
|
||||
change state to WaitReady
|
||||
}
|
||||
----------
|
||||
|
||||
|
||||
WaitReady
|
||||
==========
|
||||
1. // DONE
|
||||
if (EC-GN-P01-PB1F:PSU1000-YSTA == 1
|
||||
AND
|
||||
EC-GN-P01-PA1F:PSU3000-YSTA == 1)
|
||||
{
|
||||
change state to WaitHVON
|
||||
}
|
||||
----------
|
||||
|
||||
|
||||
WaitHVON
|
||||
==========
|
||||
1. // DONE
|
||||
if (EC-GN-P01-GPF:PLC4110-YTS-ST3R == 1)// Check ON signal from PLC. This signal come when PLC check the operation operation possible conditions.
|
||||
{
|
||||
change state to HVArming
|
||||
}
|
||||
----------
|
||||
2. // DONE
|
||||
if (EC-GN-P01-GPF:PLC4110-YTS-ST3R == 1)
|
||||
{
|
||||
start HVON timer
|
||||
}
|
||||
----------
|
||||
|
||||
|
||||
|
||||
HVArming //HVArming is a state to startup HV generation in APS and BPS.
|
||||
==========
|
||||
1.
|
||||
at specified time // TODO: Where do I get this specified time? And is it a countdown time or what?
|
||||
// MEMO: Time is specified by PVs (EC-GN-P01-PB1F:STAT-DT-HVON). When app detect HVON from PLC, it is t=0.
|
||||
{
|
||||
set signal EC-GN-P01-PB1F:PSU1000-CON-HV = 1
|
||||
}
|
||||
----------
|
||||
2.
|
||||
at specified time // TODO: Where do I get this specified time? And is it a countdown time or what?
|
||||
// MEMO: Time is specified by PVs (EC-GN-P01-PA1F:STAT-DT-HVON)
|
||||
{
|
||||
set signal EC-GN-P01-PA1F:PSU3000-CON-HV = 1
|
||||
}
|
||||
----------
|
||||
3.
|
||||
if (EC-GN-P01-PB1F:PSU1000-CON-HV == 1
|
||||
AND
|
||||
EC-GN-P01-PA1F:PSU3000-CON-HV == 1
|
||||
AND
|
||||
EC-GN-P01-GPF::PLC4110-YSTA-MPSS == 0) // MEMO: Both HV PVs are 1. i.e.Both PSs are charged HV. and is in async mode.
|
||||
{
|
||||
change state to HVArmed
|
||||
}
|
||||
----------
|
||||
4.
|
||||
if (EC-GN-P01-PB1F:PSU1000-CON-HV == 1
|
||||
AND
|
||||
EC-GN-P01-PA1F:PSU3000-CON-HV == 1
|
||||
AND
|
||||
EC-GN-P01-GPF::PLC4110-YSTA-MPSS == 1) // MEMO: HVPS HVs are ON and is in SYNC mode.
|
||||
{
|
||||
Change state to HVArmedESDN
|
||||
}
|
||||
----------
|
||||
5.
|
||||
count up elapsed time (time from HVON detection)
|
||||
Write time to EC-GN-P01-GAF:STAT-ELAPSED
|
||||
|
||||
|
||||
HVArmed
|
||||
==========
|
||||
1.
|
||||
if (EC-GN-P01-GPF:PLC4110-YTS-ST3R == 0) // TODO: when do we go from HVArmed to Offline?
|
||||
// MEMO: move to Offline when ON signal from PLC is turned off.
|
||||
{
|
||||
change state to Offline
|
||||
}
|
||||
----------
|
||||
2.
|
||||
// TODO: "(Entry) Write EC-GN-P01-GAF:PCF4210-YTS-GA1" What does Entry mean? Does it mean to do something
|
||||
// only on the first cycle when we enter this state? What do I write to signal EC-GN-P01-GAF:PCF4210-YTS-GA1?
|
||||
// MEMO: EC-GN-P01-GAF:PCF4210-YTS-GA1 is a PV that fast controller notifies Gyrotron operation state to PLC.
|
||||
// When enter the HVArmed state, App writes 1 to this EPICS PV.
|
||||
----------
|
||||
3.
|
||||
if (EC-GN-P01-PB1F:PSU1000-CON-SW == 1) // TODO: when do we go from HVArmed to HVInjectionBPS?
|
||||
// MEMO: If MHVPS HV is turned ON first, goto this state.
|
||||
{
|
||||
change state to HVInjectionBPS
|
||||
}
|
||||
----------
|
||||
4.
|
||||
if (EC-GN-P01-PMF:PSU0000-CON-SW == 1) // TODO: when do we go from HVArmed to HVInjectionMHVPS?
|
||||
// MEMO: If BPS HV is turned ON first, goto this state.
|
||||
{
|
||||
change state to HVInjectionMHVPS
|
||||
}
|
||||
----------
|
||||
5.
|
||||
count up elapsed time (time from HVON detection)
|
||||
Write time to EC-GN-P01-GAF:STAT-ELAPSED
|
||||
----------
|
||||
6.
|
||||
if (EC-GN-P01-GPF::PLC4110-YSTA-MPSS == 1) //When SYNC mode turned ON.
|
||||
{
|
||||
change state to HVArmedESDN
|
||||
}
|
||||
----------
|
||||
|
||||
HVArmedESDN // Start ESDN command, waveform subscription.
|
||||
==========
|
||||
1.
|
||||
if (EC-GN-P01-GPF:PLC4110-YTS-ST3R == 0)
|
||||
{
|
||||
change state to Offline
|
||||
}
|
||||
----------
|
||||
2.
|
||||
if (EC-GN-P01-PB1F:PSU1000-CON-SW == 1)
|
||||
{
|
||||
change state to HVInjectionBPSESDN
|
||||
}
|
||||
----------
|
||||
3.
|
||||
if (EC-GN-P01-PMF:PSU0000-CON-SW == 1)
|
||||
{
|
||||
change state to HVInjectionMHVPSESDN
|
||||
}
|
||||
----------
|
||||
4.
|
||||
count up elapsed time (time from HVON detection)
|
||||
Write time to EC-GN-P01-GAF:STAT-ELAPSED
|
||||
----------
|
||||
6.
|
||||
if (EC-GN-P01-GPF::PLC4110-YSTA-MPSS == 0) //When SYNC mode turned ON.
|
||||
{
|
||||
change state to HVArmed
|
||||
}
|
||||
----------
|
||||
|
||||
HVInjectionBPS
|
||||
==========
|
||||
HVInjectionMHVPS
|
||||
==========
|
||||
1.
|
||||
// MEMO: Write Gyrotron state PV (HVInjection) to notify PLC.
|
||||
Write 1 to EC-GN-P01-GAF:PCF4210-YTS-GA2.
|
||||
----------
|
||||
// TODO: Following questions/states are for ALL of the above states
|
||||
2. (Exist in HVInjection BPS)
|
||||
set signal EC-GN-P01-PA1F:PSU3000-CON-SW = 1 // TODO when do we set this signal
|
||||
// MEMO: Countdown time for EC-GN-P01-PA1F:STAT-DT-SWON
|
||||
----------
|
||||
2. (Exist in HVInjection MHVPS)
|
||||
set signal EC-GN-P01-PB1F:PSU1000-CON-SW = 1 // TODO when do we set this signal
|
||||
// MEMO: Countdown time for EC-GN-P01-PB1F:STAT-DT-SWON
|
||||
----------
|
||||
3.
|
||||
set signal EC-GN-P01-PMF:PSU0000-CON-SW = 1 // TODO when do we set this signal
|
||||
// MEMO: Countdown time for EC-GN-P01-PMF:STAT-DT-SWON
|
||||
----------
|
||||
4.
|
||||
// TODO when to switch to RFON?
|
||||
// MEMO: Go to RFON state when All switch PVs are 1. and the mode is async.
|
||||
if (EC-GN-P01-PA1F:PSU3000-CON-SW == 1 AND
|
||||
EC-GN-P01-PB1F:PSU1000-CON-SW == 1 AND
|
||||
EC-GN-P01-PMF:PSU0000-CON-SW == 1)
|
||||
{
|
||||
change state to RFON
|
||||
}
|
||||
----------
|
||||
5.
|
||||
count up elapsed time (time from HVON detection)
|
||||
Write time to EC-GN-P01-GAF:STAT-ELAPSED
|
||||
----------
|
||||
|
||||
HVInjectionESDN
|
||||
==========
|
||||
1.
|
||||
// MEMO: Write Gyrotron state PV (HVInjection) to notify PLC.
|
||||
Write 1 to EC-GN-P01-GAF:PCF4210-YTS-GA2.
|
||||
----------
|
||||
2.
|
||||
set signal EC-GN-P01-PA1F:PSU3000-CON-SW = 1
|
||||
// Write 1 when ESDN command give a command.
|
||||
----------
|
||||
3.
|
||||
set signal EC-GN-P01-PB1F:PSU1000-CON-SW = 1
|
||||
// Write 1 when ESDN command give a command.
|
||||
----------
|
||||
4.
|
||||
set signal EC-GN-P01-PMF:PSU0000-CON-SW = 1
|
||||
// Write 1 when ESDN command give a command.
|
||||
----------
|
||||
5.
|
||||
// TODO when to switch to RFONESDN?
|
||||
// MEMO: Go to RFON state when All switch PVs are 1. and the mode is sync.i,e. change from HVInjectionxxxESDN
|
||||
if (EC-GN-P01-PA1F:PSU3000-CON-SW == 1 AND
|
||||
EC-GN-P01-PB1F:PSU1000-CON-SW == 1 AND
|
||||
EC-GN-P01-PMF:PSU0000-CON-SW == 1)
|
||||
{
|
||||
change state to RFONESDN
|
||||
}
|
||||
----------
|
||||
|
||||
RFON
|
||||
==========
|
||||
// TODO is this correct?
|
||||
1.
|
||||
// This only executes on the last cycle before we move to HVArmed
|
||||
if (EC-GN-P01-GAF:STAT-BEAMON-TIME >= EC-GN-P01-GAF:STAT-DT-SHOTLEN)
|
||||
{
|
||||
set signal EC-GN-P01-PA1F:PSU3000-CON-SW = 0
|
||||
set signal EC-GN-P01-PB1F:PSU1000-CON-SW = 0
|
||||
set signal EC-GN-P01-PMF:PSU0000-CON-SW = 0
|
||||
}
|
||||
----------
|
||||
2.
|
||||
if (EC-GN-P01-GAF:STAT-BEAMON-TIME >= EC-GN-P01-GAF:STAT-DT-SHOTLEN)
|
||||
{
|
||||
change state to HVArmed
|
||||
}
|
||||
----------
|
||||
3.
|
||||
count up elapsed time (time from HVON detection)
|
||||
Write time to EC-GN-P01-GAF:STAT-ELAPSED
|
||||
----------
|
||||
4.
|
||||
When enter the state beam-on timer is set to 0.
|
||||
count up beam-on time. write the time into EC-GN-P01-GAF:STAT-BEAMON-TIME
|
||||
----------
|
||||
|
||||
|
||||
|
||||
RFONESDN
|
||||
==========
|
||||
// TODO is this correct?
|
||||
// MEMO: In the ESDN sync mode, HVPS turned off by ESDN packet.
|
||||
// In both mode, there is mode_limit which is given by (EC-GN-P01-GPF:PLC4110-YTS-MD1,2,3,4).
|
||||
1.
|
||||
// This only executes on the last cycle before we move to HVArmed
|
||||
if (EC-GN-P01-GAF:STAT-BEAMON-TIME >= t_mode_limit) // TODO: where do I get t_mode_limit?
|
||||
{
|
||||
set signal EC-GN-P01-PA1F:PSU3000-CON-SW = 0
|
||||
set signal EC-GN-P01-PB1F:PSU1000-CON-SW = 0
|
||||
set signal EC-GN-P01-PMF:PSU0000-CON-SW = 0
|
||||
}
|
||||
----------
|
||||
2.
|
||||
if (EC-GN-P01-GAF:STAT-BEAMON-TIME >= t_mode_limit) // TODO: where do I get t_mode_limit?
|
||||
{
|
||||
change state to HVArmedESDN
|
||||
}
|
||||
----------
|
||||
3.
|
||||
Subscribe ESDN commands. When GAM detect Beam-off command. It turn all HVPS SW OFF.
|
||||
And change state to HVArmedESDN
|
||||
----------
|
||||
4.
|
||||
count up elapsed time (time from HVON detection)
|
||||
Write time to EC-GN-P01-GAF:STAT-ELAPSED
|
||||
----------
|
||||
5.
|
||||
When enter the state beam-on timer is set to 0.
|
||||
count up beam-on time. write the time into EC-GN-P01-GAF:STAT-BEAMON-TIME
|
||||
----------
|
||||
|
||||
|
||||
Error
|
||||
==========
|
||||
1.
|
||||
// Only execute on the first cycle after entering this state
|
||||
if (first)
|
||||
{
|
||||
set first = false
|
||||
|
||||
set signal EC-GN-P01-PA1F:PUS3000-CON-HV = 0 // TODO: there is no signal named EC-GN-P01-PA1F:PUS3000-CON-HV
|
||||
set signal EC-GN-P01-PA1F:PSU3000-CON-SW = 0
|
||||
set signal EC-GN-P01-PB1F:PSU1000-CON-HV = 0
|
||||
set signal EC-GN-P01-PB1F:PSU1000-CON-SW = 0
|
||||
set signal EC-GN-P01-PMF:PSU0000-CON-SW = 0
|
||||
// MEMO: PA2F and PB2F are component type for gyrotron B. I will remove following action.
|
||||
set signal EC-GN-P01-PA2F:PUS4000-CON-HV = 0 // TODO: there is no signal named EC-GN-P01-PA2F:PUS4000-CON-HV
|
||||
set signal EC-GN-P01-PA2F:PSU4000-CON-SW = 0 // TODO: signal EC-GN-P01-PA2F:PSU4000-CON-SW missing in configuration file
|
||||
set signal EC-GN-P01-PB2F:PSU2000-CON-HV = 0 // TODO: signal EC-GN-P01-PB2F:PSU2000-CON-HV missing in configuration file
|
||||
set signal EC-GN-P01-PB2F:PSU2000-CON-SW = 0 // TODO: signal EC-GN-P01-PB2F:PSU2000-CON-SW missing in configuration file
|
||||
|
||||
set signal EC-GN-P01-PMF:PSU0000-CON-SW = 1
|
||||
set signal EC-GN-P01-PA1F:PSU3000-CTRP = 1
|
||||
set signal EC-GN-P01-PB1F:PSU1000-CTRP = 1
|
||||
// MEMO: PA2F and PB2F are component type for gyrotron B. I will remove following action.
|
||||
set signal EC-GN-P01-PA2F:PSU4000-CTRP = 1 // TODO: signal EC-GN-P01-PA2F:PSU4000-CTRP missing in configuration file
|
||||
set signal EC-GN-P01-PB2F:PSU1000-CTRP = 1 // TODO: there is no signal named EC-GN-P01-PB2F:PSU1000-CTRP
|
||||
}
|
||||
----------
|
||||
2.
|
||||
if (EC-GN-P01-GPF:STAT-RST-FLT == 1 && ) // TODO: when do we go to Offline state?
|
||||
{
|
||||
change state to Offline
|
||||
}
|
||||
----------
|
||||
Reference in new issue
Block a user