- プロジェクトの作成
- オブジェクトと変数のリファレンス
- プロジェクトの拡張
- チュートリアル
- グラフィックオブジェクト チュートリアル
シリアルポート 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";
ご質問やご意見