File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
TiaCodegen/Commands/Functions Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ using System . Linq ;
2+ using TiaCodegen . Commands . Functions . Base ;
3+ using TiaCodegen . Enums ;
4+ using TiaCodegen . Interfaces ;
5+
6+ namespace TiaCodegen . Commands . Functions
7+ {
8+ public class CTUCall : SystemFunctionBlockCall
9+ {
10+ public CTUCall ( string instanceName ,
11+ IOperationOrSignal cu = null ,
12+ IOperationOrSignal r = null ,
13+ IOperationOrSignal pv = null ,
14+ IOperationOrSignal q = null ,
15+ IOperationOrSignal cv = null ) : base ( "CTU" , instanceName , null )
16+ {
17+ Interface [ "CU" ] = new IOperationOrSignalDirectionWrapper ( cu , Direction . Input ) ;
18+ Interface [ "R" ] = new IOperationOrSignalDirectionWrapper ( r , Direction . Input ) ;
19+ Interface [ "PV" ] = new IOperationOrSignalDirectionWrapper ( pv , Direction . Input ) ;
20+ Interface [ "Q" ] = new IOperationOrSignalDirectionWrapper ( q , Direction . Output ) ;
21+ Interface [ "CV" ] = new IOperationOrSignalDirectionWrapper ( cv , Direction . Output ) ;
22+
23+ TemplateValueName = "value_type" ;
24+ TemplateValueType = "Type" ;
25+ TemplateValue = "Int" ;
26+ HasNoEn = true ;
27+
28+ Children . AddRange ( Interface . Values . Where ( x => x . OperationOrSignal != null ) . Select ( x => x . OperationOrSignal ) ) ;
29+ }
30+ }
31+ }
You can’t perform that action at this time.
0 commit comments