브랜드

Impact-Company-Logo-English Black-01-177x54

슈나이더 일렉트릭 코리아 웹사이트에 방문해 주셔서 감사합니다.

슈나이더 일렉트릭 코리아 웹사이트 방문자 분들 모두 환영합니다.
		
오늘 무엇을 도와드릴까요?
Use script code in Geo SCADA to read and modify DataSetRows Cell Expressions
Use script code in Geo SCADA to read and modify DataSetRows Cell Expressions

In Geo SCADA, there are various methods for defining the Data Set Rows expression. There is a detailed instruction in the Geo SCADA Expert Guide on how to manually set the expression in the Data Set Rows. In this article, I'll go over how the script codes in Geo SCADA can be used to read and write expressions in the Data Set Rows.
Initially, as you observe in the screenshot, I created a Data Set Row called DataSetRow 1 and connected it to Data Set 1, which has four different fields.  I have manually created the expression of the fields of DataSetRow 1 and the "InsName" expression is set to ‘Reservoir’.

Data Set1

Image 1- Data Set1



DataSetRow 1 initial Values

Image 2-  DataSetRow 1  initial Values


Therefore, we must have access to the Data Set Rows’ methods, which is this article's primary objective.
Following the Database Schema reference (https://tprojects.schneider-electric.com/GeoSCADAHelp/Geo SCADA 2020/Content/DatabaseGuide/WorkingwiththeDatabaseSchema.htm), there are two distinct methods to obtain and modify the cell expression in Data Set Row objects: GetCellExpr and SetCellExpr. The preview of the table in the database schema is displayed in the following screenshot.

Data Set Row Method part 1
Image 3-  Data Set Row Method part 1

Data Set Row Method part 2

Image 4-  Data Set Row Method part 2

The sample code I have provided will instruct you how to obtain and modify the field "InsName" expression from/to "DataSetRow 1."

Sub SetDataSetRow()

Set ObjDataSetRow = Server.FindObject(Server.ThisObject.Parent.FullName & ".DataSetRow 1")
MsgBox (ObjDataSetRow.Interface.GetCellExpr("InsName"))
ObjDataSetRow.Interface.SetCellExpr "InsName","'Valve'"

End Sub

The Data Set Row location within the database can be found using the first line, Server.FindObject(Server.ThisObject.Parent.FullName & ".DataSetRow 1"). The object's location within the same Mimic group is indicated by the usage of "Server.ThisObject.Parent.FullName." The "FindObject" method retrieves the variable of "Serverobject" and stores it in the "ObjDataSetRow".
We need to implement the interface method in order provide access to the Data Set Row's Methods. Therefore, when the second line is executed, a message box displaying the "InsName" field's expression appears.

Retrieved Cell Expression

Image 5- Retrieved Cell Expression

Lastly, as you can see in the screen shot below, the third line change the "InsName" cell expression to the "Valve" and stores it in the DataSetRow 1 object.
Modified Cell Expression

Image 6- Modified Cell Expression


슈나이더 일렉트릭 Korea

자세히 알아보기
제품군
자세히 알아보기
제품군

도움이 필요하신가요?

  • 제품 선택기

    애플리케이션에 적합한 제품과 액세서리를 빠르고 쉽게 찾을 수 있습니다.

  • 견적 받기

    영업 관련하여 온라인으로 문의하시면 전문가가 연락드립니다.

  • 구매처

    해당 지역의 가장 가까운 슈나이더 일렉트릭 대리점을 쉽게 찾을 수 있습니다.

  • 지원 센터

    한 곳에서 모든 요구 사항에 대한 지원 리소스를 찾아보십시오.

  • 제품 문서
  • 소프트웨어 다운로드
  • 제품 선택기
  • 제품 대체 및 교체
  • 지원 및 연락처 센터
  • 영업소 검색
  • 견적 받기
  • 슈나이더 일렉트릭 커뮤니티
  • 채용
  • 회사 소개
  • 부정 행위 보고
  • 접근성
  • 뉴스룸
  • 투자자
  • Ecostruxure
  • 작업 검색
  • 블로그
  • 개인정보 취급방침
  • 쿠키 공지
  • 사용 약관
  • Change your cookie settings