브랜드

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

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

슈나이더 일렉트릭 코리아 웹사이트 방문자 분들 모두 환영합니다.
		
오늘 무엇을 도와드릴까요?
How to use LoadDataValue in C#
DISCLAIMER

The example below is intended to demonstrate one or more features or methods and is presented as a configuration example only. Schneider Electric assumes no liability for the use or application of this example or any portion thereof.

LoadDataValue is a method that can be used to insert historic data to a point (more details on the ClearSCADA Database Schema).
Below there is an example on how to connect to a local server and use this method:

private void button9_Click(object sender, EventArgs e)
{
DBObject TestPoint;
Aggregate HistAgg;

Object[] args;
DateTime dt;
args = new Object[4];

using (Connection conn = new Connection("TestApp"))
{
// Connect to local server
SecureString passwd = new SecureString();
string strPassword = "adminexample";
foreach (char c in strPassword)
passwd.AppendChar(c);
passwd.MakeReadOnly();
conn.Connect("localhost");
conn.LogOn("AdminExample", passwd);

// Get the point
TestPoint = conn.GetObject("~Points.A1");
// If Historic is enabled for the point, insert historic data
if (TestPoint.Aggregates.TryGetValue("Historic", out HistAgg) == true)
{
args[0] = 0;
args[1] = 192;
dt = new DateTime(2019, 4, 3, 7, 21, 52);
args[2] = new System.DateTimeOffset(dt);
args[3] = 88;
HistAgg.InvokeMethod("LoadDataValue", args);
}
conn.LogOff();
conn.Disconnect();
}
}

슈나이더 일렉트릭 Korea

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