西门子上位机WINCC怎样与外部变量进行连接
时间:2023-03-19来源:佚名
创建新连接外部变量只能在与自动化系统连接的基础上创建。如果还没有需要的连接,必须首先创建该连接。先决条件必须安装所需要的通讯处理器和相关的硬件驱动程序。还必须安装期望的通讯驱动程序,例如“SIMATIC S7 Protocol Suite”步骤 步骤 1 扩展“变量管理”中通讯驱动程序的视图。 2 选择期望的通道单元,例如“PROFIBUS”。 3 在用于通道单元的弹出式菜单中,选择“新建驱动程序连接...”。 4 在“常规”标签卡的“名称”域中,输入在项目范围内唯一的用于连接的名称。 5 单击“属性”按钮,打开“连接参数”对话框。设置该连接所需的参数。有关详细信息,请参考各相应通道的帮助文档。 6 通过单击“确定”,关闭所有的对话框。 组态外部变量创建变量的过程对于所有数据类型基本相似。然而,对某些数据类型进行特殊设置。(步骤5 - 7)。先决条件必须安装所需要的通讯处理器和硬件驱动程序。还必须安装期望的通讯驱动程序,例如“SIMATIC S7 Protocol Suite”。为了使用通道单元,必须建立连接(例如“PROFIBUS”)。步骤 步骤 1 从所期望的连接的弹出式菜单中选择“新建变量”。“变量属性”对话框将打开。 2 在“常规”标签卡上,“名称”域中,输入在WinCC项目范围内唯一的变量名,例如“WinCCTag_01”。 3 设置变量的“数据类型”,例如 “浮点数64位IEEE 754”,在相关域中。 4 单击“选择”打开“变量属性”对话框,在AS中设置变量的地址区域。 在二进制或8位变量的情况下,如果通道不支持按位/字节访问,在“变量属性”对话框前会显示“位/字节变量”对话框。 要获得更多信息,请参考“BinWrite机制”。单击“确定”按钮,关闭“位/字节变量”或“变量属性”对话框。 5 在数字变量的情况下,WinCC会在“类型转换”域中显示建议的类型转换。 按照不同需要,选择合适的的类型转换。转换以“X到Y”的次序显示,(www.dqjsw.com.cn)X是WinCC格式、Y是AS格式,例如“DoubleToDouble”。 6 单击“线性标定”复选框使数字标签线性标定。输入“过程值范围”(在AS中)以及“变量数值范围”(在WinCC中)的上限和下限。 7 当使用文本变量工作,将激活“长度”域。在这种情况下,以字符形式输入文本变量的长度。 8 单击“确定”关闭所有对话框。 WinCC数据类型排序的类型转换当组态外部变量,必须对所有数字型数据类型执行类型转换。WinCC这方面的数据格式决定了数据类型。类型转换定义如何从WinCC格式转换到AS格式。该定义适用于双向传送。从列表中选择期望的WinCC数据类型。下表列出所支持的类型转换和数值范围。WinCC数据类型窗体顶部 类型转换“无符号8位数” 数值范围 ByteToUnsignedByte 0...255 (无转换) ByteToUnsignedWord 0...255 ByteToUnsignedDword 0...255 ByteToSignedByte 0...127 ByteToSignedWord 0...255 ByteToSignedDword 0...255 ByteToBCDByte 0...99 ByteToBCDWord 0...255 ByteToBCDDword 0...255 ByteToAikenByte 0...99 ByteToAikenWord 0...255 ByteToAikenDword 0...255 ByteToExcessByte 0...99 ByteToExcessWord 0...255 ByteToExcessDword 0...255 “有符号8位数”类型转换 数值范围 CharToUnsignedByte 0...127 CharToUnsignedWord 0...127 CharToUnsignedDword 0...127 CharToSignedByte -128... 127 (无转换) CharToSignedWord -128... 127 CharToSignedDword -128... 127 CharToMSBByte -128... 127 CharToMSBWord -128... 127 CharToMSBDword -128... 127 CharToBCDByte 0...99 CharToBCDWord 0...127 CharToBCDDword 0...127 CharToSignedBCDByte -9... 9 CharToSignedBCDWord -128... 127 CharToSignedBCDDword -128... 127 CharToExtSignedBCDByte -79... 79 CharToExtSignedBCDWord -128... 127 CharToExtSignedBCDDword -128... 127 CharToAikenByte 0...99 CharToAikenWord 0...127 CharToAikenDword 0...127 CharToSignedAikenByte -9... 9 CharToSignedAikenWord -128... 127 CharToSignedAikenDword -128... 127 CharToExcessByte 0...99 CharToExcessWord 0...127 CharToExcessDword 0...127 CharToSignedExcessByte -9... 9 CharToSignedExcessWord -128... 127 CharToSignedExcessDword -128... 127 “浮点数64位IEEE 754”类型转换 数值范围 DoubleToDouble -1.79769313486231e 308 (无转换) DoubleToUnsignedByte 0...255 DoubleToUnsignedWord 0...65535 DoubleToUnsignedDword 0...4294967295 DoubleToSignedByte -128... 127 DoubleToSignedWord -32768... 32767 DoubleToSignedDword -2147483647... 2147483647 DoubleToFloat -3.402823e 38 DoubleToMSBByte -127... 127 DoubleToMSBWord -32767... 32767 DoubleToMSBDword -2147483647... 2147483647 DoubleToBCDByte 0...99 DoubleToBCDWord 0...9999 DoubleToBCDDword 0...99999999 DoubleToSignedBCDByte -9... 9 DoubleToSignedBCDWord -999... 999 DoubleToSignedBCDDword -9999999... 9999999 DoubleToExtSignedBCDByte -79... 79 DoubleToExtSignedBCDWord -7999... 7999 DoubleToExtSignedBCDDword -79999999... 79999999 DoubleToAikenByte 0...99 DoubleToAikenWord 0...9999 DoubleToAikenDword 0...99999999 DoubleToSignedAikenByte -9... 9 DoubleToSignedAikenWord -999... 999 DoubleToSignedAikenDword -9999999... 9999999 DoubleToExcessByte 0...99 DoubleToExcessWord 0...9999 DoubleToExcessDword 0...99999999 DoubleToSignedExcessByte -9... 9 DoubleToSignedExcessWord -999... 999 DoubleToSignedExcessDword -9999999... 9999999 DoubleToS5Timer 10...9990000 DoubleToS5Float -1.701411e 38 “无符号32位数”类型转换 数值范围 DwordToUnsignedDword 0...4294967295 (无转换) DwordToUnsignedByte 0...255 DwordToUnsignedWord 0...65535 DwordToSignedByte 0...127 DwordToSignedWord 0...32767 DwordToSignedDword 0...2147483647 DwordToBCDByte 0...99 DwordToBCDWord 0...9999 DwordToBCDDword 0...99999999 DwordToAikenByte 0...99 DwordToAikenWord 0...9999 DwordToAikenDword 0...99999999 DwordToExcessByte 0...99 DwordToExcessWord 0...9999 DwordToExcessDword 0...99999999 DwordToSimaticTimer 10...9990000 DwordToSimaticBCDTimer 10...9990000 “浮点数32位IEEE 754”类型转换 数值范围 FloatToFloat -3.402823e 38 (无转换) FloatToUnsignedByte 0...255 FloatToUnsignedWord 0...65535 FloatToUnsignedDword 0...4.294967e 09 FloatToSignedByte -128... 127 FloatToSignedWord -32768... 32767 FloatToSignedDword -2.147483e 09... 2.147483e 09 FloatToDouble -3.402823e 38 FloatToMSBByte -127... 127 FloatToMSBWord -32767... 32767 FloatToMSBDword -2.147483e 09... 2.147483e 09 FloatToBCDByte 0...99 FloatToBCDWord 0...9999 FloatToBCDDword 0...9.999999e 07 FloatToSignedBCDByte -9... 9 FloatToSignedBCDWord -999... 999 FloatToSignedBCDDword -9999999... 9999999 FloatToExtSignedBCDByte -79... 79 FloatToExtSignedBCDWord -7999... 7999 FloatToExtSignedBCDDword -7.999999e 07... 7.999999e 07 FloatToAikenByte 0...99 FloatToAikenWord 0...9999 FloatToAikenDword 0...9.999999e 07 FloatToSignedAikenByte -9... 9 FloatToSignedAikenWord -999... 999 FloatToSignedAikenDword -9999999... 9999999 FloatToExcessByte 0...99 FloatToExcessWord 0...9999 FloatToExcessDword 0...9.999999e 07 FloatToSignedExcessByte -9... 9 FloatToSignedExcessWord -999... 999 FloatToSignedExcessDword -9999999... 9999999 FloatToS5Timer 10...9990000 FloatToS5Float -1.701411e 38 “有符号32位数”类型转换 数值范围 LongToSignedDword -2147483647... 2147483647 (无转换) LongToUnsignedByte 0...255 LongToUnsignedWord 0...65535 LongToUnsignedDword 0...2147483647 LongToSignedByte -128... 127 LongToSignedWord -32768... 32767 LongToMSBByte -127... 127#p#分页标题#e# LongToMSBWord -32767... 32767 LongToMSBDword -2147483647... 2147483647 LongToBCDByte 0...99 LongToBCDWord 0...9999 LongToBCDDword 0...99999999 LongToSignedBCDByte -9... 9 LongToSignedBCDWord -999... 999 LongToSignedBCDDword -9999999... 9999999 LongToExtSignedBCDByte -79.. 79 LongToExtSignedBCDWord -7999... 7999 LongToExtSignedBCDDword -79999999... 79999999 LongToAikenByte 0...99 LongToAikenWord 0...9999 LongToAikenDword 0...99999999 LongToSignedAikenByte -9... 9 LongToSignedAikenWord -999... 999 LongToSignedAikenDword -9999999... 9999999 LongToExcessByte 0...99 LongToExcessWord 0...9999 LongToExcessDword 0...99999999 LongToSignedExcessByte -9... 9 LongToSignedExcessWord -999... 999 LongToSignedExcessDword -9999999... 9999999 LongToSimaticTimer 10...9990000 LongToSimaticBCDTimer 10...9990000 “有符号16位数”类型转换 数值范围 ShortToUnsignedByte 0...255 ShortToUnsignedWord 0...32767 ShortToUnsignedDword 0...32767 ShortToSignedByte -128... 127 ShortToSignedWord -32768... 32767 (无转换) ShortToSignedDword -32768... 32767 ShortToMSBByte -127... 127 ShortToMSBWord -32767... 32767 ShortToMSBDword -32768... 32767 ShortToBCDByte 0...99 ShortToBCDWord 0...9999 ShortToBCDDword 0...32767 ShortToSignedBCDByte -9... 9 ShortToSignedBCDWord -999... 999 ShortToSignedBCDDword -32768... 32767 ShortToExtSignedBCDByte -79... 79 ShortToExtSignedBCDWord -7999... 7999 ShortToExtSignedBCDDword -32768... 32767 ShortToAikenByte 0...99 ShortToAikenWord 0...9999 ShortToAikenDword 0...32767 ShortToSignedAikenByte -9... 9 ShortToSignedAikenWord -999... 999 ShortToSignedAikenDword -32768... 32767 ShortToExcessByte 0...99 ShortToExcessWord 0...9999 ShortToExcessDword 0...32767 ShortToSignedExcessByte -9... 9 ShortToSignedExcessWord -999... 999 ShortToSignedExcessDword -32768... 32767 “无符号16位数”类型转换 数值范围 WordToUnsignedWord 0...65535 (无转换) WordToUnsignedByte 0...255 WordToUnsignedDword 0...65535 WordToSignedByte 0...127 WordToSignedWord 0...32767 WordToSignedDword 0...65535 WordToBCDByte 0...99 WordToBCDWord 0...9999 WordToBCDDword 0...65535 WordToAikenByte 0...99 WordToAikenWord 0...9999 WordToAikenDword 0...65535 WordToExcessByte 0...99 WordToExcessWord 0...9999 WordToExcessDword 0...65535 WordToSimaticCounter 0...999 WordToSimaticBCDCounter 0...999 按AS数据类型排序的类型转换引言在组态外部变量时,必须对所有数字型数据类型执行类型转换。WinCC这方面的数据格式决定了数据类型。类型转换定义如何从WinCC格式转换到AS格式。该定义适用于双向传送。从列表中选择期望的AS数据类型。下表列出所支持的类型转换和数值范围。AS数据类型窗体顶部 所有 AikenByte AikenDword AikenWord BCDByte BCDDword BCDWord Double ExcessByte ExcessDword ExcessWord ExtSignedBCDByte ExtSignedBCDDword ExtSignedBCDWord Float MSBByte MSBDword MSBWord S5Float S5Timer SignedAikenByte SignedAikenDword SignedAikenWord SignedBCDByte SignedBCDDword SignedBCDWord SignedByte SignedDword SignedExcessByte SignedExcessDword SignedExcessWord SignedWord SimaticBCDCounter SimaticBCDTimer SimaticCounter SimaticTimer UnsignedByte UnsignedDword UnsignedWord窗体底部数据类型和数值范围 “无符号字节”类型转换 数值范围 ByteToUnsignedByte 0...255 (无转换) CharToUnsignedByte 0...127 DoubleToUnsignedByte 0...255 DwordToUnsignedByte 0...255 FloatToUnsignedByte 0...255 LongToUnsignedByte 0...255 ShortToUnsignedByte 0...255 WordToUnsignedByte 0...255 “无符号字”类型转换 数值范围 ByteToUnsignedWord 0...255 CharToUnsignedWord 0...127 DoubleToUnsignedWord 0...65535 DwordToUnsignedWord 0...65535 FloatToUnsignedWord 0...65535 LongToUnsignedWord 0...65535 ShortToUnsignedWord 0...32767 WordToUnsignedWord 0...65535 (无转换) “无符号双字”类型转换 数值范围 ByteToUnsignedDword 0...255 CharToUnsignedDword 0...127 DoubleToUnsignedDword 0...4294967295 DwordToUnsignedDword 0...4294967295 (无转换) FloatToUnsignedDword 0...4.294967e 09 LongToUnsignedDword 0...2147483647 ShortToUnsignedDword 0...32767 WordToUnsignedDword 0...65535 “有符号字节”类型转换 数值范围 ByteToSignedByte 0...127 CharToSignedByte -128... 127 (无转换) DoubleToSignedByte -128... 127 DwordToSignedByte 0...127 FloatToSignedByte -128... 127 LongToSignedByte -128... 127 ShortToSignedByte -128... 127 WordToSignedByte 0...127 “有符号字”类型转换 数值范围 ByteToSignedWord 0...255 CharToSignedWord -128... 127 DoubleToSignedWord -32768... 32767 DwordToSignedWord 0...32767 FloatToSignedWord -32768... 32767 LongToSignedWord -32768... 32767 ShortToSignedWord -32768... 32767 (无转换) WordToSignedWord 0...32767 “有符号双字”类型转换 数值范围 ByteToSignedDword 0...255 CharToSignedDword -128... 127 DoubleToSignedDword -2147483647... 2147483647 DwordToSignedDword 0...2147483647 FloatToSignedDword -2.147483e 09... 2.147483e 09 LongToSignedDword -2147483647... 2147483647 (无转换) ShortToSignedDword -32768... 32767 WordToSignedDword 0...65535 “MSBByte”类型转换 数值范围 CharToMSBByte -128... 127 DoubleToMSBByte -127... 127 FloatToMSBByte -127... 127 LongToMSBByte -127... 127 ShortToMSBByte -127... 127 “MSBWord”类型转换 数值范围 CharToMSBWord -128... 127 DoubleToMSBWord -32767... 32767 FloatToMSBWord -32767... 32767 LongToMSBWord -32767... 32767 ShortToMSBWord -32767... 32767 “MSBDWord”类型转换 数值范围 CharToMSBDword -128... 127 DoubleToMSBDword -2147483647... 2147483647 FloatToMSBDword -2.147483e 09... 2.147483e 09 LongToMSBDword -2147483647... 2147483647 ShortToMSBDword -32768... 32767 “BCDByte”类型转换 数值范围 ByteToBCDByte 0...99 CharToBCDByte 0...99 DoubleToBCDByte 0...99 DwordToBCDByte 0...99 FloatToBCDByte 0...99 LongToBCDByte 0...99 ShortToBCDByte 0...99 WordToBCDByte 0...99 “BCDWord”类型转换 数值范围 ByteToBCDWord 0...255 CharToBCDWord 0...127 DoubleToBCDWord 0...9999 DwordToBCDWord 0...9999 FloatToBCDWord 0...9999 LongToBCDWord 0...9999 ShortToBCDWord 0...9999 WordToBCDWord 0...9999 “BCDDWord”类型转换 数值范围 ByteToBCDDword 0...255 CharToBCDDword 0...127 DoubleToBCDDword 0...99999999 DwordToBCDDword 0...99999999 FloatToBCDDword 0...9.999999e 07 LongToBCDDword 0...99999999 ShortToBCDDword 0...32767 WordToBCDDword 0...65535 “SignedBCDByte”类型转换 数值范围 CharToSignedBCDByte -9... 9 DoubleToSignedBCDByte -9... 9 FloatToSignedBCDByte -9... 9 LongToSignedBCDByte -9... 9 ShortToSignedBCDByte -9... 9 “SignedBCDWord”类型转换 数值范围 CharToSignedBCDWord -128... 127 DoubleToSignedBCDWord -999... 999 FloatToSignedBCDWord -999... 999 LongToSignedBCDWord -999... 999 ShortToSignedBCDWord -999... 999 “SignedBCDDWord”类型转换 数值范围 CharToSignedBCDDword -128... 127 DoubleToSignedBCDDword -9999999... 9999999 FloatToSignedBCDDword -9999999... 9999999 LongToSignedBCDDword -9999999... 9999999 ShortToSignedBCDDword -32768... 32767#p#分页标题#e# “ExtSignedBCDByte”类型转换 数值范围 CharToExtSignedBCDByte -79... 79 DoubleToExtSignedBCDByte -79... 79 FloatToExtSignedBCDByte -79... 79 LongToExtSignedBCDByte -79.. 79 ShortToExtSignedBCDByte -79... 79 “ExtSignedBCDWord”类型转换 数值范围 CharToExtSignedBCDWord -128... 127 DoubleToExtSignedBCDWord -7999... 7999 FloatToExtSignedBCDWord -7999... 7999 LongToExtSignedBCDWord -7999... 7999 ShortToExtSignedBCDWord -7999... 7999 “ExtSignedBCDDWord”类型转换 数值范围 CharToExtSignedBCDDword -128... 127 DoubleToExtSignedBCDDword -79999999... 79999999 FloatToExtSignedBCDDword -7.999999e 07... 7.999999e 07 LongToExtSignedBCDDword -79999999... 79999999 ShortToExtSignedBCDDword -32768... 32767 “AikenByte”类型转换 数值范围 ByteToAikenByte 0...99 CharToAikenByte 0...99 DoubleToAikenByte 0...99 DwordToAikenByte 0...99 FloatToAikenByte 0...99 LongToAikenByte 0...99 ShortToAikenByte 0...99 WordToAikenByte 0...99 AikenWord" 数值范围 ByteToAikenWord 0...255 CharToAikenWord 0...127 DoubleToAikenWord 0...9999 DwordToAikenWord 0...9999 FloatToAikenWord 0...9999 LongToAikenWord 0...9999 ShortToAikenWord 0...9999 WordToAikenWord 0...9999 “AikenDWord”类型转换 数值范围 ByteToAikenDword 0...255 CharToAikenDword 0...127 DoubleToAikenDword 0...99999999 DwordToAikenDword 0...99999999 FloatToAikenDword 0...9.999999e 07 LongToAikenDword 0...99999999 ShortToAikenDword 0...32767 WordToAikenDword 0...65535 “SignedAikenByte”类型转换 数值范围 CharToSignedAikenByte -9... 9 DoubleToSignedAikenByte -9... 9 FloatToSignedAikenByte -9... 9 LongToSignedAikenByte -9... 9 ShortToSignedAikenByte -9... 9 “SignedAikenWord”类型转换 数值范围 CharToSignedAikenWord -128... 127 DoubleToSignedAikenWord -999... 999 FloatToSignedAikenWord -999... 999 LongToSignedAikenWord -999... 999 ShortToSignedAikenWord -999... 999 “SignedAikenDWord”类型转换 数值范围 CharToSignedAikenDword -128... 127 DoubleToSignedAikenDword -9999999... 9999999 FloatToSignedAikenDword -9999999... 9999999 LongToSignedAikenDword -9999999... 9999999 ShortToSignedAikenDword -32768... 32767 “ExcessByte”类型转换 数值范围 ByteToExcessByte 0...99 CharToExcessByte 0...99 DoubleToExcessByte 0...99 DwordToExcessByte 0...99 FloatToExcessByte 0...99 LongToExcessByte 0...99 ShortToExcessByte 0...99 WordToExcessByte 0...99 “ExcessWord”类型转换 数值范围 ByteToExcessWord 0...255 CharToExcessWord 0...127 DoubleToExcessWord 0...9999 DwordToExcessWord 0...9999 FloatToExcessWord 0...9999 LongToExcessWord 0...9999 ShortToExcessWord 0...9999 WordToExcessWord 0...9999 “ExcessDWord”类型转换 数值范围 ByteToExcessDword 0...255 CharToExcessDword 0...127 DoubleToExcessDword 0...99999999 DwordToExcessDword 0...99999999 FloatToExcessDword 0...9.999999e 07 LongToExcessDword 0...99999999 ShortToExcessDword 0...32767 WordToExcessDword 0...65535 “SignedExcessByte”类型转换 数值范围 CharToSignedExcessByte -9... 9 DoubleToSignedExcessByte -9... 9 FloatToSignedExcessByte -9... 9 LongToSignedExcessByte -9... 9 ShortToSignedExcessByte -9... 9 “SignedExcessWord”类型转换 数值范围 CharToSignedExcessWord -128... 127 DoubleToSignedExcessWord -999... 999 FloatToSignedExcessWord -999... 999 LongToSignedExcessWord -999... 999 ShortToSignedExcessWord -999... 999 “SignedExcessDWord”类型转换 数值范围 CharToSignedExcessDword -128... 127 DoubleToSignedExcessDword -9999999... 9999999 FloatToSignedExcessDword -9999999... 9999999 LongToSignedExcessDword -9999999... 9999999 ShortToSignedExcessDword -32768... 32767 “SimaticCounter”类型转换 数值范围 WordToSimaticCounter 0...999 “SimaticBCDCounter”类型转换 数值范围 WordToSimaticBCDCounter 0...999 “SimaticTimer”类型转换 数值范围 DwordToSimaticTimer 10...9990000 LongToSimaticTimer 10...9990000 “S5Float”类型转换 数值范围 DoubleToS5Float -1.701411e 38 FloatToS5Float -1.701411e 38 “S5Timer”类型转换 数值范围 DoubleToS5Timer 10...9990000 FloatToS5Timer 10...9990000 “SimaticBCDTimer”类型转换 数值范围 DwordToSimaticBCDTimer 10...9990000 LongToSimaticBCDTimer 10...9990000 “Double”类型转换 数值范围 DoubleToDouble -1.79769313486231e 308 (无转换) FloatToDouble -3.402823e 38 “Float”类型转换 数值范围 DoubleToFloat -3.402823e 38 FloatToFloat -3.402823e 38 (无转换) BinWrite机制引言在WinCC中,一些通讯驱动程序及其通道单元不支持直接按位或字节访问(位/字节访问)已连接的自动化系统中的地址区域。于是,他们使用BinWrite机制。位/字节访问用位/字节访问通讯驱动程序的通道单元可直接读写期望的位或字节。在以下说明中,位x的数值通过直接位/字节访问设置为1。BinWrite机制下列通讯驱动程序不支持位/字节访问,使用BinWrite机制代替通道单元:Modbus SerialSIMATIC S5 ETHERNET LAYER 4SIMATIC S5 Programmers Port AS511SIMATIC S5 Serial 3964RSIMATIC TI Ethernet Layer 4SIMATIC TI Serial为了写位或字节,通道单元使用BinWrite机制首先读取整个数据字。已编址的位或字节在已读取的字中改变。然后,整个字(!)而不只是修改过的位或字节会被写回内存。在以下说明中,位x的数值通过使用BinWrite机制设置为1。 注意如果AS中的字在WinCC使用BinWrite机制读取过后,进行了修改(参见说明中的“问题案例”),则当WinCC把字写回内存时,会覆盖由AS改变的数据。用BinWrite组态变量如果想为不支持位/字节访问的通讯驱动程序通道单元组态“二进制变量”,必须使用对话框激活并且组态BinWrite机制,否则不可用。先决条件必须安装所需要的通讯处理器和硬件驱动程序。必须安装不支持位/字节访问的期望的通讯驱动程序,例如 “SIMATIC S5 Ethernet Layer 4”。必须使用其中一个通道单元建立连接。步骤 步骤 1 为需要的连接打开弹出式菜单,创建新变量然后选择“新建变量...”。 “创建新变量”对话框将打开。 2 在“常规”标签卡上,“名称”域中,输入在项目范围内唯一的变量名称。为数据类型选择“二进制变量”、“无符号8位数”或“有符号8位数”。 3 单击“选择”按钮,打开“位/字节变量”对话框。(在用位/字节访问通道的情况下,该按钮用来访问为AS中的地址区域所做的设置。) 4 单击“访问位”或“访问字节”复选框并且保留设置。在对话框中查到的内容与步骤2中所选的数据类型有关。 5 单击“确定”关闭对话框。 注意:如果忘记为新的“二进制变量”或8位变量激活BinWrite机制,该对话框仍会打开。如果企图单击“确定”立刻关闭“创建新变量”对话框,则会显示“地址参数无效”的错误消息。通过“是”进行确认。这将打开“位/字节变量”对话框,在此用户可进行所需要的设置。 |