TMS Parameter Controls

合集下载

伺服控制器的参数优化方法详解

伺服控制器的参数优化方法详解

伺服控制器的参数优化方法详解伺服控制器是一种用来控制伺服电机运动的设备,通过调节控制器的参数,可以实现对伺服电机的精确控制。

参数优化是指在给定的系统要求下,通过改变参数的值,使得控制系统的性能得到最佳的改善。

本文将详细介绍伺服控制器的参数优化方法。

一、参数优化的意义在实际应用中,伺服控制器的性能直接影响到系统的运动响应速度、稳定性和精度。

通过参数优化,可以得到最佳的控制效果,提高系统的性能。

参数优化还可以降低系统的能耗,提高系统的稳定性和可靠性,减少故障发生的几率。

二、传统的参数优化方法1.经验法:传统的参数优化方法常常基于工程师的经验和实验数据,通过不断调整参数的值,直到满足系统要求为止。

这种方法简单易行,但需要耗费大量的时间和资源,并且无法保证最优的结果。

2.试错法:试错法是指通过试验和反馈的方式,不断调整参数的值,直到满足系统要求。

这种方法比较直观,但需要通过大量试验来确定参数的值,效率低下。

3.基于模型的优化方法:这种方法基于系统的建模和优化算法,通过数学模型和计算机模拟,得到最佳的参数值。

常用的方法包括遗传算法、粒子群算法等。

这种方法的优点是能够得到较好的优化效果,但需要对系统进行准确的建模和大量的计算,复杂度较高。

三、自适应控制器参数自整定方法自适应控制器是指通过监测和分析控制系统的反馈信号,自动调整控制器的参数,使其适应系统的变化。

常用的自适应控制器参数自整定方法有以下几种:1.极点配置法:极点配置法是通过改变系统的极点位置,来控制系统的动态响应。

通过合理选择极点的位置,可以使系统的稳定性和动态性能得到改善。

但是,该方法需要对系统进行精确的建模和系统的数学分析,适用性受到一定的限制。

2.自调整控制器(SAC):自调整控制器是一种通过不断调整参数来降低系统误差的方法。

它通过分析系统的反馈信号,根据误差的大小和方向,自动调整控制器的参数。

这种方法不需要对系统进行精确的建模,适用性较广。

自动控制原理专业词汇中英文对照

自动控制原理专业词汇中英文对照

自动控制原理专业词汇中英文对照中文 英文自动控制 automatic control;cybernation 自动控制系统 automatic control system自动控制理论 automatic control theory经典控制理论 classical control theory现代控制理论 modern control theory智能控制理论 intelligent control theory 开环控制 open-loop control闭环控制 closed-loop control输入量 input输出量 output给定环节 given unit/element比较环节 comparing unit/element放大环节 amplifying unit/element执行环节 actuating unit/element控制环节 controlling unit/element被控对象 (controlled) plant反馈环节 feedback unit/element控制器 controller扰动/干扰 perturbance/disturbance前向通道 forward channel反馈通道 feedback channel 恒值控制系统 constant control system随动控制系统 servo/drive control system 程序控制系统 programmed control system 连续控制系统 continuous control system离散控制系统 discrete control system线性控制系统 linear control system非线性控制系统 nonlinear control system定常/时不变控制系统 time-invariant control system 时变控制系统 time-variant control system 稳定性 stability快速性 rapidity准确性 accuracy数学模型 mathematical model微分方程 differential equation非线性特性 nonlinear characteristic线性化处理 linearization processing泰勒级数 Taylor series传递函数 transfer function比例环节 proportional element积分环节 integrating element一阶惯性环节 first order inertial element二阶惯性环节 second order inertial element二阶震荡环节 second order oscillation element 微分环节 differentiation element一阶微分环节 first order differentiation element二阶微分环节 second order differentiation element 延迟环节 delay element动态结构图 dynamic structure block串联环节 serial unit并联环节 parallel unit信号流图 signal flow graph梅逊增益公式 Mason’s gain formula时域分析法 time domain analysis method性能指标 performance index阶跃函数 step function斜坡函数 ramp function抛物线函数 parabolic function /acceleration function 冲击函数 impulse function正弦函数 sinusoidal function动态/暂态响应 transient response静态/稳态响应 steady-state response 延迟时间 delay time上升时间 rise time峰值时间 peak time调节时间 settling time最大超调量 maximum overshoot稳态误差 steady-state error无阻尼 undamping欠阻尼 underdamping过阻尼 overdamping特征根 eigen root极点 pole零点 zero实轴 real axis虚轴 imaginary axis 稳态/静态分量 steady-state component瞬态/暂态/动态分量 transient component 运动模态 motion mode衰减 attenuation系数 coefficient初相角 initial phase angle响应曲线 response curve主导极点 dominant pole 劳斯稳定判据 Routh stability criterion S平面 S plane胡尔维茨稳定判据 Hurwitz stability criterion 测量误差 measurement error扰动误差 agitation error结构性误差 structural error偏差 deviation根轨迹 root locus 常规根轨迹 routine root locus根轨迹方程 root locus equation 幅值 magnitude幅角 argument对称性 symmetry分离点 separation/break away point会合点 meeting/break-in point渐近线 asymptote出射角 emergence angle/angle of departure入射角 incidence angle/angle of arrival 广义根轨迹 generalized root locus零度根轨迹 zero degree root locus 偶极子 dipole/zero-pole pair 频域分析法 frequency-domain analysis method 频率特性 frequency characteristic极坐标系 polar coordinate system直角坐标系 rectangular coordinate system幅频特性 magnitude-frequency characteristic相频特性 phase-frequency characteristic 幅相频率特性 magnitude-phase frequency characteristic 最小相位系统 minimum phase system非最小相位系统 nonminimum phase system奈奎斯特稳定判据 Nyquist stability criterion 伯德定理 Bode theorem稳定裕度 stability margin幅值裕度 magnitude margin 相位/相角裕度 phase margin对数幅频特性 log magnitude-frequency characteristic 无阻尼自然震荡角频率 undamped oscillation angular frequency 阻尼震荡角频率 damped oscillation angular frequency 阻尼角 damping angle带宽频率 bandwidth frequency 穿越/截止频率 crossover/cutoff frequency 谐振峰值 resonance peak系统校正 system compensation超前校正 lead compensation滞后校正 lag compensation自激震荡 self-excited oscillation死区特性 dead zone characteristic饱和特性 saturation characteristic间隙特性 backlash characteristic描述函数法 describing function method相平面法 phase plane method 采样控制系统 sampling control system数字控制系统 digital control system频谱 frequency spectrum 采样定理 sampling theorem信号重现 signal recurrence拉氏变换 Laplace transformZ变换 Z transform终值定理 final-value theorem差分方程 difference equation迭代法 iterative method 脉冲传递函数 pulse transfer function零阶保持器 zero-order holder映射 mapping方框图 block diagram伯德图 Bode diagram特征方程 characteristic equation可控性 controllability临界阻尼 critical damping阻尼常数 damping constant阻尼比 damping ratio初始状态 initial state初值定理 initial-value theorem反Z变换 inverse Z-transformation负反馈 negative feedback正反馈 positive feedback 尼科尔斯图 Nichols chart部分分式展开 partial fraction expansion 幅角原理 argument principle相对稳定性 relative stability共振频率 resonant frequency劳斯表 Routh tabulation/array奇点 singularity渐进稳定性 asymptotic stability控制精度 control accuracy临界稳定性 critical stability耦合 coupling解耦 decoupling比例积分微分调节器 proportional integral derivative regulator(PID) 串联校正 series/cascade compensation 单输入单输出 single input single output(SISO)多输入多输出 multi input multi output(MIMO)低通滤波器 low pass filter非线性系统 nonlinear system复合控制 compound control衰减振荡 damped oscillation主反馈 monitoring feedback 转折(交接)频率 break frequency稳定焦点/节点 stable focus/node。

TMS-W 温度控制器说明书

TMS-W 温度控制器说明书

汤姆斯自动化科技有限公司中文版1、注意事项谢谢您的惠顾!1.1、前言请在使用仪表前认真阅读本说明书。

1.2、阅读指导TMS-W系列仪表的显示是通过七段数码管(LED)实现的,因此有些字符的显示与用户平时看的有所差别,它们的对应关系如右图1.3、注意事项* 客户打开仪表包装后,请检查仪表外观是否有损坏及产品型号是否与您相符,若有出现上述的问题请立即与本公司更换。

* 请确认仪表的接线无误后方能上电调试。

* 请在仪表允许的工作条件下使用仪表。

非专业人员不得擅自拆开仪表,以免发生危险;* 仪表每年应进行一次计量检定,如果仪表误差超出范围,通常都是由于潮湿、灰尘或腐蚀气体所导致,专业人员可对仪表内部进行清洁及干燥处理,通常这样就能解决问题。

如问题仍不能解决请与公司售后服务人员联系。

2、概述2.1、主要特点* 友好的人机界面,易学易用,操作快捷。

* 采用贴片技术(SMT),设计更加简洁、轻巧。

* 采用开关电源适应85V-265VAC范围或者24VDC电源供电。

* 支持多种输入类型,现场配置灵活方便。

* 模块化结构,灵活配置,方便升级.* 热电偶、热电阻输入采用非线性修正,测量精度高,稳定性好。

2.2、技术指标●输入规格。

输入可兼容:热电偶:K、S、E、J、T、B、N 、Wre325; 热电阻:Cu50、Pt100 ; 线性电压:0-5V、1-5V等线性电流:0-10mA、4-20mA等(若订货时未注明需外接250Ω精密电阻);扩充规格:在保留上述输入规格基础上,允许用户指定一种额外输入规格(非线性输入可能需要提供分度表)●测量范围:K ( -50 ~ 1300℃)、S ( -50 ~ 1700℃)、T ( -200 ~ 350℃) 、E ( 0 ~ 800℃)、J ( 0 ~ 1000℃)、B ( 300 ~ 1800℃)、N ( 0 ~ 1300℃)、Wre325(0~2300℃); Cu50 ( -50 ~ 150℃) 、Pt100 ( -200 ~ 600℃) ; 线性输入:-999-+9999由用户定义●测量误差:0.2级(热电阻热电偶、线性电压、线性电流输入且采用铜电阻补偿或冰点补偿冷端时)。

一种T-S模糊控制器的设计方法

一种T-S模糊控制器的设计方法

一种T-S模糊控制器的设计方法谢庆国;万淑芸;赵金【摘要】文章提出了一种比较系统化的T S模糊控制器的设计方法,根据时间最优的原则确定误差最大、最小和居中时的模糊规则,然后根据模糊规则的前件,等比例地确定模糊规则的后件参数.用这种方法设计了交流调速系统的速度控制器,给出了仿真结果.【期刊名称】《电气传动》【年(卷),期】2003(033)002【总页数】4页(P25-27,62)【关键词】T-S模糊控制器模糊规则 PID调节【作者】谢庆国;万淑芸;赵金【作者单位】华中科技大学;华中科技大学;华中科技大学【正文语种】中文【中图分类】工业技术电气传动 2 0 0 3 年第 Z 期————一种 T - S 模糊控制器的设计方法谢庆国万淑芸赵金华中科技大学摘要:文章提出了一种比较系统化的T -S模糊控制器的设计方法,根据时间最优的原则确定误差最大、最小和居中时的模糊规则,然后根据模糊规则的前件,等比例地确定模糊规则的后件参数。

用这种方法设计了交流调速系统的速度控制器,给出了仿真结果。

美■ 词:T -S 模糊控制器模糊规则 PI D 调节A S y s t e m i cD e sig n M e t h o d o l o g y o f T - S F u z z y C o n t r o ll e rX i e Q i n g g u o W a n S h u y u n Z h a o Ji n Ab s t r 8 c t r A s y s t e m i c d e sig n m e t h o d ol o g y o f T - S f u z z y c o n t r oll e r i s p r e s e n t e d i n t h e p a p e r.T h e f u z z y r ul e s wo r k i n g w ith m a x e r r o r , m i n e r r o r a n d m id dl e e r r o r a r e d e t e r m i n e d i n t h e ti m e o p ti m al p ri n ciple.T h e n t h e c o n - se q u e n c e c o e fficie n ts of f u z zy r ule s a r e d et e r m i n ed b y th e s e v al u e s of th e a n t e c ed e n t s e t s i n g e o m etric p r o p o r -ti o n.F i n ally , a s a n e x a m pl e , t h e s p e e d c o n t r o ll e r o f A C v a ri a b l e s p e e d s y s t e m i s d e sig n e d w ith s i m u l a ti o n r e - su l t s p r e s e n t e d a s { oll o w i n g.Ke y w o r d s : T - S f u z z y c o n t r olle r f u z z y r u l e s P I D r e g u l a ti o n1 引言模糊推理是模糊控制器设计的主要内容之一。

伺服系统的参数设定与调整方法

伺服系统的参数设定与调整方法

伺服系统的参数设定与调整方法伺服系统是一种常见的控制系统,广泛应用于各种机械设备中。

准确的参数设定和调整对于伺服系统的性能和稳定性至关重要。

本文将介绍伺服系统参数设定和调整的方法。

一、伺服系统参数设定方法伺服系统的参数设定是指根据实际需求,确定控制系统中的参数数值。

常见的参数包括比例增益、积分时间和微分时间等。

以下是一些常用的伺服系统参数设定的方法:1. 衰减法:通过衰减法可以较为准确地估计参数。

首先将伺服系统给予一个较大的幅值输入信号,观察输出信号的衰减情况。

通过分析衰减的速度和振荡周期等参数,可以确定系统的阻尼比和固有频率,从而设定PID控制器的参数。

2. 格里德法:格里德法是一种基于试错原理的参数设定方法。

系统首先设定一个较小的比例增益值,然后逐渐增大这个值,观察系统的响应。

如果系统出现振荡,则减小比例增益值;如果系统响应较慢,则增大比例增益值。

通过不断试错和调整,最终确定合适的比例增益。

3. 找根法:找根法是一种通过根轨迹的方法来确定参数的设定值。

通过分析系统的特征方程,可以画出系统的根轨迹。

根轨迹的形状和分布可以反映系统的稳定性和灵敏性。

根据根轨迹的情况,可以调整PID控制器的参数。

二、伺服系统参数调整方法伺服系统参数调整是指根据实际的运行效果和性能要求,微调参数的数值。

以下是几种常用的伺服系统参数调整的方法:1. 自适应控制:自适应控制是指根据系统的实时响应和状态,自动调整参数的数值。

自适应控制可以根据实际需求动态地修改参数,以提高系统的性能和稳定性。

2. 批量调整法:批量调整法是指通过实验和试验,对整个参数集进行调整。

可以通过设定不同的比例增益、积分时间和微分时间等参数来进行实验,观察系统的响应和性能指标,最终找到最佳的参数组合。

3. 样本跟踪法:样本跟踪法是指通过跟踪样本轨迹来调整参数。

首先设定一个样本轨迹,然后通过观察系统对样本轨迹的响应,逐渐调整参数,直到系统响应与样本轨迹一致。

时滞多项式T-S模糊系统的H_∞控制

时滞多项式T-S模糊系统的H_∞控制
LI Xi a o —f e n g h

L I We i—ho n g
( 1 . D e p a r t me n t o f M a t h e ma t i c s a n d P h y s i c s , H u a i y i n I n s t i t u t e o f T e c h n o l o g y , H u a i h n J i a n g s u 2 2 3 0 0 3 - C h i n a ; 2 . S c h o o l o f S c i e n c e 。 N a n j i n g U n i v e r s i t y o f S c i e n c e a n d T e c h n o l o y, g N a n j i n g 2 1 0 0 9 4, C h i n a )
Abs t r ac t:I n t h i s p a p e r -t h e p r o b l e m o f s t a b i l i t y a n a l y s i s a n d H c o nt r o l f o r t i me—d e l a y e d p o l y no mi a l T —S
时 滞 多项 式 T—S 模 糊 系统 的 H 。 。 控制
厉筱峰 , 李伟红
( 1 .淮阴工学院 数理学院ቤተ መጻሕፍቲ ባይዱ, 江苏 淮安 2 2 3 0 0 3 ; 2 .南京理工大学 理学院 , 南京 2 1 0 0 9 4 )
摘要 : 研究一类 时滞多项式 T—S 模糊 系统 的稳定性 和 H 控制 问题 , 利用基 于平方和 ( S O S ) 分解 的半定 规划算法 给出系 统 的时滞依赖的稳定性判据 , 设计平行分 配补偿 ( P D C) 多项式模糊控制器 , 从而使得闭环系统渐近稳定且 满足 H 噪声衰 减指标 , 所得结果可 由 M A T L A B S O S工具箱求解 , 并 给出算例说明所提出方法的有效性 。

高速模糊控制器翻译

高速模糊控制器翻译

高速模糊控制器罗门哈斯有限公司,京都,日本编号:123.995归档:Sep.21.1993摘要一个模糊控制器包括一个模糊推理机,规则库,隶属度函数和一个提取器。

规则和隶属度函数是由像EEPROM一样的可擦写内存所构成的。

他们分别为模糊推理机提供一个源规律存储功能和一个公用存储功能。

提取器提供一个输入和输出一致的信号源,并且源规律和公用功能存储器预先对规则数据和公用数据进行存储。

先前存储在规则库和公用功能存储器中的数据被来自提取器中的数据所取代。

关键词:模糊控制;存储器;提取器;EEPROMs要求要求如下:1. 一个模糊控制器在单一薄片半导体基体上形成,包括:一个基于来源于输入信号,存储在规则库和隶属度函数中的用于输出的模糊推理机信号;一个用于存储来自于模糊推理机源规则信号和输出的规则库,他是由一个可读的非挥发性的可擦写存储器构成;一个用来存储来自关于模糊推理机的公用信号和输出功能的隶属度函数他也是由一个可读的非挥发性的可擦写存储器构成;还有一个用来烧入来自规律存储器和隶属度函数的提取器,他是基于模糊推理机所产生的控制信号和模糊推理机的输入信号的。

可读的源规律信息和可读的公用功能信息会被分别的存储在规则库和隶属度函数当中。

其结构中的规则库和隶属度函数会被来自于提取器中的分别存储在各自存储器中的信息所复写。

2. 一个单片模糊控制器依照要求1, 在提取器中有一个用来存储大量的元规则和公用功能信息的存储地址,他们在模糊控制器的实际应用中都会被优先存储。

而存储在规则库和隶属度函数中的数据会在模糊控制器的应用过程中不断的从模糊推理机那得到反馈信号最终在传送到存储器中。

3. 依据要求一,一个单片模糊控制器中的规则库和隶属度函数中包含有电可消除和设计的只读存储器。

4. 模糊控制器包扩有:一个用来将预先的输入的信号进行模糊控制后进行控制信号输出的模糊推理机,一个源规则寄存器,一个公用功能寄存器,其中的输入信号,源规则信号和公用功能信号相对于模糊推理机都被作为独立的信号输入。

T-S模糊系统H∞跟踪控制器设计

T-S模糊系统H∞跟踪控制器设计
技 术 实现 松 弛 变量 的引入 , 从 而得 到保 守性 更低 的 日 跟踪控 制 器 的设 计 条件 .最后 我 们 通过仿 真 算例验 证 了所提 方 法 的有效 性.
关键 词 : T—S模 糊 系统 ; 积分 型模 糊 L y a p u n o v函数 ; H 跟 踪控 制 ; 线性 矩 阵不等 式
最 近几 年 , T—s模 糊控 制器 非线 性 系 统 正被 成 功应 用 ] .在 大 多数 应 用 中 , 模 糊 系 统 被 看作 是 非 线
性 系统 的通 用逼 近技 术 .正如 文献 所述 , T—S模糊 模型 对 于描述 非线性 系 统 的动态 是准确 的 .因此 , 模 糊技 术 也被 成功 的用 于研 究跟 踪控 制 问题 .
中图分类 号 : T P 2 7 3 . 4 文献 标志 码 : A 文 章编 号 : 1 6 7 3—0 5 6 9 ( 2 0 1 7 ) 0 1— 0 0 1 3— 0 6
0 引 言
稳 定 和跟踪 是 两类 典型 的控 制 问题 .一般 而 言 , 跟 踪要 比稳 定 更加 困难 , 特别 是 对 于非 线性 系 统.对
M d i 的 隶 属度 且满 足 ( ( ) ) ≥0 , ∑h i ( ( ) )= 1 .
那 么 根据上 述 的 阐述 , 系统 ( 1 )可 以重 新 写为 :
f ( £ )=A ( ) ( )+B ( ) “ ( )+ ( ^ ) ( )
t z ( )= C ( ) ( £ )+D( ) ∞( £ )
, 、

其 中, A( )= h ( ( ) ) A , A =A, B, C, D, E . 设 参考模 型 为 ( )=A r , ( )+r ( ) ( 3 )
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

TMS SOFTWAREParameter ControlsDEVELOPERS GUIDEDocumentation: Oct, 2010 Copyright © 2010 by bvba Web: Email : info@Table of contentsAvailability (3)Introduction (3)Overview of supported HTML tags (3)HTML related properties (6)HTML related events (8)The <A> anchor parameter tag (8)Runtime control of parameter editors (10)Common parameter control properties and methods (11)Using custom inplace editors (13)AvailabilityTMS Parameter controls are available for Delphi 5,6,7,2005,2006,2007,2009,2010,XE and C++Builder 5,6,2006,2007,2009,2010,XE. TMS Parameter controls can be used on Windows 2000, Windows XP, Windows Vista, Windows 7. The TMS Parameter controls use Windows XP or higher visual styles when used on Windows XP or higher with Windows XP or higher visual styles enabled.IntroductionTMS Parameter controls consist currently of 4 components: TParamLabel, TParamListBox, TParamCheckList and TParamTreeview. The parameter controls enable building various types of informative user entry screens such as the Outlook Inbox rules wizard, end-user SQL building tools and much more. The parameter controls layout is managed through HTML formatting. The HTML tag that handles parameter input is the <A> anchor tag. The <A> anchor tag and its options to control the parameter input are explained in detail in this document.Overview of supported HTML tags∙ B : Bold tag<B> : start bold text</B> : end bold textExample : This is a <B>test</B>∙U : Underline tag<U> : start underlined text</U> : end underlined textExample : This is a <U>test</U>∙I : Italic tag<I> : start italic text</I> : end italic textExample : This is a <I>test</I>∙S : Strikeout tag<S> : start strike-through text</S> : end strike-through textExample : This is a <S>test</S>∙ A : anchor tag<A href="value"> : text after tag can be a parameter. The 'value' after the href identifier is theparameter identifier which must be a unique value for the component. The anchor value can be found in the OnAnchorClick event</A> : end of anchorMore information and details on the anchor tag for parameter control is available in the next paragraphs.∙FONT : font specifier tag<FONT face='facevalue' size='sizevalue' color='colorvalue' bgcolor='colorvalue'> : specifies font of text after tag.with- face : name of the font- size : HTML style size if smaller than 5, otherwise pointsize of the font- color : font color with either hexidecimal color specification or Borland style color name, ie clRed,clYellow,clWhite ... etc- bgcolor : background color with either hexidecimal color specification or Borland style color name</FONT> : ends font settingExamples :This is a <FONT face="Arial" size="12" color="clRed">test</FONT>This is a <FONT face="Arial" size="12" color="#FF0000">test</FONT>∙P : paragraph<P align="alignvalue" [bgcolor="colorvalue"] [bgcolorto="colorvalue"]> : starts a new paragraph, with left, right or center alignment. The paragraph background color is set by the optional bgcolor parameter. If the bgcolorto attribute is used, a paragraph will have a gradient background from color ‘bgcolor’ to color ‘bgcolorto’</P> : end of paragraphExample : <P align="right">This is a test</P>Example : <P align="center">This is a test</P>Example : <P align="left" bgcolor="#ff0000">This has a red background</P>Example : <P align="right" bgcolor="clYellow">This has a yellow background</P>Example : <P align="right" bgcolor="clYellow" bgcolorto=”clred”>A gradient background</P>∙HR : horizontal line<HR> : inserts linebreak with horizontal line∙BR : linebreak<BR> : inserts a linebreak∙BODY : body color / background specifier<BODY bgcolor="colorvalue" background="imagefile specifier"> : sets the background color of the HTML text or the background bitmap fileExample :<BODY bgcolor="clYellow"> : sets background color to yellow<BODY background="file://c:\test.bmp"> : sets tiled background to file test.bmp∙IND : indent tagThis is not part of the standard HTML tags but can be used to easily create multicolumn text<IND x="indent"> : indents with "indent" pixelsExample :This will be <IND x="75">indented 75 pixels.∙IMG : image tag<IMG src="specifier:name" [align="specifier"] [width="width"] [height="height"][alt="specifier:name"] > : inserts an image at the locationspecifier can be :idx : name is the index of the image in the associated imagelistssys : name is the index of the small image in the system imagelist or a filename for which the corresponding system imagelist is searchedlsys : same as ssys, but for large system imagelist imagefile : name is the full filename specifierres : name of a resource bitmap (not visible at design time)Optionally, an alignment tag can be included. If no alignment is included, the text alignment with respect to the image is bottom. Other possibilities are : align="top" and align="middle"The width & height to render the image can be specified as well. If the image is embedded in anchor tags, a different image can be displayed when the mouse is in the image area through the Alt attribute.Examples :This is an image <IMG src="idx:1" align="top">This is an image <IMG src="ssys:1"> and another one <IMG src="ssys:worfile.doc">This is an image <IMG src="file://c:\my documents\test.bmp">This is an image <IMG src="res://BITMAP1">This is an image <IMG src="res://BITMAP1" width=”32” height=”32”>∙SUB : subscript tag<SUB> : start subscript text</SUB> : end subscript textExample : This is <SUP>9</SUP>/<SUB>16</SUB> looks like 9/16∙SUP : superscript tag<SUP> : start superscript text</SUP> : end superscript text∙UL : list tag<UL> : start unordered list tag</UL> : end unordered listExample :<UL><LI>List item 1<LI>List item 2<UL><LI> Sub list item A<LI> Sub list item B</UL><LI>List item 3</UL>∙LI : list item<LI> : new list item∙SHAD : text with shadow<SHAD> : start text with shadow</SHAD> : end text with shadow∙Z : hidden text<Z> : start hidden text</Z> : end hidden text∙HI : hilight<HI> : start text hilighting</HI> : stop text hilighting∙ E : Error marking<E> : start error marker</E> : stop error marker∙Special charactersFollowing standard HTML special characters are supported :&lt; : less than : <&gt; : greater than : >&amp; : &&quot; : "&nbsp; : non breaking space&trade; : trademark symbol&euro; : euro symbol&sect; : section symbol&copy; : copyright symbol&para; : paragraph symbolHTML related propertiesThe parameter controls share properties that further control the appearance and behaviour of the HTML formatted content. Following properties are available:EmptyParam: stringThis property sets the text to display for parameters that are empty, ie. Zero length strin gs. The default value is ‘?’Hover: boolean;When true, parameters are highlighted with the colors HoverColor and HoverFontColor when the mouse is over a parameter.HoverColor: TColor;Sets the background color for a parameter when the mouse is over it.HoverFontColor: TColor;Sets the text color for a parameter when the mouse is over it.LineSpacing: Integer;This property sets the default spacing (in pixels) between two lines of HTML formatted text.ParamHint: Boolean;When true, a hint is displayed (if ShowHint = true) when the mouse is over a parameter. The hint can be set dynamically through the event OnParamHint or can be set as attribute of the parameter. See parameter attributes.ParamColor: TColor;Sets the text color for parameters.ShadowColor: TColor;Sets the color of shadows for HTML formatted text that has a shadow through the <SHAD> tagShadowOffset: Integer;Sets the offset of the displayed shadow for text with the <SHAD> tag.HTML related eventsThe parameters that can be added inside controls cause following events when the mouse is over or clicked on the parameter. The events are:OnAnchorClick : triggered when a hyperlink is clicked on a parameterOnAnchorEnter : triggered when the mouse enters a parameterOnAnchorExit : triggered when the mouse leaves a parameterExample:A hyperlink is added with‘This is a <a href=”my param”>paramvalue<a>’;When the mouse clicked on the parameter, the OnAnchorClick is called with a reference to the parameter identifier ‘myparam’ and the parameter value ‘paramvalue’The <A> anchor parameter tagThe structure of the <A> anchor parameter tag is:<A href=”paramid” class=”paramtype” props=”paramprops” hint=”paramhint”>paramvalue</a> with:paramid: a unique parameter identifier. Through this identifier the value of the parameter can be retrieved or set.paramtype: defines the type of inplace editor that is used to edit the parameter value. The paramtype can be:LIST : a listbox is used, the PROPS attribute specifies the listbox elementsMENU : a popup menu is used, the PROPS attribute specifies the popup menu itemsEDIT : a simple inplace editor is usedSPIN : an inplace spin editor is usedDATE : an inplace date picker is used.TIME : an inplace time selector is usedMASK : an inplace mask editor is used, the mask value is set in the PROPS attributeQUERY : an input query dialog can be usedDIR : a directory picker is usedCUSTOM : a custom inplace editor is usedTOGGLE : toggles between two values in the PROPS attributeIf paramtype is empty or not defined, the <A> tag behaves like a normal hyperlink. paramprops: sets the properties (when used) for the inplace editor, this is in particular a list of options for popup list editor and popup menu editor. The values in the PROPS attribute areseparated by the | character. The paramprops attribute is only used for LIST, MENU and MASK edit types.paramhint: sets the hint to display when the mouse is over the parameter. This attribute is optional.Examples:A normal edit parameter:<A href="edit" class="EDIT">10</A>A mask parameter:<A href="mask" class="MASK" props="9999">1234</A>A menu parameter:<A href="menu" class="MENU" props="Menu item 1|Menu item 2|Menu item 3|Menu item 4">?</A> Note that the HTML formatted control text and parameters can be set at design time with special property editors that facilitate the construction of the required HTML.Runtime control of parameter editorsWith the events OnParamList and OnParamPopup, the list of values to select from either through a popup listbox or a popup menu can be set dynamically at runtime.OnParamList:This event returns the href and value of the parameter clicked and allows setting of the values that will appear in the dropdown listbox. If the doPopup parameter is returned true, the dropdown list will appear. The values of the list can be set through the stringlist Values parameter.Example:doPopup := (href = 'tool');values.Add('Delphi');values.Add('C++Builder');values.Add('JBuilder');OnParamPopup :This event is similar to the OnParamList except that it controls the popup menu for parameter selection. This event returns the href and value of the parameter clicked and allows setting of the values that will appear in the popup menu. If the doPopup parameter is returned true, the popup menu will appear. The values of the popup menu can be set through the stringlist Values parameter.Example:doPopup := (href='tool') or (href='os');if (href = 'tool') thenbeginvalues.Add('Delphi');values.Add('C++Builder');values.Add('JBuilder');end;if (href = 'os') thenbeginvalues.Add('Windows');values.Add('Linux');values.Add('Solaris');end;With the event OnParamClick, either parameters can be edited or for regular hyperlinks, a browser can be opened or another action executed. The event returns the href and value of the parameter clicked. The value can be changed in code.Example 1: (this toggles the value between Delphi & C++Builder)If the control contains the text:Select your tool : <A href="tool">Delphi</A> and OS : <A href="os">Windows</A>if (href = 'tool') and (value = 'Delphi') thenvalue := 'C++Builder'elsevalue := 'Delphi';Example 2: (this asks the user for the value)if (href = 'os') thenInputQuery('Operating system','Name',value);Common parameter control properties and methodsPropertiesControl.Parameter[href:string]: string;Property through which parameter values can be set and retrieved. Note that href is the unique parameter identifier in the control.Example:Select your tool : <A href="tool">Delphi</A> and OS : <A href="os">Windows</A>The parameter values can here be obtained through :varos,tool: string;tool := control.Parameter['tool'];os := control.Parameter['os'];The parameter values can be set through :control.Parameter['tool'] := 'Kylix';control.Parameter['os'] := 'Linux';Control.ParamRefCount: Integer;Returns the number of parameters in the controlControl.ParamRefs[idx: Integer]: string;Returns the parameter identifier for the parameter idx in the controlControl.ParamIndex[href: Integer]: Integer;Returns the index of the parameter with href identifier in the controlControl.ParamRect[href: Integer]: TRect;Returns the rectangle where the parameter with href identifier is located in the controlControl.FocusParam: Integer;Gets or sets the focus on the parameter at FocusParam index in the controlControl.ParamItemRefCount[Item: Integer]: Integer;Only available in TParamListBox and TParamCheckList. Returns the number of parameters at a given item.Control.ParamItemRefs[Item,Index: Integer]: string;Only available in TParamListBox and TParamCheckList. Returns the parameter identifier for the parameter idx in the item Item in the controlControl.ParamItemIndex[Index: Integer; href:string]: Integer;Only available in TParamListBox and TParamCheckList. Returns the index of the parameter with href identifier in the item Index in the controlControl.ItemParameter[index: Integer; href: string]: string;Only available in TParamListBox and TParamCheckList. Property through which parameter values can be set and retrieved for item Index in the listControl.ParamRefNode[href]: TTreeNode;Only available in TParamTreeview. Returns the node where the parameter with identifier href is located.Control.ParamNodeRefCount[Item: Integer]: Integer;Only available in TParamTreeview. Returns the number of parameters at Node with index Item. Control.ParamNodeRefs[Item, Index: Integer]: string;Only available in TParamTreeview. Returns the parameter identifier for the parameter Index in the Node Item in the controlControl.ParamNodeIndex[Node: TTreeNode; href: string]: Integer;Only available in TParamTreeview. Returns the index of the parameter with href identifier in the node Node in the controlMethodsprocedure EditParam(href: string);Starts inplace editing of parameter with identifier hreffunction GetParamInfo(href: string; var AValue,AClass,AProp,AHint: string): Boolean;If the parameter identifier href is found, it returns the parameter value and attributesUsing custom inplace editorsUsing custom inplace editors is possible with the Parameter controls but require some preparing of the inplace editor to be used correct. The custom inplace editor is invoked with th e style ‘CUSTOM’, ie:<A href=”mycustomcontrol” class=”CUSTOM” props=”myprops”>?</A>Parameter control eventsWhen the custom inplace editor is about to be edited, the event OnParamCustomEdit is triggered with parameters:For TParamLabel:TParamCustomEditEvent = procedure(Sender: TObject; href, value, props: string; EditRect: TRect) of object;For TParamListBox and TParamCheckList:TParamCustomEditEvent = procedure(Sender: TObject; idx: Integer; href, value, props: string; EditRect: TRect) of object;For TParamTreeView:TParamCustomEditEvent = procedure(Sender: TObject; Node: TTreeNode; href, value, props: string; EditRect: TRect) of object;The href parameter is the unique ID of the parameter in the control. The value parameter contains the current value of the parameter, the props parameter the value of the PROPS attribute. Last parameter is the rectangle where the inplace editor should be positioned. For the TParamListBox and TParamCheckList, an additional idx parameter refers to the item in the list where the parameter is located, for the TParamTreeView, the Node parameter refers to the node where the parameter is located.From this event, following code can be used to show the custom inplace edit control: mycustomcontrol.Parent := Sender;mycustomcontrol.left := EditRect.Left;mycustomcontrol.Top := EditRect.Top;mycustomcontrol.Text := value;mycustomcontrol.Param := href;mycustomcontrol.OnUpdate := (Sender as TParamlabel).ControlUpdate; mycustomcontrol.Visible := true;mycustomcontrol.SetFocus;The ControlUpdate procedure is defined in the parameter component and will set the new parameter value when the editing is done. ControlUpdate is defined as:procedure ControlUpdate(Sender: TObject; Param,Text:string);with Param the unique parameter identifier and Text the parameter value to set.Preparing the inplace edit controlCreate a descendent component of the inplace edit control with following properties and events: TParamUpdateEvent = procedure(Sender: TObject; Param, Text: string) of object;TMyCustomControl = class(TMyControl)privateFParam: string;FOnUpdate: TParamUpdateEvent;procedure WMActivate(var Message: TWMActivate); message WM_ACTIVATE; protectedprocedure DoExit; override;procedure CreateParams(var Params: TCreateParams); override;publicproperty Param: string read FParam write FParam;property OnUpdate: TParamUpdateEvent read FOnUpdate write FOnUpdate; end;The implementation for this descendent control is then:{ TMyCustomControl }procedure TMyCustomControl.CreateParams(var Params: TCreateParams);begininherited;with Params doStyle := Style AND NOT WS_CHILD OR WS_POPUP;end;procedure TMyCustomControl.DoExit;begininherited;if Assigned(OnUpdate) thenOnUpdate(Self,Param,Text);end;procedure TMyCustomControl.WMActivate(var Message: TWMActivate);begininherited;if Message.Active = 0 thenHide;end;Using the custom inplace editor can be done by putting an component on the form where the parameter control is used and set its visible property to False. The inplace editor will then be displayed when the OnParamCustomEdit event is triggered.。

相关文档
最新文档