1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342 |
- import QtQuick 2.15
- import QtQuick.Layouts 1.3
- import QtQuick.Controls 1.2
- //import QtQuick 2.11
- //import QtQuick.Layouts 1.3
- //import QtQuick.Controls 2.14
- //import QtQuick.Controls.Styles 1.2
- import QtQuick.Controls.Styles 1.4
- import Qt.labs.qmlmodels 1.0
- //import QtQuick.LocalStorage 2.0
- //import io.qt.DataBaseModel 1.0
- import Qt.labs.platform 1.1
- import TService 1.0
- Item {
- id: root
- property var pagetype:rootitem.Page_Type_Testing
- property string title_str:"PID 参数整定"
- property var volume: [0,0,0,0,0]
- property var keeptime: [0,0,0,0,0]
- property var outermax: [0.0, 0.0, 0.0, 0.0, 0.0]
- property var outermini: [0.0, 0.0, 0.0, 0.0, 0.0]
- property var outerKp: [0.0, 0.0, 0.0, 0.0, 0.0]
- property var outerKi: [0.0, 0.0, 0.0, 0.0, 0.0]
- property var outerKd: [0.0, 0.0, 0.0, 0.0, 0.0]
- property var innermax: [0.0, 0.0, 0.0, 0.0, 0.0]
- property var innermini: [0.0, 0.0, 0.0, 0.0, 0.0]
- property var innerKp: [0.0, 0.0, 0.0, 0.0, 0.0]
- property var innerKi: [0.0, 0.0, 0.0, 0.0, 0.0]
- property var innerKd: [0.0, 0.0, 0.0, 0.0, 0.0]
- property var innermaxI: [0.0, 0.0, 0.0, 0.0, 0.0]
- property var innermaxIstep: [0.0, 0.0, 0.0, 0.0, 0.0]
- property var innermaxDstep: [0.0, 0.0, 0.0, 0.0, 0.0]
- property string background: "#d7e3bc"
- property string alterBackground: "white"
- property string highlight: "#e4f7d6"
- property string headerBkgnd: "#F0F0F0"
- property var normalG: Gradient {
- GradientStop { position: 0.0; color: "#c7d3ac" }
- GradientStop { position: 1.0; color: "#F0F0F0" }
- }
- property var hoverG: Gradient {
- GradientStop { position: 0.0; color: "white"; }
- GradientStop { position: 1.0; color: "#d7e3bc"; }
- }
- property var pressG: Gradient {
- GradientStop { position: 0.0; color: "#d7e3bc"; }
- GradientStop { position: 1.0; color: "white"; }
- }
- function set_paras(){
- var Jsonobj={}
- var itemArrayJson=[]
- var j=0;
- for(var i = 0; i<param_model.count; i++){
- var row_record = param_model.get(i)
- if(row_record.volume > 0){
- var item={}
- item.max_volume = row_record.volume
- item.keep_time = row_record.time
- item.outermax = row_record.out_max
- item.outermin = row_record.out_min
- item.outerkp = row_record.out_kp
- item.outerki = row_record.out_ki
- item.outerkd = row_record.out_kd
- item.innermax = row_record.inner_max
- item.innermin =row_record.inner_min
- item.innerkp = row_record.inner_kp
- item.innerki = row_record.inner_ki
- item.innerkd = row_record.inner_kd
- item.innermaxI = row_record.inner_maxI
- item.innerIstep = row_record.inner_maxIstep
- item.innerDstep = row_record.inner_maxDstep
- itemArrayJson[j] = item
- j++
- }
- }
- Jsonobj.pids = itemArrayJson
- CalibrationPara.set_paras(JSON.stringify(Jsonobj) );
- }
- function update_paras(index, item){
- param_model.append({
- "idx":index,
- "volume":item.max_volume,
- "time":item.keep_time,
- "out_max":item.outermax,
- "out_min":item.outermin,
- "out_kp":item.outerkp,
- "out_ki":item.outerki,
- "out_kd":item.outerkd,
- "inner_max":item.innermax,
- "inner_min":item.innermin,
- "inner_kp":item.innerkp,
- "inner_ki":item.innerki,
- "inner_kd":item.innerkd,
- "inner_maxI":item.innermaxI,
- "inner_maxIstep":item.innerIstep,
- "inner_maxDstep":item.innerDstep})
- }
- function clear_paras(index){
- if(index === 0){
- volume1.text = 0
- keep1.text = 0
- outmax1.text = 0
- outmini1.text = 0
- outp1.text = 0
- outi1.text = 0
- outd1.text = 0
- inmax1.text = 0
- inmini1.text = 0
- inp1.text = 0
- ini1.text = 0
- ind1.text = 0
- inmaxI1.text = 0
- inmaxIstep1.text = 0
- inmaxDstep1.text = 0
- }else if(index === 1){
- volume2.text = 0
- keep2.text = 0
- outmax2.text = 0
- outmini2.text = 0
- outp2.text = 0
- outi2.text = 0
- outd2.text = 0
- inmax2.text = 0
- inmini2.text = 0
- inp2.text = 0
- ini2.text = 0
- ind2.text = 0
- inmaxI2.text = 0
- inmaxIstep2.text = 0
- inmaxDstep2.text = 0
- }else if(index === 2){
- volume3.text = 0
- keep3.text = 0
- outmax3.text = 0
- outmini3.text = 0
- outp3.text = 0
- outi3.text = 0
- outd3.text = 0
- inmax3.text = 0
- inmini3.text = 0
- inp3.text = 0
- ini3.text = 0
- ind3.text = 0
- inmaxI3.text = 0
- inmaxIstep3.text = 0
- inmaxDstep3.text = 0
- }else if(index === 3){
- volume4.text = 0
- keep4.text = 0
- outmax4.text = 0
- outmini4.text = 0
- outp4.text = 0
- outi4.text = 0
- outd4.text = 0
- inmax4.text = 0
- inmini4.text = 0
- inp4.text = 0
- ini4.text = 0
- ind4.text = 0
- inmaxI4.text = 0
- inmaxIstep4.text = 0
- inmaxDstep4.text = 0
- }else if(index === 4){
- volume5.text = 0
- keep5.text = 0
- outmax5.text = 0
- outmini5.text = 0
- outp5.text = 0
- outi5.text = 0
- outd5.text = 0
- inmax5.text = 0
- inmini5.text = 0
- inp5.text = 0
- ini5.text = 0
- ind5.text = 0
- inmaxI5.text = 0
- inmaxIstep5.text = 0
- inmaxDstep5.text = 0
- }
- }
- function update_detail(){
- var jsonobj = CalibrationPara.get_paras();
- param_model.clear()
- for(var index= 0; index< jsonobj.count; index++){
- update_paras(index, jsonobj.pids[index])
- }
- }
- function get_role(column){
- var role = "idx"
- switch(column){
- case 1:
- role = "volume"
- break
- case 2:
- role = "time"
- break
- case 3:
- role = "out_max"
- break
- case 4:
- role = "out_min"
- break
- case 5:
- role = "out_kp"
- break
- case 6:
- role = "out_ki"
- break
- case 7:
- role = "out_kd"
- break
- case 8:
- role = "inner_max"
- break
- case 9:
- role = "inner_min"
- break
- case 10:
- role = "inner_kp"
- break
- case 11:
- role = "inner_ki"
- break
- case 12:
- role = "inner_kd"
- break
- case 13:
- role = "inner_maxI"
- break
- case 14:
- role = "inner_maxIstep"
- break
- case 15:
- role = "inner_maxDstep"
- break
- default:
- break
- }
- return role
- }
- DynamicGroupBox{
- id:groupbox
- anchors.centerIn: parent
- anchors.fill: parent
- title: title_str
- Column{
- Rectangle{
- id:param_rect
- //x:-10
- width: 1250
- height: 420
- //anchors.centerIn: parent
- color: "white"
- radius: 6
- border.color: "black"
- Text{
- id:text_title
- anchors.top: parent.top
- anchors.topMargin: 10
- anchors.horizontalCenter: parent.horizontalCenter
- font.bold: true
- font.pixelSize: 24
- text: "PID 参数标定"
- }
- Component{
- id:itemDelegateTextEdit
- TextField {
- anchors.verticalCenter: parent.verticalCenter
- text: styleData.value
- font.pointSize: 10
- //font.pixelSize: 24
- //font.bold: true
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- validator:RegExpValidator {
- regExp: /(-?[0-9]\d*((.\d+)*))*/
- // /(-?[0-9]\d*((.\d+)*))|(0.\d+)*/
- ///[0-9]*/
- }
- anchors.fill: parent
- onEditingFinished: {
- //console.log("row === "+styleData.row );
- //console.log("column=== "+styleData.column);
- //console.log("role === "+get_role(styleData.column));
- var role = get_role(styleData.column)
- if("idx" !== role){
- param_model.setProperty(styleData.row, get_role(styleData.column), Number(text))
- }
- }
- }
- }
- Component{
- id:itemDelegateText
- Text {
- anchors.verticalCenter: parent.verticalCenter
- color: styleData.selected?"#1E90FF":"#000000"
- elide: styleData.elideMode
- text: styleData.value
- font.pointSize: 10
- //font.pixelSize: 24
- //font.bold: true
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- anchors.fill: parent
- }
- }
- TableView{
- id:tableView
- //frameVisible: true
- width: parent.width
- focus: true
- //height: parent.height - 50
- anchors.top: text_title.bottom
- anchors.bottom: parent.bottom
- anchors.topMargin: 10
- TableViewColumn{role: "idx"; title: "ID"; width: 40; movable:false; delegate: itemDelegateText}
- TableViewColumn{role: "volume"; title: "容积≤(L)"; width: 120; movable:false; delegate: itemDelegateTextEdit}
- TableViewColumn{role: "time"; title: "稳压时间(秒)"; width: 120; movable:false; delegate: itemDelegateTextEdit}
- TableViewColumn{role: "out_max"; title: "外环max"; width: 80; movable:false; delegate: itemDelegateTextEdit}
- TableViewColumn{role: "out_min"; title: "外环min"; width: 80; movable:false; delegate: itemDelegateTextEdit}
- TableViewColumn{role: "out_kp"; title: "外环KP"; width: 80; movable:false; delegate: itemDelegateTextEdit}
- TableViewColumn{role: "out_ki"; title: "外环KI"; width: 80; movable:false; delegate: itemDelegateTextEdit}
- TableViewColumn{role: "out_kd"; title: "外环KD"; width: 80; movable:false; delegate: itemDelegateTextEdit}
- TableViewColumn{role: "inner_max"; title: "内环max"; width: 80; movable:false; delegate: itemDelegateTextEdit}
- TableViewColumn{role: "inner_min"; title: "内环min"; width: 80; movable:false; delegate: itemDelegateTextEdit}
- TableViewColumn{role: "inner_kp"; title: "内环KP"; width: 80; movable:false; delegate: itemDelegateTextEdit}
- TableViewColumn{role: "inner_ki"; title: "内环KI"; width: 80; movable:false; delegate: itemDelegateTextEdit}
- TableViewColumn{role: "inner_kd"; title: "内环KD"; width: 80; movable:false; delegate: itemDelegateTextEdit}
- TableViewColumn{role: "inner_maxI"; title: "内环maxI"; width: 80; movable:false; delegate: itemDelegateTextEdit}
- TableViewColumn{role: "inner_maxIstep"; title: "内环Istep"; width: 80; movable:false; delegate: itemDelegateTextEdit}
- TableViewColumn{role: "inner_maxDstep"; title: "内环Rstep"; width: 80; movable:false; delegate: itemDelegateTextEdit}
- //model: modelItems
- headerDelegate: Rectangle{
- implicitWidth: 16
- implicitHeight: 24
- gradient: styleData.pressed ? selftest_root.pressG : (styleData.containsMouse ? root.hoverG: root.normalG)
- border.color: "gray"
- border.width: 1
- Text{
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- anchors.leftMargin: 4
- anchors.right: parent.right
- anchors.rightMargin: 4
- text: styleData.value
- color: styleData.pressed ?"red" : "blue"
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- font.bold: true
- }
- }
- rowDelegate: Rectangle{
- height: 32
- //border.color: "gray"
- //color: styleData.selected?"#f0b0b0af":(styleData.alternate?"#c3c3c0":"#c0c0c3")
- color: styleData.selected ? root.highlight : root.alterBackground
- }
- itemDelegate: Rectangle {
- height: 28
- //border.color: "gray"
- color: "transparent"
- Text {
- //anchors.centerIn: parent
- //anchors.left: parent.left
- anchors.leftMargin: 6
- anchors.verticalCenter: parent.verticalCenter
- //color: styleData.textColor
- color: styleData.selected ? "red" : styleData.textColor
- text: styleData.value
- verticalAlignment: Text.AlignVCenter
- font.pointSize: 13
- }
- }
- model:ListModel{
- id: param_model
- }
- }
- }
- Rectangle{
- id:button_rect
- //x:-10
- width: 1250
- height: 60
- color: "transparent"
- Row{
- spacing:30
- anchors.fill: parent
- UserButton {
- id: refresh_button;
- text: "刷新";
- font.pixelSize: 20
- anchors.verticalCenter: parent.verticalCenter
- width: 120
- height: 45
- onClicked: {
- update_detail()
- }
- }
- UserButton {
- id: save_button;
- text: "保存";
- font.pixelSize: 20
- anchors.verticalCenter: parent.verticalCenter
- width: 120
- height: 45
- onClicked: {
- set_paras()
- }
- }
- }
- }
- }
- /*
- Column{
- //spacing:10
- anchors.centerIn: parent
- width: 1200
- Row{
- width: parent.width
- height: 120
- spacing: 50
- Text { text: "1区参数 "; font.bold: true; font.pointSize: 12; }
- Column{
- //spacing:10
- Row{
- spacing:10
- InputLine{
- id:volume1
- paraName: "容积≤(L): "
- paraLength: 80
- onTextChanged: {
- volume[0] = Number(text)
- }
- }
- InputLine{
- id:keep1
- paraName: "保持时间(秒): "
- paraLength: 80
- onTextChanged: {
- keeptime[0] = Number(text)
- }
- }
- }
- Row{
- //spacing:10
- Text { text: "外环:"; font.bold: true; font.pointSize: 12; }
- InputLine{
- id:outmax1
- paraName: "Max:"
- paraLength: 60
- onTextChanged: {
- outermax[0] = Number(text)
- }
- }
- InputLine{
- id:outmini1
- paraName: "Mini:"
- paraLength: 60
- onTextChanged: {
- outermini[0] = Number(text)
- }
- }
- InputLine{
- id:outp1
- paraName: "Kp:"
- paraLength: 60
- onTextChanged: {
- outerKp[0] = Number(text)
- }
- }
- InputLine{
- id:outi1
- paraName: "Ki:"
- paraLength: 60
- onTextChanged: {
- outerKi[0] = Number(text)
- }
- }
- InputLine{
- id:outd1
- paraName: "Kd:"
- paraLength: 60
- onTextChanged: {
- outerKd[0] = Number(text)
- }
- }
- }
- Row{
- //spacing:10
- Text { text: "内环:"; font.bold: true; font.pointSize: 12; }
- InputLine{
- id:inmax1
- paraName: "Max:"
- paraLength: 60
- onTextChanged: {
- innermax[0] = Number(text)
- }
- }
- InputLine{
- id:inmini1
- paraName: "Mini:"
- paraLength: 60
- onTextChanged: {
- innermini[0] = Number(text)
- }
- }
- InputLine{
- id:inp1
- paraName: "Kp:"
- paraLength: 60
- onTextChanged: {
- innerKp[0] = Number(text)
- }
- }
- InputLine{
- id:ini1
- paraName: "Ki:"
- paraLength: 60
- onTextChanged: {
- innerKi[0] = Number(text)
- }
- }
- InputLine{
- id:ind1
- paraName: "Kd:"
- paraLength: 60
- onTextChanged: {
- innerKd[0] = Number(text)
- }
- }
- InputLine{
- id:inmaxI1
- paraName: "maxI:"
- paraLength: 60
- onTextChanged: {
- innermaxI[0] = Number(text)
- }
- }
- InputLine{
- id:inmaxIstep1
- paraName: "maxIstep:"
- paraLength: 60
- onTextChanged: {
- innermaxIstep[0] = Number(text)
- }
- }
- InputLine{
- id:inmaxDstep1
- paraName: "maxDstep:"
- paraLength: 60
- onTextChanged: {
- innermaxDstep[0] = Number(text)
- }
- }
- }
- }
- }
- Row{
- width: parent.width
- height: 120
- spacing: 50
- Text { text: "2区参数 "; font.bold: true; font.pointSize: 12; }
- Column{
- //spacing:10
- Row{
- spacing:10
- InputLine{
- id:volume2
- paraName: "容积≤(L): "
- paraLength: 80
- onTextChanged: {
- volume[1] = Number(text)
- }
- }
- InputLine{
- id:keep2
- paraName: "保持时间(秒): "
- paraLength: 80
- onTextChanged: {
- keeptime[1] = Number(text)
- }
- }
- }
- Row{
- //spacing:30
- Text { text: "外环:"; font.bold: true; font.pointSize: 12; }
- InputLine{
- id:outmax2
- paraName: "Max:"
- paraLength: 60
- onTextChanged: {
- outermax[1] = Number(text)
- }
- }
- InputLine{
- id:outmini2
- paraName: "Mini:"
- paraLength: 60
- onTextChanged: {
- outermini[1] = Number(text)
- }
- }
- InputLine{
- id:outp2
- paraName: "Kp:"
- paraLength: 60
- onTextChanged: {
- outerKp[1] = Number(text)
- }
- }
- InputLine{
- id:outi2
- paraName: "Ki:"
- paraLength: 60
- onTextChanged: {
- outerKi[1] = Number(text)
- }
- }
- InputLine{
- id:outd2
- paraName: "Kd:"
- paraLength: 60
- onTextChanged: {
- outerKd[1] = Number(text)
- }
- }
- }
- Row{
- //spacing:30
- Text { text: "内环:"; font.bold: true; font.pointSize: 12; }
- InputLine{
- id:inmax2
- paraName: "Max:"
- paraLength: 60
- onTextChanged: {
- innermax[1] = Number(text)
- }
- }
- InputLine{
- id:inmini2
- paraName: "Mini:"
- paraLength: 60
- onTextChanged: {
- innermini[1] = Number(text)
- }
- }
- InputLine{
- id:inp2
- paraName: "Kp:"
- paraLength: 60
- onTextChanged: {
- innerKp[1] = Number(text)
- }
- }
- InputLine{
- id:ini2
- paraName: "Ki:"
- paraLength: 60
- onTextChanged: {
- innerKi[1] = Number(text)
- }
- }
- InputLine{
- id:ind2
- paraName: "Kd:"
- paraLength: 60
- onTextChanged: {
- innerKd[1] = Number(text)
- }
- }
- InputLine{
- id:inmaxI2
- paraName: "maxI:"
- paraLength: 60
- onTextChanged: {
- innermaxI[1] = Number(text)
- }
- }
- InputLine{
- id:inmaxIstep2
- paraName: "maxIstep:"
- paraLength: 60
- onTextChanged: {
- innermaxIstep[1] = Number(text)
- }
- }
- InputLine{
- id:inmaxDstep2
- paraName: "maxDstep:"
- paraLength: 60
- onTextChanged: {
- innermaxDstep[1] = Number(text)
- }
- }
- }
- }
- }
- Row{
- width: parent.width
- height: 120
- spacing: 50
- Text { text: "3区参数 "; font.bold: true; font.pointSize: 12; }
- Column{
- //spacing:10
- Row{
- spacing:10
- InputLine{
- id:volume3
- paraName: "容积≤(L): "
- paraLength: 80
- onTextChanged: {
- volume[2] = Number(text)
- }
- }
- InputLine{
- id:keep3
- paraName: "保持时间(秒): "
- paraLength: 80
- onTextChanged: {
- keeptime[2] = Number(text)
- }
- }
- }
- Row{
- //spacing:30
- Text { text: "外环:"; font.bold: true; font.pointSize: 12; }
- InputLine{
- id:outmax3
- paraName: "Max:"
- paraLength: 60
- onTextChanged: {
- outermax[2] = Number(text)
- }
- }
- InputLine{
- id:outmini3
- paraName: "Mini:"
- paraLength: 60
- onTextChanged: {
- outermini[2] = Number(text)
- }
- }
- InputLine{
- id:outp3
- paraName: "Kp:"
- paraLength: 60
- onTextChanged: {
- outerKp[2] = Number(text)
- }
- }
- InputLine{
- id:outi3
- paraName: "Ki:"
- paraLength: 60
- onTextChanged: {
- outerKi[2] = Number(text)
- }
- }
- InputLine{
- id:outd3
- paraName: "Kd:"
- paraLength: 60
- onTextChanged: {
- outerKd[2] = Number(text)
- }
- }
- }
- Row{
- //spacing:30
- Text { text: "内环:"; font.bold: true; font.pointSize: 12; }
- InputLine{
- id:inmax3
- paraName: "Max:"
- paraLength: 60
- onTextChanged: {
- innermax[2] = Number(text)
- }
- }
- InputLine{
- id:inmini3
- paraName: "Mini:"
- paraLength: 60
- onTextChanged: {
- innermini[2] = Number(text)
- }
- }
- InputLine{
- id:inp3
- paraName: "Kp:"
- paraLength: 60
- onTextChanged: {
- innerKp[2] = Number(text)
- }
- }
- InputLine{
- id:ini3
- paraName: "Ki:"
- paraLength: 60
- onTextChanged: {
- innerKi[2] = Number(text)
- }
- }
- InputLine{
- id:ind3
- paraName: "Kd:"
- paraLength: 60
- onTextChanged: {
- innerKd[2] = Number(text)
- }
- }
- InputLine{
- id:inmaxI3
- paraName: "maxI:"
- paraLength: 60
- onTextChanged: {
- innermaxI[2] = Number(text)
- }
- }
- InputLine{
- id:inmaxIstep3
- paraName: "maxIstep:"
- paraLength: 60
- onTextChanged: {
- innermaxIstep[2] = Number(text)
- }
- }
- InputLine{
- id:inmaxDstep3
- paraName: "maxDstep:"
- paraLength: 60
- onTextChanged: {
- innermaxDstep[2] = Number(text)
- }
- }
- }
- }
- }
- Row{
- width: parent.width
- height: 120
- spacing: 50
- Text { text: "4区参数 "; font.bold: true; font.pointSize: 12; }
- Column{
- //spacing:10
- Row{
- spacing:10
- InputLine{
- id:volume4
- paraName: "容积≤(L): "
- paraLength: 80
- onTextChanged: {
- volume[3] = Number(text)
- }
- }
- InputLine{
- id:keep4
- paraName: "保持时间(秒): "
- paraLength: 80
- onTextChanged: {
- keeptime[3] = Number(text)
- }
- }
- }
- Row{
- //spacing:30
- Text { text: "外环:"; font.bold: true; font.pointSize: 12; }
- InputLine{
- id:outmax4
- paraName: "Max:"
- paraLength: 60
- onTextChanged: {
- outermax[3] = Number(text)
- }
- }
- InputLine{
- id:outmini4
- paraName: "Mini:"
- paraLength: 60
- onTextChanged: {
- outermini[3] = Number(text)
- }
- }
- InputLine{
- id:outp4
- paraName: "Kp:"
- paraLength: 60
- onTextChanged: {
- outerKp[3] = Number(text)
- }
- }
- InputLine{
- id:outi4
- paraName: "Ki:"
- paraLength: 60
- onTextChanged: {
- outerKi[3] = Number(text)
- }
- }
- InputLine{
- id:outd4
- paraName: "Kd:"
- paraLength: 60
- onTextChanged: {
- outerKd[3] = Number(text)
- }
- }
- }
- Row{
- //spacing:30
- Text { text: "内环:"; font.bold: true; font.pointSize: 12; }
- InputLine{
- id:inmax4
- paraName: "Max:"
- paraLength: 60
- onTextChanged: {
- innermax[3] = Number(text)
- }
- }
- InputLine{
- id:inmini4
- paraName: "Mini:"
- paraLength: 60
- onTextChanged: {
- innermini[3] = Number(text)
- }
- }
- InputLine{
- id:inp4
- paraName: "Kp:"
- paraLength: 60
- onTextChanged: {
- innerKp[3] = Number(text)
- }
- }
- InputLine{
- id:ini4
- paraName: "Ki:"
- paraLength: 60
- onTextChanged: {
- innerKi[3] = Number(text)
- }
- }
- InputLine{
- id:ind4
- paraName: "Kd:"
- paraLength: 60
- onTextChanged: {
- innerKd[3] = Number(text)
- }
- }
- InputLine{
- id:inmaxI4
- paraName: "maxI:"
- paraLength: 60
- onTextChanged: {
- innermaxI[3] = Number(text)
- }
- }
- InputLine{
- id:inmaxIstep4
- paraName: "maxIstep:"
- paraLength: 60
- onTextChanged: {
- innermaxIstep[3] = Number(text)
- }
- }
- InputLine{
- id:inmaxDstep4
- paraName: "maxDstep:"
- paraLength: 60
- onTextChanged: {
- innermaxDstep[3] = Number(text)
- }
- }
- }
- }
- }
- Row{
- width: parent.width
- height: 120
- spacing: 50
- Text { text: "5区参数 "; font.bold: true; font.pointSize: 12; }
- Column{
- //spacing:10
- Row{
- spacing:10
- InputLine{
- id:volume5
- paraName: "容积≤(L): "
- paraLength: 80
- onTextChanged: {
- volume[4] = Number(text)
- }
- }
- InputLine{
- id:keep5
- paraName: "保持时间(秒): "
- paraLength: 80
- onTextChanged: {
- keeptime[4] = Number(text)
- }
- }
- }
- Row{
- //spacing:30
- Text { text: "外环:"; font.bold: true; font.pointSize: 12; }
- InputLine{
- id:outmax5
- paraName: "Max:"
- paraLength: 60
- onTextChanged: {
- outermax[4] = Number(text)
- }
- }
- InputLine{
- id:outmini5
- paraName: "Mini:"
- paraLength: 60
- onTextChanged: {
- outermini[4] = Number(text)
- }
- }
- InputLine{
- id:outp5
- paraName: "Kp:"
- paraLength: 60
- onTextChanged: {
- outerKp[4] = Number(text)
- }
- }
- InputLine{
- id:outi5
- paraName: "Ki:"
- paraLength: 60
- onTextChanged: {
- outerKi[4] = Number(text)
- }
- }
- InputLine{
- id:outd5
- paraName: "Kd:"
- paraLength: 60
- onTextChanged: {
- outerKd[4] = Number(text)
- }
- }
- }
- Row{
- //spacing:30
- Text { text: "内环:"; font.bold: true; font.pointSize: 12; }
- InputLine{
- id:inmax5
- paraName: "Max:"
- paraLength: 60
- onTextChanged: {
- innermax[4] = Number(text)
- }
- }
- InputLine{
- id:inmini5
- paraName: "Mini:"
- paraLength: 60
- onTextChanged: {
- innermini[4] = Number(text)
- }
- }
- InputLine{
- id:inp5
- paraName: "Kp:"
- paraLength: 60
- onTextChanged: {
- innerKp[4] = Number(text)
- }
- }
- InputLine{
- id:ini5
- paraName: "Ki:"
- paraLength: 60
- onTextChanged: {
- innerKi[4] = Number(text)
- }
- }
- InputLine{
- id:ind5
- paraName: "Kd:"
- paraLength: 60
- onTextChanged: {
- innerKd[4] = Number(text)
- }
- }
- InputLine{
- id:inmaxI5
- paraName: "maxI:"
- paraLength: 60
- onTextChanged: {
- innermaxI[4] = Number(text)
- }
- }
- InputLine{
- id:inmaxIstep5
- paraName: "maxIstep:"
- paraLength: 60
- onTextChanged: {
- innermaxIstep[4] = Number(text)
- }
- }
- InputLine{
- id:inmaxDstep5
- paraName: "maxDstep:"
- paraLength: 60
- onTextChanged: {
- innermaxDstep[4] = Number(text)
- }
- }
- }
- }
- }
- Row{
- spacing:30
- UserButton {
- id: refresh_button;
- text: "刷新";
- font.pixelSize: 20
- anchors.verticalCenter: parent.verticalCenter
- width: 120
- height: 45
- onClicked: {
- update_detail()
- }
- }
- UserButton {
- id: save_button;
- text: "保存";
- font.pixelSize: 20
- anchors.verticalCenter: parent.verticalCenter
- width: 120
- height: 45
- onClicked: {
- set_paras()
- }
- }
- }
- }
- */
- }
- Component.onCompleted: {
- update_detail()
- }
- }
|