YM

yudaikitamura/mcpx

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

68 stars 14 forks 품질 62 트렌드 28MIT

yudaikitamura/mcpx는 MCP 서버 후보로 수입 https://github.com/yudaikitamura/mcpx.]

개요

yudaikitamura/mcpx는 MCP 서버 후보로 수입 https://github.com/yudaikitamura/mcpx.]

개요(AI 번역)

한국어 | English

웹 사이트 및 문서: mcpx.yktmr.jp — 개요, API 참조 및 MC 프로토콜 가이드.

**McpX는 MC 프로토콜을 사용하여 Mitsubishi Electric PLCs와 통신하기위한 라이브러리입니다. ** 그것은 단순하고 사용하기 쉬운 API, MC 프로토콜 세부 사항에 대해 걱정없이 통신 할 수 있습니다. Linux, Windows 및 macOS를 포함한 다양한 플랫폼에서 실행됩니다.

0.x에서 업그레이드? 이동 가이드를 참조하십시오.

설치

.NET 클립

패키지 관리자(Visual Studio)

예제 사용

모든 메소드는 CancellationToken]를 취하는 async 버전이 있습니다.

C# 및 Visual Basic 샘플은 여기에 있습니다.

연결 설정

McpXOptions]에서 McpX.Connect] / McpX.ConnectAsync]를 PLC 매개 변수와 일치합니다.

| 재산 | 묘사 | 과태 | |—||||| | [T4] | PLC의 IP 주소 또는 호스트 이름 | (필수) | | [T5] | 포트 번호 (1-65535) | (필수) | | [T6] | 원격 비밀번호 연결 및 잠금 해제 Dispose / DisposeAsync | null | | IsAscii | true] ASCII 코드, false] 이진 코드 | [T13] | | IsUdp | true UDP, false] TCP | false | | [T18]|「RequestFrame」.

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

日本語 | English

Website & documentation: mcpx.yktmr.jp — overview, API reference, and an MC protocol guide.

McpX is a library for communicating with Mitsubishi Electric PLCs using the MC protocol.
It features a simple and easy-to-use API, allowing you to communicate without worrying about MC protocol details.
It runs on various platforms, including Linux, Windows, and macOS.

Upgrading from 0.x? See the migration guide.

Installation

.NET CLI

dotnet add package McpX

Package Manager(Visual Studio)

PM> NuGet\Install-Package McpX

Example Usage

using McpXLib;
using McpXLib.Enums;

// Connect to the PLC (TCP / binary code / 3E frame / MELSEC-Q/L series by default)
using var mcpx = McpX.Connect("192.168.12.88", 10000);

// Read 7000 points starting from M0 (requests over the limit are split automatically)
bool[] mArr = mcpx.BatchRead(Prefix.M, "0", 7000);

// Read 7000 words starting from D1000
short[] dArr = mcpx.BatchRead(Prefix.D, "1000", 7000);

// Write 1234 to D0-D1 and 5678 to D2-D3 as signed 32-bit integers
mcpx.BatchWrite(Prefix.D, "0", [1234, 5678]);

// Read a range and single devices together (ranges: batch access, single: random access)
short[] block = [];
int total = 0;
mcpx.Read(b => b
    .Add(Prefix.D, "400", 100, v => block = v)
    .Add(Prefix.D, "2000", v => total = v));

Every method has an async version that takes a CancellationToken:

await using var mcpx = await McpX.ConnectAsync("192.168.12.88", 10000, cancellationToken);
short d0 = await mcpx.ReadAsync(Prefix.D, "0", cancellationToken);

C# and Visual Basic samples are available here.

Connection Settings

GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →