직렬 포트 API

직렬 포트 API

API는 직렬
Port
개체에 의해 제공되며 기본적으로
FactoryTalk Optix Studio
에서 지원되지 않는 단일 또는 다중 컨트롤러의 통신 프로토콜 논리를 구현하는 데 사용됩니다.

사용 가능한 API

다음과 같은 메서드를 사용할 수 있습니다.
public void Open(); public void Close(); public byte[] ReadBytes(uint count); public char[] ReadChars(uint count); public byte ReadByte(); public char ReadChar(); public string ReadLine(); public byte[] ReadBytesUntil(string delimiter); public char[] ReadCharsUntil(string delimiter); public void WriteBytes(byte[] buffer); public void WriteChars(char[] buffer); public void WriteLine(string text); public void CancelRead();
다음 C# 속성을 사용하면 개체 변수를 읽거나 쓸 수 있고 일부 메서드의 작업을 변경할 수 있습니다.
public string PortName { get; set; } public uint BaudRate { get; set; } public byte DataSize { get; set; } public ParityType Parity { get; set; } public StopBitsType StopBits { get; set; } public FlowControlType FlowControl { get; set; } public TimeSpan Timeout { get; set; } public string NewLine { get; set; } = "\n";
의견을 작성 부탁드립니다.
이 자료에 대한 문의사항이나 요청사항이 있습니까? 여기에 요청사항을 작성 부탁드립니다.
Normal