-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSCP_20181017.L5X
249 lines (247 loc) · 8.94 KB
/
SCP_20181017.L5X
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--Scaling with parameters-->
<RSLogix5000Content SchemaRevision="1.0" SoftwareRevision="28.00" TargetName="SCP" TargetType="AddOnInstructionDefinition" TargetRevision="1.6 " TargetLastEdited="2018-08-09T21:32:07.227Z" ContainsContext="true" Owner="brian" ExportDate="Wed Oct 17 14:41:28 2018" ExportOptions="References NoRawData L5KData DecoratedData Context Dependencies ForceProtectedEncoding AllProjDocTrans">
<Controller Use="Context" Name="Select_Energy_Mixing_Skid">
<DataTypes Use="Context">
</DataTypes>
<AddOnInstructionDefinitions Use="Context">
<AddOnInstructionDefinition Use="Target" Name="SCP" Revision="1.6" Vendor="sparkygeek.com" ExecutePrescan="false" ExecutePostscan="false" ExecuteEnableInFalse="false" CreatedDate="2007-09-26T16:24:49.393Z" CreatedBy="Not Available" EditedDate="2018-08-09T21:32:07.227Z" EditedBy="SPARKY5000\brian"
SoftwareRevision="v28.00">
<Description>
<![CDATA[Scaling with parameters]]>
</Description>
<RevisionNote>
<![CDATA[8/9/2018
]]>
</RevisionNote>
<AdditionalHelpText>
<![CDATA[Rockwell Software RSLogix 500 Description:
The Input value is scaled to a range determined by creating a linear relationship between input min and max values and scaled min and max values. The scaled result is returned to the address indicated by the output parameter.
]]>
</AdditionalHelpText>
<Parameters>
<Parameter Name="EnableIn" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="false" Visible="false" ExternalAccess="Read Only">
<Description>
<![CDATA[Enable Input - System Defined Parameter]]>
</Description>
</Parameter>
<Parameter Name="EnableOut" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="false" Visible="false" ExternalAccess="Read Only">
<Description>
<![CDATA[Enable Output - System Defined Parameter]]>
</Description>
</Parameter>
<Parameter Name="Input" TagType="Base" DataType="REAL" Usage="Input" Radix="Float" Required="true" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Input to SCP block (REAL)]]>
</Description>
<DefaultData Format="L5K">
<![CDATA[0.00000000e+000]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="REAL" Radix="Float" Value="0.0"/>
</DefaultData>
</Parameter>
<Parameter Name="WiringFault" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[0= no wiring problem detected; 1= wiring problem detected]]>
</Description>
<DefaultData Format="L5K">
<![CDATA[0]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="FaultInput" TagType="Base" DataType="DINT" Usage="Input" Radix="Decimal" Required="false" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[any value other than zero will cause alarm]]>
</Description>
<DefaultData Format="L5K">
<![CDATA[0]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="DINT" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="limiting" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="false" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Limiting function. If TRUE, output will be limited to Scaled_Min and Scaled_Max]]>
</Description>
<DefaultData Format="L5K">
<![CDATA[1]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="1"/>
</DefaultData>
</Parameter>
<Parameter Name="InputInternal" TagType="Base" DataType="REAL" Usage="Input" Radix="Float" Required="false" Visible="true" ExternalAccess="Read Only">
<Description>
<![CDATA[Value to be Scaled]]>
</Description>
<DefaultData Format="L5K">
<![CDATA[0.00000000e+000]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="REAL" Radix="Float" Value="0.0"/>
</DefaultData>
</Parameter>
<Parameter Name="Input_Min" TagType="Base" DataType="REAL" Usage="Input" Radix="Float" Required="false" Visible="true" ExternalAccess="None">
<Description>
<![CDATA[Minimum Value for the Input]]>
</Description>
<DefaultData Format="L5K">
<![CDATA[0.00000000e+000]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="REAL" Radix="Float" Value="0.0"/>
</DefaultData>
</Parameter>
<Parameter Name="Input_Max" TagType="Base" DataType="REAL" Usage="Input" Radix="Float" Required="false" Visible="true" ExternalAccess="None">
<Description>
<![CDATA[Maximum Value for the Input]]>
</Description>
<DefaultData Format="L5K">
<![CDATA[0.00000000e+000]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="REAL" Radix="Float" Value="0.0"/>
</DefaultData>
</Parameter>
<Parameter Name="Scaled_Min" TagType="Base" DataType="REAL" Usage="Input" Radix="Float" Required="false" Visible="true" ExternalAccess="None">
<Description>
<![CDATA[Minimum Scaling Value]]>
</Description>
<DefaultData Format="L5K">
<![CDATA[0.00000000e+000]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="REAL" Radix="Float" Value="0.0"/>
</DefaultData>
</Parameter>
<Parameter Name="Scaled_Max" TagType="Base" DataType="REAL" Usage="Input" Radix="Float" Required="false" Visible="true" ExternalAccess="None">
<Description>
<![CDATA[Maximum Scaling Value]]>
</Description>
<DefaultData Format="L5K">
<![CDATA[0.00000000e+000]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="REAL" Radix="Float" Value="0.0"/>
</DefaultData>
</Parameter>
<Parameter Name="Output" TagType="Base" DataType="REAL" Usage="Output" Radix="Float" Required="true" Visible="true" ExternalAccess="Read Only">
<Description>
<![CDATA[Scaled Value [Slope*Input + Offset]]]>
</Description>
<DefaultData Format="L5K">
<![CDATA[0.00000000e+000]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="REAL" Radix="Float" Value="0.0"/>
</DefaultData>
</Parameter>
<Parameter Name="MaxAlarm" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="false" Visible="true" ExternalAccess="Read Only">
<Description>
<![CDATA[output is at or above maximum]]>
</Description>
<DefaultData Format="L5K">
<![CDATA[0]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="MinAlarm" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="false" Visible="true" ExternalAccess="Read Only">
<Description>
<![CDATA[output is at or below minimum]]>
</Description>
<DefaultData Format="L5K">
<![CDATA[0]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="Alarm" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="false" Visible="true" ExternalAccess="Read Only">
<DefaultData Format="L5K">
<![CDATA[0]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
</Parameters>
<LocalTags>
<LocalTag Name="offset" DataType="REAL" Radix="Float" ExternalAccess="Read/Write">
<Description>
<![CDATA[Offset Value [Scaled Min - (Input Min * Slope)]]]>
</Description>
<DefaultData Format="L5K">
<![CDATA[0.00000000e+000]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="REAL" Radix="Float" Value="0.0"/>
</DefaultData>
</LocalTag>
<LocalTag Name="slope" DataType="REAL" Radix="Float" ExternalAccess="Read/Write">
<Description>
<![CDATA[Slope Value [(Scaled Max - Scaled Min)/(Input Max - Input Min)]]]>
</Description>
<DefaultData Format="L5K">
<![CDATA[0.00000000e+000]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="REAL" Radix="Float" Value="0.0"/>
</DefaultData>
</LocalTag>
</LocalTags>
<Routines>
<Routine Name="Logic" Type="RLL">
<RLLContent>
<Rung Number="0" Type="N">
<Text>
<![CDATA[NOP();]]>
</Text>
</Rung>
<Rung Number="1" Type="N">
<Text>
<![CDATA[MOV(Input,InputInternal);]]>
</Text>
</Rung>
<Rung Number="2" Type="N">
<Text>
<![CDATA[CPT(slope,(Scaled_Max-Scaled_Min)/(Input_Max-Input_Min));]]>
</Text>
</Rung>
<Rung Number="3" Type="N">
<Text>
<![CDATA[CPT(offset,Scaled_Min-(Input_Min*slope));]]>
</Text>
</Rung>
<Rung Number="4" Type="N">
<Text>
<![CDATA[CPT(Output,(slope*InputInternal)+offset);]]>
</Text>
</Rung>
<Rung Number="5" Type="N">
<Text>
<![CDATA[GEQ(Output,Scaled_Max)[XIC(limiting) MOV(Scaled_Max,Output) ,OTE(MaxAlarm) ];]]>
</Text>
</Rung>
<Rung Number="6" Type="N">
<Text>
<![CDATA[LEQ(Output,Scaled_Min)[XIC(limiting) MOV(Scaled_Min,Output) ,OTE(MinAlarm) ];]]>
</Text>
</Rung>
<Rung Number="7" Type="N">
<Text>
<![CDATA[[XIC(MaxAlarm) ,XIC(MinAlarm) ,XIC(WiringFault) ,NEQ(FaultInput,0) ]OTE(Alarm);]]>
</Text>
</Rung>
</RLLContent>
</Routine>
</Routines>
</AddOnInstructionDefinition>
</AddOnInstructionDefinitions>
</Controller>
</RSLogix5000Content>