Auto: ablegacy-2 — MicroLogix function-file letters

Closes #245
This commit is contained in:
Joseph Doherty
2026-04-25 13:32:23 -04:00
parent ccf2e3a9c0
commit f2bc36349e
4 changed files with 171 additions and 6 deletions
@@ -10,7 +10,8 @@ public sealed record AbLegacyPlcFamilyProfile(
int MaxTagBytes,
bool SupportsStringFile,
bool SupportsLongFile,
bool OctalIoAddressing)
bool OctalIoAddressing,
bool SupportsFunctionFiles)
{
public static AbLegacyPlcFamilyProfile ForFamily(AbLegacyPlcFamily family) => family switch
{
@@ -27,7 +28,8 @@ public sealed record AbLegacyPlcFamilyProfile(
MaxTagBytes: 240, // SLC 5/05 PCCC max packet data
SupportsStringFile: true, // ST file available SLC 5/04+
SupportsLongFile: true, // L file available SLC 5/05+
OctalIoAddressing: false); // SLC500 I:/O: indices are decimal in RSLogix 500
OctalIoAddressing: false, // SLC500 I:/O: indices are decimal in RSLogix 500
SupportsFunctionFiles: false); // SLC500 has no function files
public static readonly AbLegacyPlcFamilyProfile MicroLogix = new(
LibplctagPlcAttribute: "micrologix",
@@ -35,7 +37,8 @@ public sealed record AbLegacyPlcFamilyProfile(
MaxTagBytes: 232,
SupportsStringFile: true,
SupportsLongFile: false, // ML 1100/1200/1400 don't ship L files
OctalIoAddressing: false); // MicroLogix follows SLC-style decimal I/O addressing
OctalIoAddressing: false, // MicroLogix follows SLC-style decimal I/O addressing
SupportsFunctionFiles: true); // ML 1100/1400 expose RTC/HSC/DLS/MMI/PTO/PWM/STI/EII/IOS/BHI
public static readonly AbLegacyPlcFamilyProfile Plc5 = new(
LibplctagPlcAttribute: "plc5",
@@ -43,7 +46,8 @@ public sealed record AbLegacyPlcFamilyProfile(
MaxTagBytes: 240, // DF1 full-duplex packet limit at 264 bytes, PCCC-over-EIP caps lower
SupportsStringFile: true,
SupportsLongFile: false, // PLC-5 predates L files
OctalIoAddressing: true); // RSLogix 5 displays I:/O: word + bit indices as octal
OctalIoAddressing: true, // RSLogix 5 displays I:/O: word + bit indices as octal
SupportsFunctionFiles: false);
/// <summary>
/// Logix ControlLogix / CompactLogix accessed through the legacy PCCC compatibility layer.
@@ -56,7 +60,8 @@ public sealed record AbLegacyPlcFamilyProfile(
MaxTagBytes: 240,
SupportsStringFile: true,
SupportsLongFile: true,
OctalIoAddressing: false); // Logix natively uses decimal arrays even via the PCCC bridge
OctalIoAddressing: false, // Logix natively uses decimal arrays even via the PCCC bridge
SupportsFunctionFiles: false);
}
/// <summary>Which PCCC PLC family the device is.</summary>