fluisgirardi / pascalscada Goto Github PK
View Code? Open in Web Editor NEWPascalSCADA for Lazarus
Home Page: http://www.pascalscada.com
License: GNU Lesser General Public License v2.1
PascalSCADA for Lazarus
Home Page: http://www.pascalscada.com
License: GNU Lesser General Public License v2.1
PascalSCADA 1.0 - A multiplatform SCADA framework for Lazarus These components allow stabilish communications with Modbus RTU, Modbus TCP, Siemens PLC and Mitsubish Melsec devices in a easy way (this means: without write code), through window controls (buttons, sliders, animations), tags, protocol drivers and port drivers, without lose advanced features that you can implement using code. This code is a entire rewrite of PascalSCADA hosted at https://sourceforge.net/projects/pascalscada. The main goal of this initiative is: 1) Fix some design shortcomings of the actual version of PascalSCADA (0.7.3). A example is the low number of tags that can be inserted in a project form in design time. For more then 1000 tags per form or datamodule, you should create tags in runtime, via source code. 2) Performance, performance and more performance. 3) Split some interfaces that has more than one function. By example IHMIInterface, that handles security for HMI controls and serves as Tag interface. 4) Improve the translation, using .PO files instead of language defines; 5) Improve the project modularization 6) Extend the security system to all standard controls of Lazarus This code is under modified LGPL (see LICENSE.modifiedLGPL.txt). This means that you can link this library inside your programs for any purpose. Only the included part of the code must remain LGPL. If you make some improvements to this library, please create a new issue and attach the patch of your changes. Contact : fabio at pascalscada.com
Warning: other unit files search path (aka unit path) of "zcomponent 8.0" contains "C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\zeosdbo\src\component", which belongs to package "zcomponentdesign"
编译软件包pascalscada_db 0.7.7: 退出代码1,错误: 1
ZPropertyEditor.pas(70,5) Fatal: 不能找到PropEdits 由 ZPropertyEditor 使用. 确保员工软件包的所有ppu文件在它的输出目录中。 ppu在错误目录=d:\lazarus\components\ideintf\units\x86_64-win64\win32\propedits.ppu. 清理软件包"IDEIntf"..
Do you have demo of SCALE PROCESSORS ?
userScale : input aways is 0 .
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;
in unit 'pascalscada.protocols.customprotocol.pas'
procedure TpSCADACustomProtocol.TagScanTick;
var
list: TpSCADAThreadTagAddressInfoList.TpSCADAGenericThreadListType;
i: Integer;
begin
if Assigned(FTagList) then begin
list:=FTagList.LockList;
try
{irrelevant code}
finally
FTagList.LockList; {<--- this should be UnLockList}
end;
end;
end;
SerialPortDriver1 -> ModBusRTUDriver1 -> PLCTagNumber1 -> HMILabel1 .
It can be work , but when com1 is error , for example : other program use this com1 .
my code is below :
try
SerialPortDriver1.ComPort := cbbComName1.Text
except
on E:Exception do
begin
PLCTagNumber1.AutoRead := False;
PLCTagNumber1.Write(-1);
end;
end;
PLCTagNumber1 always show last number , not 0.0 or -1 ;
why ?
消息(&M),警告:10,提示:8
Warning: other unit files search path (aka unit path) of "zcomponentdesign 8.0" contains "C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\zeosdbo\src\component", which belongs to package "zcomponent"
Warning: other unit files search path (aka unit path) of "zcomponent 8.0" contains "C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\zeosdbo\src\component", which belongs to package "zcomponentdesign"
Note: 重复单元 "" 在 "pascalscada_db 0.7.7", ppu="C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\PascalSCADA\lib\x86_64-win64-win32\usrmgnt_login.ppu", source="C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\PascalSCADA\lib\x86_64-win64-win32\usrmgnt_login.lfm"
Note: 重复单元 "usrmgnt_login" 在 "pascalscada_hmi 0.7.7", ppu="C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\PascalSCADA\lib\x86_64-win64-win32\usrmgnt_login.ppu", source="C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\PascalSCADA\src\hmi\usrmgnt_login.pas"
Note: 重复单元 "" 在 "pascalscada_db 0.7.7", ppu="C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\PascalSCADA\lib\x86_64-win64-win32\unumerickeyboard.ppu", source="C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\PascalSCADA\lib\x86_64-win64-win32\unumerickeyboard.lfm"
Note: 重复单元 "unumerickeyboard" 在 "pascalscada_hmi 0.7.7", ppu="C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\PascalSCADA\lib\x86_64-win64-win32\unumerickeyboard.ppu", source="C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\PascalSCADA\src\hmi\unumerickeyboard.pas"
Note: 重复单元 "" 在 "pascalscada_db 0.7.7", ppu="C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\PascalSCADA\lib\x86_64-win64-win32\ualfakeyboard.ppu", source="C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\PascalSCADA\lib\x86_64-win64-win32\ualfakeyboard.lfm"
Note: 重复单元 "ualfakeyboard" 在 "pascalscada_hmi 0.7.7", ppu="C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\PascalSCADA\lib\x86_64-win64-win32\ualfakeyboard.ppu", source="C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\PascalSCADA\src\hmi\ualfakeyboard.pas"
Note: 重复单元 "" 在 "pascalscada_db 0.7.7", ppu="C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\PascalSCADA\lib\x86_64-win64-win32\tagstatuslist.ppu", source="C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\PascalSCADA\lib\x86_64-win64-win32\tagstatuslist.lfm"
Note: 重复单元 "tagstatuslist" 在 "pascalscada_hmi 0.7.7", ppu="C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\PascalSCADA\lib\x86_64-win64-win32\tagstatuslist.ppu", source="C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\PascalSCADA\src\hmi\tagstatuslist.pas"
Warning: Duplicate file "tagstatuslist.lfm" in "pascalscada_db 0.7.7", path="C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\PascalSCADA\lib\x86_64-win64-win32\tagstatuslist.lfm"
Warning: Duplicate file "tagstatuslist.lfm" in "pascalscada_hmi 0.7.7", path="C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\PascalSCADA\src\hmi\tagstatuslist.lfm"
Warning: Duplicate file "ualfakeyboard.lfm" in "pascalscada_db 0.7.7", path="C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\PascalSCADA\lib\x86_64-win64-win32\ualfakeyboard.lfm"
Warning: Duplicate file "ualfakeyboard.lfm" in "pascalscada_hmi 0.7.7", path="C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\PascalSCADA\src\hmi\ualfakeyboard.lfm"
Warning: Duplicate file "unumerickeyboard.lfm" in "pascalscada_db 0.7.7", path="C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\PascalSCADA\lib\x86_64-win64-win32\unumerickeyboard.lfm"
Warning: Duplicate file "unumerickeyboard.lfm" in "pascalscada_hmi 0.7.7", path="C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\PascalSCADA\src\hmi\unumerickeyboard.lfm"
Warning: Duplicate file "usrmgnt_login.lfm" in "pascalscada_db 0.7.7", path="C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\PascalSCADA\lib\x86_64-win64-win32\usrmgnt_login.lfm"
Warning: Duplicate file "usrmgnt_login.lfm" in "pascalscada_hmi 0.7.7", path="C:\Users\kerwin\AppData\Local\lazarus\onlinepackagemanager\packages\PascalSCADA\src\hmi\usrmgnt_login.lfm"
编译软件包pascalscada_db 0.7.7: 退出代码1,错误: 1
ZPropertyEditor.pas(70,5) Fatal: 不能找到PropEdits 由 ZPropertyEditor 使用. 确保员工软件包的所有ppu文件在它的输出目录中。 ppu在错误目录=D:\lazarus\components\ideintf\units\x86_64-win64\win32\propedits.ppu. 清理软件包"IDEIntf"..
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.