Hi all,

As I’m currently going through things that I addressed in my fork, I came 
across the fact that in my fork I treat:

%DB42:28.0:BYTE[4]

As reading one byte at index 4 … however I think some of our drivers interpret 
is as „read an array of 4 bytes“.

I decided to go with the IEC standard of:

%DB42:28.0:BYTE[0..7]

Providing the start and end index of the elements I want.
As some languages allow non-0 starts I define these as:

%DB42:28.0:BYTE[4..7]

If the offset is known by the driver.
If the offset is not kown by the driver and it is not provided, then it assumes 
the start is at 0
However I can pass in the start index for cases where the driver doesn’t know 
and it’s not 0

%DB42:28.0:BYTE[4..7;1]

And I should mention, that in case of non-0 arrays, this also helps:

%DB42:28.0:BYTE[4;1]

So … should we apply this to all drivers?

Chris

Reply via email to