mirror of
https://github.com/OpenLogics/MewtocolNet.git
synced 2025-12-06 03:01:24 +00:00
Added missing PLC types for FP2, FP10SH, FM-M, FP10
This commit is contained in:
@@ -101,7 +101,7 @@ All supported PLC types for auto recognition are listed in this table. Other one
|
||||
<td align=center> ❌ </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7" height=50>📟 <b>FP1</b> </td>
|
||||
<td colspan="7" height=50>📟 <b>FP1, FP-M</b> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> C14, C16 </td>
|
||||
@@ -143,19 +143,37 @@ All supported PLC types for auto recognition are listed in this table. Other one
|
||||
<td> C56, C72 </td>
|
||||
<td> 5k </td>
|
||||
<td><code>0x06</code></td>
|
||||
<td><i>FP1_5k__C56_C72</i></td>
|
||||
<td><i>FP1_5k__C56_C72_OR_FPdM_5k__C20RC_C20TC_C32TC</i></td>
|
||||
<td align=center>⚠️</td>
|
||||
<td align=center> ❌ </td>
|
||||
<td align=center> ❌ </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7" height=50>📟 <b>FP10</b> </td>
|
||||
<td> C20RC, C20TC, C32TC </td>
|
||||
<td> 5k </td>
|
||||
<td><code>0x06</code></td>
|
||||
<td><i>FP1_5k__C56_C72_OR_FPdM_5k__C20RC_C20TC_C32TC</i></td>
|
||||
<td align=center>⚠️</td>
|
||||
<td align=center> ❌ </td>
|
||||
<td align=center> ❌ </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7" height=50>📟 <b>FP10, FP10S</b> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> - </td>
|
||||
<td> 30k </td>
|
||||
<td><code>0x20</code></td>
|
||||
<td><i>FP10_30k_OR_FP10S_30k</i></td>
|
||||
<td><i>FP10_30k_OR_FP10_60k_OR_FP10S_30k</i></td>
|
||||
<td align=center>⚠️</td>
|
||||
<td align=center> ❌ </td>
|
||||
<td align=center> ❌ </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> - </td>
|
||||
<td> 60k </td>
|
||||
<td><code>0x20</code></td>
|
||||
<td><i>FP10_30k_OR_FP10_60k_OR_FP10S_30k</i></td>
|
||||
<td align=center>⚠️</td>
|
||||
<td align=center> ❌ </td>
|
||||
<td align=center> ❌ </td>
|
||||
@@ -164,7 +182,7 @@ All supported PLC types for auto recognition are listed in this table. Other one
|
||||
<td> - </td>
|
||||
<td> 30k </td>
|
||||
<td><code>0x20</code></td>
|
||||
<td><i>FP10_30k_OR_FP10S_30k</i></td>
|
||||
<td><i>FP10_30k_OR_FP10_60k_OR_FP10S_30k</i></td>
|
||||
<td align=center>⚠️</td>
|
||||
<td align=center> ❌ </td>
|
||||
<td align=center> ❌ </td>
|
||||
@@ -176,7 +194,25 @@ All supported PLC types for auto recognition are listed in this table. Other one
|
||||
<td> - </td>
|
||||
<td> 30k </td>
|
||||
<td><code>0x30</code></td>
|
||||
<td><i>FP10SH_30k</i></td>
|
||||
<td><i>FP10SH_30k_OR_FP10SH_60k_OR_FP10SH_120k</i></td>
|
||||
<td align=center>⚠️</td>
|
||||
<td align=center> ❌ </td>
|
||||
<td align=center> ❌ </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> - </td>
|
||||
<td> 60k </td>
|
||||
<td><code>0x30</code></td>
|
||||
<td><i>FP10SH_30k_OR_FP10SH_60k_OR_FP10SH_120k</i></td>
|
||||
<td align=center>⚠️</td>
|
||||
<td align=center> ❌ </td>
|
||||
<td align=center> ❌ </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> - </td>
|
||||
<td> 120k </td>
|
||||
<td><code>0x30</code></td>
|
||||
<td><i>FP10SH_30k_OR_FP10SH_60k_OR_FP10SH_120k</i></td>
|
||||
<td align=center>⚠️</td>
|
||||
<td align=center> ❌ </td>
|
||||
<td align=center> ❌ </td>
|
||||
@@ -245,6 +281,9 @@ All supported PLC types for auto recognition are listed in this table. Other one
|
||||
<td align=center> ❌ </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7" height=50>📟 <b>FP3, FP-C</b> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> - </td>
|
||||
<td> 16k </td>
|
||||
<td><code>0x13</code></td>
|
||||
@@ -320,7 +359,16 @@ All supported PLC types for auto recognition are listed in this table. Other one
|
||||
<td> - </td>
|
||||
<td> 16k </td>
|
||||
<td><code>0xE1</code></td>
|
||||
<td><i>FPdSIGMA_16k</i></td>
|
||||
<td><i>FPdSIGMA_16k_OR_FPdSIGMA_40k</i></td>
|
||||
<td align=center>⚠️</td>
|
||||
<td align=center> ✅ </td>
|
||||
<td align=center> ❌ </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> - </td>
|
||||
<td> 40k </td>
|
||||
<td><code>0xE1</code></td>
|
||||
<td><i>FPdSIGMA_16k_OR_FPdSIGMA_40k</i></td>
|
||||
<td align=center>⚠️</td>
|
||||
<td align=center> ✅ </td>
|
||||
<td align=center> ❌ </td>
|
||||
|
||||
@@ -28,7 +28,12 @@ void WritePlcTypeTable(IEnumerable<PlcType> vals) {
|
||||
|
||||
var groups = vals.GroupBy(x => x.ToNameDecompose()[0].Group)
|
||||
.SelectMany(grouping => grouping.OrderBy(b => (int)b))
|
||||
.GroupBy(x => x.ToNameDecompose()[0].Group);
|
||||
.GroupBy(
|
||||
x => string.Join(", ",
|
||||
x.ToNameDecompose()
|
||||
.DistinctBy(y => y.Group)
|
||||
.Select(y => y.Group))
|
||||
);
|
||||
|
||||
markdownBuilder.AppendLine("<table>");
|
||||
|
||||
|
||||
@@ -210,6 +210,8 @@ namespace MewtocolNet {
|
||||
|
||||
try {
|
||||
|
||||
if (stream == null) return new MewtocolFrameResponse(405, "PLC not initialized");
|
||||
|
||||
if (useBcc)
|
||||
frame = $"{frame.BuildBCCFrame()}";
|
||||
|
||||
|
||||
@@ -21,34 +21,15 @@ namespace MewtocolNet {
|
||||
/// <returns>A PLCInfo class</returns>
|
||||
public async Task<PLCInfo?> GetPLCInfoAsync(int timeout = -1) {
|
||||
|
||||
//var resu = await SendCommandAsync("%01#RT", true, timeout);
|
||||
//if (!resu.Success) return null;
|
||||
var regexRT = new Regex(@"\%EE\$RT(?<cputype>..)(?<cpuver>..)(?<cap>..)(?<op>..)..(?<flg>..)(?<sdiag>....).*", RegexOptions.IgnoreCase);
|
||||
|
||||
//var reg = new Regex(@"\%([0-9]{2})\$RT([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{4})..", RegexOptions.IgnoreCase);
|
||||
//Match m = reg.Match(resu.Response);
|
||||
var regexEXRT = new Regex(@"\%EE\$EX00RT00(?<icnt>..)(?<mc>..)..(?<cap>..)(?<op>..)..(?<flg>..)(?<sdiag>....)(?<ver>..)(?<hwif>..)(?<nprog>.)(?<progsz>....)(?<hdsz>....)(?<sysregsz>....).*", RegexOptions.IgnoreCase);
|
||||
|
||||
//if (m.Success) {
|
||||
var resRT = await SendCommandAsync("%EE#RT", timeoutMs: timeout);
|
||||
if (!resRT.Success) return null;
|
||||
|
||||
// string station = m.Groups[1].Value;
|
||||
// string cpu = m.Groups[2].Value;
|
||||
// string version = m.Groups[3].Value;
|
||||
// string capacity = m.Groups[4].Value;
|
||||
// string operation = m.Groups[5].Value;
|
||||
var resEXRT = await SendCommandAsync("%EE#EX00RT00", timeoutMs: timeout);
|
||||
|
||||
// string errorflag = m.Groups[7].Value;
|
||||
// string error = m.Groups[8].Value;
|
||||
|
||||
// PLCInfo retInfo = new PLCInfo {
|
||||
// CpuInformation = CpuInfo.BuildFromHexString(cpu, version, capacity),
|
||||
// OperationMode = PLCMode.BuildFromHex(operation),
|
||||
// ErrorCode = error,
|
||||
// StationNumber = int.Parse(station ?? "0"),
|
||||
// };
|
||||
|
||||
// PlcInfo = retInfo;
|
||||
// return retInfo;
|
||||
|
||||
//}
|
||||
|
||||
return null;
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ namespace MewtocolNet {
|
||||
//this overwrites the CPU code and only comes with EXRT
|
||||
//special chars: (d = -) (c = .) (s = /)
|
||||
|
||||
//MISSING! FP7 and EcoLogix
|
||||
|
||||
/// <summary>
|
||||
/// The type of the PLC
|
||||
/// </summary>
|
||||
@@ -66,20 +68,20 @@ namespace MewtocolNet {
|
||||
[PlcLegacy]
|
||||
FP1_2c7k__C24_C40_OR_FPdM_2c7k__C20R_C20T_C32T = 0x05,
|
||||
/// <summary>
|
||||
/// FP1 5.0k C56,C72
|
||||
/// FP1 5.0k C56,C72 or FPM 5k C20RC,C20TC,C32TC
|
||||
/// </summary>
|
||||
[PlcLegacy]
|
||||
FP1_5k__C56_C72 = 0x06,
|
||||
FP1_5k__C56_C72_OR_FPdM_5k__C20RC_C20TC_C32TC = 0x06,
|
||||
|
||||
#endregion
|
||||
|
||||
#region FP10 Family (Legacy)
|
||||
|
||||
/// <summary>
|
||||
/// FP10 OR FP10S 30k
|
||||
/// FP10 30k,60k OR FP10S 30k
|
||||
/// </summary>
|
||||
[PlcLegacy]
|
||||
FP10_30k_OR_FP10S_30k = 0x20,
|
||||
FP10_30k_OR_FP10_60k_OR_FP10S_30k = 0x20,
|
||||
|
||||
//misses entry FP10 60k
|
||||
|
||||
@@ -88,13 +90,10 @@ namespace MewtocolNet {
|
||||
#region FP10SH Family (Legacy)
|
||||
|
||||
/// <summary>
|
||||
/// FP10SH 30k
|
||||
/// FP10SH 30k, 60k, 120k
|
||||
/// </summary>
|
||||
[PlcLegacy]
|
||||
FP10SH_30k = 0x30,
|
||||
|
||||
//misses entry FP10SH 60k
|
||||
//misses entry FP10SH 120k
|
||||
FP10SH_30k_OR_FP10SH_60k_OR_FP10SH_120k = 0x30,
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -121,20 +120,20 @@ namespace MewtocolNet {
|
||||
#region FP-Sigma Family (Legacy)
|
||||
|
||||
/// <summary>
|
||||
/// FP-Sigma 12k
|
||||
/// FP-SIGMA 12k
|
||||
/// </summary>
|
||||
[PlcLegacy, PlcEXRT]
|
||||
FPdSIGMA_12k = 0x43,
|
||||
/// <summary>
|
||||
/// FP-Sigma 32k
|
||||
/// FP-SIGMA 32k
|
||||
/// </summary>
|
||||
[PlcLegacy, PlcEXRT]
|
||||
FPdSIGMA_32k = 0x44,
|
||||
/// <summary>
|
||||
/// FP-SIGMA 16k
|
||||
/// FP-SIGMA 16k or FP-SIGMA 40k
|
||||
/// </summary>
|
||||
[PlcLegacy, PlcEXRT]
|
||||
FPdSIGMA_16k = 0xE1,
|
||||
FPdSIGMA_16k_OR_FPdSIGMA_40k = 0xE1,
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user