McpX 0.0.1
See the version list below for details.
dotnet add package McpX --version 0.0.1
NuGet\Install-Package McpX -Version 0.0.1
<PackageReference Include="McpX" Version="0.0.1" />
<PackageVersion Include="McpX" Version="0.0.1" />
<PackageReference Include="McpX" />
paket add McpX --version 0.0.1
#r "nuget: McpX, 0.0.1"
#addin nuget:?package=McpX&version=0.0.1
#tool nuget:?package=McpX&version=0.0.1
<h1>McpX</h1> <p> <img alt="Version" src="https://img.shields.io/badge/version-0.0.0-blue" /> <img alt=".NET 7.0+" src="https://img.shields.io/badge/.NET-7.0+-blueviolet" /> <img alt=".NET 8.0+" src="https://img.shields.io/badge/.NET-8.0+-purple" /> <img alt=".NET 9.0+" src="https://img.shields.io/badge/.NET-9.0+-indigo" /> <img alt=".NET Core 2.0+" src="https://img.shields.io/badge/.NET_Core-2.0+-darkgreen" /> <img alt=".NET Framework 4.6.1+" src="https://img.shields.io/badge/.NET_Framework-4.6.1+-teal?logo=windows" /> <img alt="License" src="https://img.shields.io/badge/license-MIT-brightgreen.svg" /> </p>
<p> <a href="README_JA.md">日本語</a> | <a href="README.md">English</a> </p>
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.
Installation
dotnet add package Mcpx
Example Usage
using McpXLib;
using McpXLib.Enums;
// Connect to PLC by specifying IP and port
using (var mcpx = new McpX("192.168.12.88", 10000))
{
// Read 7000 points starting from M0
bool[] mArr = mcpx.BatchRead<bool>(Prefix.M, "0", 7000);
// Read 7000 words starting from D1000
short[] dArr = mcpx.BatchRead<short>(Prefix.D, "1000", 7000);
// Write 1234 to D0 and 5678 to D1 as signed 32-bit integers
mcpx.BatchWrite<int>(Prefix.D, "0", [1234, 5678]);
}
Supported Commands
Name | Description | Synchronous Method | Asynchronous Method |
---|---|---|---|
Single Read | Reads a single value from the specified device. | Read<T>(Prefix prefix, string address) |
ReadAsync<T>(Prefix prefix, string address) |
Single Write | Writes a single value to the specified device. | Write<T>(Prefix prefix, string address, T value) |
WriteAsync<T>(Prefix prefix, string address, T value) |
Batch Read | Reads multiple consecutive values starting from the specified address. | BatchRead<T>(Prefix prefix, string address, ushort length) |
BatchReadAsync<T>(Prefix prefix, string address, ushort length) |
Batch Write | Writes an array of values to consecutive device addresses. | BatchWrite<T>(Prefix prefix, string address, T[] values) |
BatchWriteAsync<T>(Prefix prefix, string address, T[] values) |
Random Read | Reads values from non-consecutive word and double-word addresses. | RandomRead<T1, T2>((Prefix, string)[] wordAddresses, (Prefix, string)[] doubleWordAddresses) |
RandomReadAsync<T1, T2>((Prefix, string)[] wordAddresses, (Prefix, string)[] doubleWordAddresses) |
Random Write | Writes values to non-consecutive word and double-word addresses. | RandomWrite<T1, T2>(...) |
RandomWriteAsync<T1, T2>(...) |
Monitor Registration | Registers devices to monitor. | MonitorRegist((Prefix, string)[] wordAddresses, (Prefix, string)[] doubleWordAddresses) |
MonitorRegistAsync((Prefix, string)[] wordAddresses, (Prefix, string)[] doubleWordAddresses) |
Monitor Read | Reads the latest values from registered monitoring devices. | Monitor<T1, T2>(...) |
MonitorAsync<T1, T2>(...) |
Remote Password Lock/Unlock | Automatically locks the PLC with the specified remote password when the instance is created and unlocks it when disposed. | McpX(string ip, int port, string? password = null) |
– |
Supported Protocols
- TCP
- 3E frame (binary code)
Roadmap
- 3E frame (ASCII code) support
- 4E frame (binary code) support
- 4E frame (ASCII code) support
- UDP support
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.