Regenerate SCT drivers
This commit is contained in:
@@ -127,7 +127,7 @@ proc ::scobj::pfeiffer_hg::checkstatus {tc_root} {
|
||||
set sp "[sct target]"
|
||||
if {[hpropexists [sct] simulated] && [sct simulated] == "true"} {
|
||||
set pv "${sp}"
|
||||
hset ${tc_root}/[sct driveable] ${sp}
|
||||
hupdateif ${tc_root}/[sct driveable] ${sp}
|
||||
}
|
||||
set pv "[hval ${tc_root}/[sct driveable]]"
|
||||
}
|
||||
@@ -206,14 +206,14 @@ proc ::scobj::pfeiffer_hg::pid_pressure {tc_root sp pv} {
|
||||
set p_value [expr {[sct pid_pvalue] * [sct pid_error]}]
|
||||
set d_value [expr {[sct pid_dvalue] * (${pv} - [sct oldval])}]
|
||||
sct pid_deriv [sct pid_error]
|
||||
sct pid_integ [expr {[sct pid_integ] + [sct pid_error]}]
|
||||
sct pid_integ [expr {[sct pid_integ] + [sct pid_error] * [sct pid_ivalue]}]
|
||||
if { [sct pid_integ] > [sct pid_imax] } {
|
||||
sct pid_integ [sct pid_imax]
|
||||
}
|
||||
if { [sct pid_integ] < -[sct pid_imax] } {
|
||||
sct pid_integ -[sct pid_imax]
|
||||
}
|
||||
set i_value [expr {[sct pid_ivalue] * [sct pid_integ]}]
|
||||
set i_value [sct pid_integ]
|
||||
set pid [expr {${p_value} + ${i_value} + ${d_value}}]
|
||||
# pid_pressure hook code starts
|
||||
if { [hpropexists [sct] pid_control] } {
|
||||
@@ -388,9 +388,7 @@ proc ::scobj::pfeiffer_hg::mkDriver { sct_controller name device_class simulatio
|
||||
sicslist setatt ${name} long_name ${name}
|
||||
|
||||
set scobj_hpath /sics/${name}
|
||||
# Start of unnamed group
|
||||
|
||||
# Start of var: status
|
||||
hfactory ${scobj_hpath}/status plain user int
|
||||
hsetprop ${scobj_hpath}/status control true
|
||||
hsetprop ${scobj_hpath}/status data true
|
||||
@@ -405,12 +403,9 @@ proc ::scobj::pfeiffer_hg::mkDriver { sct_controller name device_class simulatio
|
||||
hsetprop ${scobj_hpath} data "true"
|
||||
hsetprop ${scobj_hpath} klass "@none"
|
||||
hsetprop ${scobj_hpath} type "part"
|
||||
# End of unnamed group
|
||||
|
||||
# Start of named group: pressure
|
||||
hfactory ${scobj_hpath}/pressure plain spy none
|
||||
|
||||
# Start of var: sensor
|
||||
hfactory ${scobj_hpath}/pressure/sensor plain user float
|
||||
hsetprop ${scobj_hpath}/pressure/sensor read ${ns}::sendPR1 ${scobj_hpath} readPR1 {PR1}
|
||||
hsetprop ${scobj_hpath}/pressure/sensor readPR1 ${ns}::readPR1 ${scobj_hpath}
|
||||
@@ -443,7 +438,6 @@ proc ::scobj::pfeiffer_hg::mkDriver { sct_controller name device_class simulatio
|
||||
hsetprop ${scobj_hpath}/pressure/sensor simulated true
|
||||
}
|
||||
|
||||
# Start of var: setpoint
|
||||
hfactory ${scobj_hpath}/pressure/setpoint plain user float
|
||||
hsetprop ${scobj_hpath}/pressure/setpoint write ${ns}::setPoint ${scobj_hpath} noResponse {@}
|
||||
hsetprop ${scobj_hpath}/pressure/setpoint noResponse ${ns}::noResponse ${scobj_hpath}
|
||||
@@ -479,7 +473,6 @@ proc ::scobj::pfeiffer_hg::mkDriver { sct_controller name device_class simulatio
|
||||
hsetprop ${scobj_hpath}/pressure data "true"
|
||||
hsetprop ${scobj_hpath}/pressure klass "@none"
|
||||
hsetprop ${scobj_hpath}/pressure type "part"
|
||||
# End of named group: pressure
|
||||
ansto_makesctdrive ${name}_pressure_setpoint ${scobj_hpath}/pressure/setpoint ${scobj_hpath}/pressure/sensor ${sct_controller}
|
||||
hsetprop ${scobj_hpath} klass ${device_class}
|
||||
hsetprop ${scobj_hpath} data true
|
||||
@@ -527,8 +520,8 @@ proc add_pfeiffer_hg {name ip_address tcp_port} {
|
||||
::scobj::pfeiffer_hg::add_driver ${name} "environment" ${simulation_flag} ${ip_address} ${tcp_port}
|
||||
}
|
||||
|
||||
clientput "file evaluation of sct_pfeiffer_hg.tcl"
|
||||
::scobj::pfeiffer_hg::sics_log 9 "file evaluation of sct_pfeiffer_hg.tcl"
|
||||
clientput "file evaluation of pfeiffer_hg_sct.tcl"
|
||||
::scobj::pfeiffer_hg::sics_log 9 "file evaluation of pfeiffer_hg_sct.tcl"
|
||||
|
||||
proc ::scobj::pfeiffer_hg::read_config {} {
|
||||
set catch_status [ catch {
|
||||
@@ -600,7 +593,7 @@ proc ::scobj::pfeiffer_hg::read_config {} {
|
||||
}
|
||||
makesctcontroller sct_${name} aqadapter ${asyncqueue}
|
||||
}
|
||||
${ns}::mkDriver sct_${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}
|
||||
${ns}::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user