C# 클래스 MATLABfromCSharp.MatlabAccess

파일 보기 프로젝트 열기: osisoft/PI-to-MATLAB-Utility 1 사용 예제들

공개 메소드들

메소드 설명
GetWorkspaceData ( string name, string workspace, object &val ) : void

Grab data from the workspace.

MatlabStartup ( ) : void

Starts with Program, either connects to COM-Enabled Matlab or starts a Matlab File.

The call "enableservice('AutomationServer',true);" COM-enables Matlab and ensures it doesn't close with the program.

isMatlabOpen ( ) : bool

Checks to see if Matlab is Open. (if matlab is null).

isVariableInWorkspace ( string name ) : bool

Checks the Matlab workspace for the variable name, so no data is Overwritten.

modifyMatlabName ( string varName ) : string

Make UserInput Matlab-Friendly and Check for Unique Variable Name 1) UserInput-MatlabFriendly - Remove punctuation and numbers at start 2) Check Unique Variables - check Matlab workspace and Log System

plotMatlabVariables ( string varName ) : void

Plots data the time vs. the unique variable name. Example of calling matlab methods from C#.

removeMatlabVariable ( string varName ) : void

Removes the variable from Matlab Workspace along with the timespace.

Only called when the log is editted.

sendDataToMatlab ( string varName, double dblInput ) : void

Send the array of doubles to Matlab.

sendDataToMatlab ( string varName, string strInput ) : void

Send a array of strings to Matlab.

메소드 상세

GetWorkspaceData() 공개 정적인 메소드

Grab data from the workspace.
public static GetWorkspaceData ( string name, string workspace, object &val ) : void
name string the name of the variable in the Matlab workspace.
workspace string the workspace name, (generally "base")
val object out the object from Matlab.
리턴 void

MatlabStartup() 공개 정적인 메소드

Starts with Program, either connects to COM-Enabled Matlab or starts a Matlab File.
The call "enableservice('AutomationServer',true);" COM-enables Matlab and ensures it doesn't close with the program.
public static MatlabStartup ( ) : void
리턴 void

isMatlabOpen() 공개 정적인 메소드

Checks to see if Matlab is Open. (if matlab is null).
public static isMatlabOpen ( ) : bool
리턴 bool

isVariableInWorkspace() 공개 정적인 메소드

Checks the Matlab workspace for the variable name, so no data is Overwritten.
public static isVariableInWorkspace ( string name ) : bool
name string The variable name being checked for.
리턴 bool

modifyMatlabName() 공개 정적인 메소드

Make UserInput Matlab-Friendly and Check for Unique Variable Name 1) UserInput-MatlabFriendly - Remove punctuation and numbers at start 2) Check Unique Variables - check Matlab workspace and Log System
public static modifyMatlabName ( string varName ) : string
varName string Either user-input name or attribute name
리턴 string

plotMatlabVariables() 공개 정적인 메소드

Plots data the time vs. the unique variable name. Example of calling matlab methods from C#.
public static plotMatlabVariables ( string varName ) : void
varName string unique variable name
리턴 void

removeMatlabVariable() 공개 정적인 메소드

Removes the variable from Matlab Workspace along with the timespace.
Only called when the log is editted.
public static removeMatlabVariable ( string varName ) : void
varName string The name of the variable in Matlab.
리턴 void

sendDataToMatlab() 공개 정적인 메소드

Send the array of doubles to Matlab.
Thrown when matlab is closed and no connection.
public static sendDataToMatlab ( string varName, double dblInput ) : void
varName string The Unique variable name.
dblInput double Passed Array of Data.
리턴 void

sendDataToMatlab() 공개 정적인 메소드

Send a array of strings to Matlab.
Thrown when matlab is closed and no connection.
public static sendDataToMatlab ( string varName, string strInput ) : void
varName string The unique variable name.
strInput string Passed Array of Data.
리턴 void