You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to get PascalSCADA to compile with both D7 and Tokyo. Except for the HMI stuff, I have managed the rest to compile.
While doing that, Tokyo highlighted a potential bug, or a logical error in 2 routines.
Namely,
in function TMelsecDriver.DoRead()
if FRemainingBytes > 0 then begin
res := PCommPort.IOCommandSync(iocRead, 0, nil, FRemainingBytes, DriverID, 0, @IOResult2, starts, ends);
if res <> 0 then begin
IOResult1.BufferToRead := ConcatenateBytes(IOResult1.BufferToRead, IOResult2.BufferToRead);
IOResult1.Received := IOResult1.Received + IOResult2.Received;
if IOResult2.ReadIOResult <> iorOK then IOResult1.ReadIOResult := IOResult2.ReadIOResult;
end else Result := ioDriverError;
end;
Result := DecodePkg(IOResult1, values);
shouln't it be
if FRemainingBytes > 0 then begin
res := PCommPort.IOCommandSync(iocRead, 0, nil, FRemainingBytes, DriverID, 0, @IOResult2, starts, ends);
if res <> 0 then begin
IOResult1.BufferToRead := ConcatenateBytes(IOResult1.BufferToRead, IOResult2.BufferToRead);
IOResult1.Received := IOResult1.Received + IOResult2.Received;
if IOResult2.ReadIOResult <> iorOK then IOResult1.ReadIOResult := IOResult2.ReadIOResult;
Result := DecodePkg(IOResult1, values); <<<---- HERE
end else Result := ioDriverError;
end;
similarly
in function TMelsecDriver.DoWrite()
if FRemainingBytes > 0 then begin
res := PCommPort.IOCommandSync(iocRead, 0, nil, FRemainingBytes, DriverID, 0, @IOResult2);
if res <> 0 then begin
IOResult1.BufferToRead := ConcatenateBytes(IOResult1.BufferToRead, IOResult2.BufferToRead);
IOResult1.Received := IOResult1.Received + IOResult2.Received;
if IOResult2.ReadIOResult <> iorOK then IOResult1.ReadIOResult := IOResult2.ReadIOResult;
end else Result := ioDriverError;
end;
Result := DecodePkg(IOResult1, tempValues);
end else Result := ioEmptyPacket;
shouln't it be
if FRemainingBytes > 0 then begin
res := PCommPort.IOCommandSync(iocRead, 0, nil, FRemainingBytes, DriverID, 0, @IOResult2);
if res <> 0 then begin
IOResult1.BufferToRead := ConcatenateBytes(IOResult1.BufferToRead, IOResult2.BufferToRead);
IOResult1.Received := IOResult1.Received + IOResult2.Received;
if IOResult2.ReadIOResult <> iorOK then IOResult1.ReadIOResult := IOResult2.ReadIOResult;
Result := DecodePkg(IOResult1, tempValues); <<<---- HERE
end else Result := ioDriverError;
end;
end else Result := ioEmptyPacket;
The text was updated successfully, but these errors were encountered:
Thanks by your feedback. Please attach the patch with these changes.
If you can, send me the entire package that you have modified to work with latest delphi versions, to share it with others.
This page is for the new version, that's not ready yet. So, if you found new issues related with 0.7.x versions, report it on Sourceforge ( https://sourceforge.net/projects/pascalscada/ ), and in last cases, here. For now, continue this issue here.
I am trying to get PascalSCADA to compile with both D7 and Tokyo. Except for the HMI stuff, I have managed the rest to compile.
While doing that, Tokyo highlighted a potential bug, or a logical error in 2 routines.
Namely,
in function TMelsecDriver.DoRead()
shouln't it be
similarly
in function TMelsecDriver.DoWrite()
shouln't it be
The text was updated successfully, but these errors were encountered: