SetUnit 方法(TrendPro 对象)

设置轨迹的单位,并在图例中显示单位。
语法
TrendPro1
.
SetUnit
(
单位
,
tagName
, [
modelName
], [
traceType
])
其中
TrendPro1
- 是 TrendPro 对象的名称,或是一个对 TrendPro 对象求值的表达式。
unit
- 是字符串型参数,指定轨迹的单位。单位将显示在趋势的 y 轴中以及“标签”列表的
单位
字段中。还可以为单位使用扩展标签属性或标签值。
tagName
- 为字符串型参数,指定跟踪轨迹名称。
modelName
- 为字符串型可选参数,指定历史模型名称。如果
traceType
TraceTypeAF
TraceTypeDataLog
TraceTypeHistorian
TraceTypePIServer
,则需要此参数。
traceType
- 是
TrendTraceType
常量的可选参数。如果跟踪轨迹类型为实时数据或数据记录,则可忽略该参数。
示例
Private Sub SetTrendProUnit() 'Sets the unit for Tag1 from Live Data. TrendPro1.SetUnit "unit_tag", "Tag1" 'Sets the unit for system\Second from the data log Datalog1. TrendPro1.SetUnit "unit_datalog", "system\Second", "Datalog1" End Sub
提供反馈
对本文档有问题或反馈吗? 请在这里提交您的反馈
Normal