MATLAB - HYSYS Column feed control
    조회 수: 5 (최근 30일)
  
       이전 댓글 표시
    
I suceed to connect MATLAB(R2015b) - HYSYS(ver7.3). I can control temperature, pressure,etc via MATLAB. I can change total stage number of column and reset/run is also ok to control. BUT I cannot change optional feed stage.
my code is as below.
 hCase = h.ActiveDocument;
 Column = hCase.Flowsheet.Operations.Item('T-100');  %column name is T-100
 Columnflowsheet = Column.ColumnFlowsheet;
 ColumnOptionalFeedStage1 = Columnflowsheet.FeedColumnStages.Item(1).StageNumber;
 ColumnOptionalFeedStage2 = Columnflowsheet.FeedColumnStages.Item(2).StageNumber;
ColumnOptionalFeedStage1 and 2 are internal real variable.(Library Columnstage)
Command
 ColumnOptionalFeedStage1.Value
show me the value. So far good.
I WANT TO CHANGE ITS VALUE. THAT MEANS I WANT TO CHANGE FEED STAGE NUMBER WHICH IS INTEGER.
however,
 ColumnOptionalFeedStage1.SetValue(3)
 ColumnOptionalFeedStage1.Value = 3
both above does not work.
HOW CAN I CHANGE FEED STAGE?
OR
WHERE CAN I LOOK HYSYS 7.3 LIBRARY? (In MATLAB - Excel interface, navigation through library is possible. I can see all possible sysntax. where in MATLAB?)
답변 (1개)
  Andrés F. Abril
 2018년 11월 14일
        Hi,
Try:
  hCase = h.ActiveDocument;
 Column = hCase.Flowsheet.Operations.Item('T-100');  %column name is T-100
 ColumnOptionalFeedStage1 = Column.ColumnFlowsheet.FeedStreams.Item('1');
 ColumnOptionalFeedStage2 = Column.ColumnFlowsheet.FeedStreams.Item('2');
  Column.ColumnFlowsheet.Operations.Item("Main_TS").SpecifyFeedLocation(ColumnOptionalFeedStage1, 48); % 48 is the Feed Location
Column.ColumnFlowsheet.Operations.Item("Main_TS").SpecifyFeedLocation(ColumnOptionalFeedStage2, 48); % 48 is the Feed Location
Best Regards.
참고 항목
카테고리
				Help Center 및 File Exchange에서 Call C++ from MATLAB에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



