-
-
瑞雪照丰年 发表于 2007/3/4 20:16:32
9. 现在来创建与XIC等同的结构文本,它是用来控制输出‘start’的一个按 钮。在结构文本编辑器中右击,在空白处会弹出一个菜单,选择浏览和创建标签这一选项。152楼 回复本楼
在结构文本中可选的句法结构有If/Then,Case,和Repeat/Until,用Help功能来获取更多的信息。本实验中,我们将用If/Then的句法结构。
引用 瑞雪照丰年 2007/3/4 20:16:32 发表于152楼的内容
-
-
瑞雪照丰年 发表于 2007/3/4 20:17:23
10. 如下所示键入字“If”,然后用Browse Tags功能选择一个在组态1769-IQ6XOW4/A时创建的标签,浏览标签选择Local:1:I.Data.4。在Browse Tags屏幕中选择Controller Scoped Tags。153楼 回复本楼
引用 瑞雪照丰年 2007/3/4 20:17:23 发表于153楼的内容
-
引用 瑞雪照丰年 2007/3/4 20:18:34 发表于154楼的内容
-
引用 瑞雪照丰年 2007/3/4 20:19:34 发表于155楼的内容
-
引用 瑞雪照丰年 2007/3/4 20:20:14 发表于156楼的内容
-
引用 瑞雪照丰年 2007/3/4 20:20:54 发表于157楼的内容
-
引用 瑞雪照丰年 2007/3/4 20:21:39 发表于158楼的内容
-
引用 瑞雪照丰年 2007/3/4 20:22:18 发表于159楼的内容
-
-
瑞雪照丰年 发表于 2007/3/4 20:23:19
配置I/O 模块160楼 回复本楼
一旦添加I/O模块完毕, 您的控制器标签屏幕如下所示:
标签地址被自动组态。所有的本地
I/O地址都采用字格式,具体如下:
输入数据: Local:s:I
输出数据: Local:s:O
组态数据: Local:s:C
为了配置I/O模块,您必须点击组态数据前的+号,进行组态.
引用 瑞雪照丰年 2007/3/4 20:23:19 发表于160楼的内容
-
-
瑞雪照丰年 发表于 2007/3/4 20:24:10
u 组态1769-IF4模块
1. 在控制器标签数据表里,点击左边的+号Local:2:C, 下面列出了组态数据的具体含义.
输入通道0的组态数据存在Local:2:C.Ch0Config 标签里. 四个组态字分别对应四个输入通道. Local:2:C.Ch0Config对应通道0, Local:2:C.Ch1Config 对应通道1,依此类推.
每个组态字分解如下,以通道0为例:
Bits 0-3: Input Filter Select (Local:2:C.Ch0Filter_0-3)
Bits 4-7: Reserved – set to 0
Bits 8-11: Input Type/Range Select (Local:2:C.Ch0Range_8-11)
Bits 12-14: Input Data Format (Local:2:C.Ch0DataFormat_12_14)
Bit 15: Channel Enable bit (Local:2:C.Ch0En)
更加详细的解释为:
Input Filter:
Input Filter Bit 3 Bit 2 Bit 1 Bit 0
60 Hz 0 0 0 0
50 Hz 0 0 0 1
Not Used 0 0 1 0
250 Hz 0 0 1 1
500 Hz 0 1 0 0
Input Type/Range:
Input Type Bit 11 Bit 10 Bit 9 Bit 8
-10 to +10V dc 0 0 0 0
0 – 5V dc 0 0 0 1
0 – 10V dc 0 0 1 0
4 – 20 ma 0 0 1 1
1 – 5V dc 0 1 0 0
0 – 20 ma 0 1 0 1
Input Data Format:
Input Data Format Bit 14 Bit 13 Bit 12
Raw/Proportional 0 0 0
Engineering Units 0 0 1
Scaled for PID 0 1 0
Percent Range 0 1 1
组态1769-OF2
各项组态字的含义如下:
Word 0, Local:3:C.Ch0Config:
bit 0: PFE0 (Local:3:C.Ch0ProgToFaultEn)
bit 1: not used – set to 0
bit 2: PM0 (Local:3:C.Ch0ProgMode)
bit 3: FM0 (Local:3:C.Ch0FaultMode)
bits 4-7: not used – set to 0
bits 8-11: Output Type/Range Select Channel 0 (Local:3:C.Ch0Range_8-11)
bits 12-14: Output Data Format Select Channel 0 (Local:3:C.Ch0DataFormat_12-14)
bit 15: Channel 0 Enable Bit (Local:3:C.Ch0En)
Word 1, Local:3:C.Ch1Config:
bit 0: PFE1 (Local:3:C.Ch1ProgToFaultEn)
bit 1: not used – set to 0
bit 2: PM1 (Local:3:C.Ch1ProgMode)
bit 3: FM1 (Local:3:C.Ch1FaultMode)
bits 4-7: not used – set to 0
bits 8-11: Output Type/Range Select Channel 1 (Local:3:C.Ch1Range_8-11)
bits 12-14: Output Data Format Select Channel 1 (Local:3:C.Ch1DataFormat_12-14)
bit 15: Channel 1 Enable Bit (Local:3:C.Ch1En)
Word 2: Fault Value – Channel 0 (Local:3:C.Ch0FaultValue)
Word 3: Program (Idle) Value – Channel 0 (Local:3:C.Ch0ProgValue)
Word 4: Fault Value – Channel 1 (Local:3:C.Ch1FaultValue)
Word 5: Program (Idle) Value – Channel 1 (Local:3:C.Ch1ProgValue)
其中:
PFE0/PFE1: This is the Program To Fault Enable Bit. If the L20 controller is in Program Mode and a fault occurs, this bit determines whether the Program or Fault Mode value is applied to the output. If the bit is set to a 1, the module applies the Fault Mode data value to the output. If the bit is a 0, the module applies the Program Mode data value to the output.
PM0/PM1: This is the Program Mode selection bit. If the L20 controller is placed into the Program Mode, this selection determines the state of the analog outputs. If this bit is a 0, the module holds the output in its Last State. For analog output modules, this is the default. If this bit is a 1, the module applies the channel’s Program Values (specified in Words 3 and 5, tags Local:3:C.Ch0ProgValue and Local:3:C.Ch1ProgValue) to the appropriate outputs.
FM0/FM1: This is the Fault Mode selection bit. If the L20 controller faults, this selection determines the state of the analog outputs. If this bit is a 0, the module holds the output in its Last State. If this bit is a 1, the module applies the channel’s Fault Values (specified in Words 2 and 4, tags Local:3:C.Ch0FaultValue and Local:3:C.Ch1FaultValue) to the appropriate outputs.
Output Type/Range Select:
Output Range Bit 11 Bit 10 Bit 9 Bit 8
-10V dc to +10V dc 0 0 0 0
0-5V dc 0 0 0 1
0-10V dc 0 0 1 0
4-20ma 0 0 1 1
1-5V dc 0 1 0 0
0-20ma 0 1 0 1
Output Data Format Selection:
Output Data Format Bit 14 Bit 13 Bit 12
Raw/Proportional 0 0 0
Engineering Units 0 0 1
Scaled For PID 0 1 0
Percent Range 0 1 1
Channel Enable Bit:
Fault Value:
Program/Idle Value:
u 根据实验台的实际情况配置您的模拟量I/O
1. 根据实验台的实际情况配置您的模拟量I/O
2. 输入如下指令
3. Save 并 download 程序到处理器.
4. 观察结果.全文完
引用 瑞雪照丰年 2007/3/4 20:24:10 发表于161楼的内容