Closed
Description
Hi everyone,
Is there a way to read integer types (INT, DINT, LINT) as boolean arrays?
I am using the following code:
var bit = new Tag<BoolPlcMapper, bool>()
{
Name = "ALARMS_GENERAL.SeriuosAlarms.0",
Gateway = "172.27.7.205",
Path = "1,0",
PlcType = PlcType.ControlLogix,
Protocol = Protocol.ab_eip,
Timeout = TimeSpan.FromSeconds(5)
};
Console.WriteLine($"{bit.Name} value: {bit.Read()}.");
var array = new Tag<BoolPlcMapper, bool[]>()
{
Name = $"ALARMS_GENERAL.SeriuosAlarms",
Gateway = "172.27.7.205",
Path = "1,0",
ArrayDimensions = new int[] { 64 },
PlcType = PlcType.ControlLogix,
Protocol = Protocol.ab_eip,
Timeout = TimeSpan.FromSeconds(5)
};
Console.WriteLine($"{array.Name} value: {array.Read()}.");
ALARMS_GENERAL.SeriuosAlarms is a LINT variable, I can correctly read single bits, but i cannot read the LINT as bool array. The array initializer method raises an exception and returns ErrorOutOfBounds.
Any help would be greatly appreciated,
Thanks in advance
Metadata
Metadata
Assignees
Labels
No labels