Jump to content

shineworld

Members
  • Content Count

    282
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by shineworld


  1. Interesting and disheartening in the same way.


    Over the past 7 years, I have created an entire CNC ecosystem from logic boards to CNC control software running on Windows OS

    done entirely in Delphi (well it runs without any problem, and in some bought even better, in Linux environment under Wine,

    at least as far as memory management is concerned).

    For OPC UA server management I have already sketched out something following the OPC 40502 standard (OPC UA for Computerized Numerical Control (CNC) Systems),

    initially using Python opcua but then switched to a program external to Delphi made with QT.

    Not having native handling in Delphi makes things quite complex for me, and I have to do everything with an additional TCP layer between the two processes to exchange information, events, etc.

    I am precisely looking for a way to avoid all this and keep everything in one language and process.


  2. Hi all.

    I need to implement an OPC UA Server in a Delphi program.

    Actually, I've used an external QT C++ application to do OPC UA things but is complex to

    maintain changes in the server and share an interface between this external program and the main program written with Delphi

    and I would like to know if there is a valid native Delphi library to use, better if open-source, but this is not mandatory.

     

    Thank you for your suggestions.

     


  3. 13 minutes ago, mvanrijnen said:
    8 minutes ago, mvanrijnen said:

    Just a quick question is the 16Mb limit still valid for the tool?

    I'm not an expert with PDB but that is what I've done and now seems to work:
     

    - Installed the latest version of VTune Profiler (2023.1.0).
    - Changed the original amplxe_media140.dll with an old version from Jan Rysavy (previous posts).
    - Enabled map in Detailed mode.
    - Compiled a project of 1.359.947 code lines (including library sources) which generate a map file of 49.696.190 bytes.
    - Executed map2pdb.exe rosettacncpph1.64.map -bind -v

    D:\x\develop\qem\rosetta_cnc_1>map2pdb.exe rosettacncpph1.64.map -bind -v
    map2pdb - Copyright (c) 2021 Anders Melander
    Version 2.8.0
    
    Constructed a new PDB GUID: {F2D8CB4B-DA08-4BBD-A399-DBC449AF1364}
    Output filename not specified. Defaulting to rosettacncpph1.64.pdb
    Reading MAP file
    - Segments
    - Modules
    - Symbols
    Warning: [116390] Failed to resolve symbol to module: [0004:00000000000002C8] SysInit.TlsLast
    Warning: [116392] Failed to resolve symbol to module: [0003:00000000FE7F6000] SysInit.__ImageBase
    - Line numbers
    Collected 3.996 modules, 182.925 symbols, 525.223 lines, 985 source files
    Constructing PDB file
    - Collecting source file names
    - Module streams
    - Strings stream
    - PDB Info stream
    - TPI stream
    - Symbols stream
    - DBI stream
    - IPI stream
    - Finalizing PDB file
    - 9.068 blocks written in 3 intervals
    PE filename not specified. Defaulting to rosettacncpph1.64.exe
    Patching PE file
    - PE32+ image (64-bit)
    - Adding .debug section.
    - PDB file name has been stored in debug data.
    - PE file has been updated.
    Elapsed time: 00:00:00.895

    This has generated a PDB file of 37.142.528 bytes

    - Started profiling of EXE in VTune profiler which generates this log at the profiling stop:

    Data collection is completed successfully
    
    May 22 2023 18:06:59 The result file 'XXX\r001hs\r001hs.vtune' is successfully created and added to the project .
    
    Finalization completed with warnings
    
    May 22 2023 18:08:33 Result finalization has completed with warnings that may affect the representation of the analysis data. Please see details below.
    
    Cannot locate debugging information for file `C:\WINDOWS\System32\msvcrt.dll'.
    Cannot locate debugging information for file `C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e\COMCTL32.dll'.
    Cannot locate debugging information for file `C:\WINDOWS\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.19041.2251_none_91a40448cc8846c1\gdiplus.dll'.
    Cannot locate debugging information for file `C:\WINDOWS\SYSTEM32\ntdll.dll'.
    Cannot locate debugging information for file `C:\WINDOWS\System32\GDI32.dll'.
    Cannot locate debugging information for file `C:\WINDOWS\System32\SETUPAPI.DLL'.
    Cannot locate debugging information for file `C:\WINDOWS\System32\KERNEL32.DLL'.
    Cannot locate debugging information for file `C:\WINDOWS\System32\cfgmgr32.dll'.
    Cannot locate debugging information for file `C:\WINDOWS\System32\gdi32full.dll'.
    Cannot locate debugging information for file `C:\Program Files\Bitdefender\Endpoint Security\bdhkm\dlls_266262988153465131\bdhkm64.dll'.
    Cannot locate debugging information for file `C:\WINDOWS\System32\user32.dll'.
    Cannot locate debugging information for file `C:\WINDOWS\System32\combase.dll'.
    Cannot locate debugging information for file `C:\Program Files\Bitdefender\Endpoint Security\atcuf\dlls_266575548366517634\atcuf64.dll'.
    Cannot locate debugging information for file `C:\WINDOWS\system32\mswsock.dll'.
    Cannot locate debugging information for file `C:\WINDOWS\system32\uxtheme.dll'.
    Cannot locate debugging information for file `C:\WINDOWS\System32\ole32.dll'.
    Cannot locate debugging information for file `C:\WINDOWS\SYSTEM32\opengl32.dll'.
    Cannot locate debugging information for file `C:\WINDOWS\SYSTEM32\DEVOBJ.dll'.
    Cannot locate debugging information for file `C:\WINDOWS\System32\KERNELBASE.dll'.
    Cannot locate debugging information for file `C:\WINDOWS\SYSTEM32\TextShaping.dll'.
    Cannot locate debugging information for file `C:\Windows\System32\msxml6.dll'.
    Cannot locate debugging information for file `C:\WINDOWS\System32\WS2_32.dll'.
    Cannot locate debugging information for file `C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_c1a085cc86772d3f\nvoglv64.dll'.
    Cannot locate debugging information for file `C:\WINDOWS\SYSTEM32\HID.DLL'.
    Cannot locate debugging information for file `C:\WINDOWS\System32\win32u.dll'.
    Cannot locate debugging information for file `C:\Program Files (x86)\Intel\oneAPI\vtune\latest\bin64\tpsstool.dll'.:

    And all symbols project symbols are visible (not for below list of DLL):
    image.thumb.png.379a0032676cb7178ad974109308ea1b.png






  4. 2 hours ago, Jan Rysavy said:

     

    I can confirm replacing C:\Program Files (x86)\Intel\oneAPI\vtune\2023.1.0\bin64\amplxe_msdia140.dll (version 14.34.31942.0) with version 14.28.29910.0 from VTune 2022.4.1 solves this problem!

    Can you attach the working DLL to try ?

     


  5. 9 minutes ago, Jan Rysavy said:

    I just want to add that I installed an older version of VTune 2022.4.1 and the function names are displayed correctly. The problem seems to be related to the new version VTune 2023.1.

    I've tried to find a way to download the older version (2022.4.1) but no way found on the intel VTune pages....


  6. Incredible tool, congrats.


    I've tried to use it with Sydney 10.4.1 and VTune 2023.1.0.
     

    Unfortunately, I was not able to get the function as name, I get only func addresses:
    image.thumb.png.829647b085ce0c09b7d8e2041edbc34f.png

     

    I've tried with:

    D:\x\develop\qem\rosetta_cnc_1>map2pdb.exe rosettacncpph1.64.map -bind
    map2pdb - Copyright (c) 2021 Anders Melander
    Version 2.8.0

    and also with:

    D:\x\develop\qem\rosetta_cnc_1>map2pdb.exe -bind rosettacncpph1.64.map
    map2pdb - Copyright (c) 2021 Anders Melander
    Version 2.8.0

    Map is set to Detailed on Sydney 10.4.1:
    image.thumb.png.c7ddcff82caf64eba091f142282eaeb7.png

     

    D:\x\develop\qem\rosetta_cnc_1>map2pdb.exe rosettacncpph1.64.map -bind -v
    map2pdb - Copyright (c) 2021 Anders Melander
    Version 2.8.0
    
    Constructed a new PDB GUID: {5D8591F1-8F38-4E7B-BAE4-1BB55536733F}
    Output filename not specified. Defaulting to rosettacncpph1.64.pdb
    Reading MAP file
    - Segments
    - Modules
    - Symbols
    Warning: [116390] Failed to resolve symbol to module: [0004:00000000000002C8] SysInit.TlsLast
    Warning: [116392] Failed to resolve symbol to module: [0003:00000000FE7F6000] SysInit.__ImageBase
    - Line numbers
    Collected 3.996 modules, 182.925 symbols, 525.223 lines, 985 source files
    Constructing PDB file
    - Collecting source file names
    - Module streams
    - Strings stream
    - PDB Info stream
    - TPI stream
    - Symbols stream
    - DBI stream
    - IPI stream
    - Finalizing PDB file
    - 9.068 blocks written in 3 intervals
    PE filename not specified. Defaulting to rosettacncpph1.64.exe
    Patching PE file
    - PE32+ image (64-bit)
    - Adding .debug section.
    - PDB file name has been stored in debug data.
    - PE file has been updated.
    Elapsed time: 00:00:00.874

     

    I hope you have a simple solution to my possible mistakes.


  7. Your argument lines up right doesn't make a dent.
    In fact, beyond describing the reasons, we went no further and paid what was due.

    At the company there are no constraints on what one does in one's free time between lunch breaks, and the company has been favorably disposed to those who devote that time to opensource projects that do not conflict with company business, so I have never had a problem collaborating with the Linux project (support embeded boards), or .net-based projects.

    At the end of it all, I left the open world of Delphi and devote myself to other projects with Linux, FreePascal and .NET.
     

    • Like 1

  8. On the use of the community license, my advice is to be very careful about what you do.
    I bring them my case.
    At home, on my personal notebook I had installed the community version of Delphi, it was the Rio, to work on an open-source project, GLSCENE.

    Since I have little time at home to develop I, unhappily, thought of taking advantage of the hour and a half of free time for lunch break I have at the office, to continue development on my personal notebook BUT attached to the company WIFI network to access the sources, do push and everything else.

    Well after a month or so I got a tethered notification from Embarcadero, that according to their logs, Community sends logs of what files you compile, when you compile, what network and domain you are working on, my company was not using Community intebitually for application development while earning over 5000E. The email came directly to the company by going back to the company's internet domain data.

    There was no way to make it clear, even after sending the project report I worked on, that it was not of company interest but personal, about it being my personal laptop, etc.

    Moral of the story, they gave me a number of days to purchase the full Architect product (the most expensive formula) or legal action would start.

    The company covered the cost, thankfully.

    Be careful where you connect with terminals....
    Since then never again a Community product and since I personally cannot buy Licensed products at those prices, I now participate in open-source projects with other environments and languages.
     

    • Like 2
    • Thanks 2
    • Confused 1
    • Sad 2

  9. Unfortunately does not work 😞

    I've started the update downloaded from Getit, which required a full uninstall to start.

    After full uninstall at the start of installation I got this message:
    image.png.18b2b911c85fbf654871a2782bb20ef0.png

     

    So I've lost my primary development tool...

    Damn!


  10. Hi all,

    my subscription is expired but in GetIt Package Manager I notice that 10.4.2 Installer for earlier 10.4 Releases 1.0

    is active to Install:
    image.thumb.png.d54d1104c923b18a1f520ac4217ed4da.png

     

    Does it mean that regardless of the expired subscription program I can still upgrade the system from 10.4.1 to 10.4.2 ?

    Before starting the installation and to avoid losing a still working development environment I ask for info from the experts.

    Thanks

     


  11. Mmmmm.... seems that Canvas.FillText can't be used...

     

    image.thumb.png.4042bff8b065f59d95263f41b56ad0dc.png

     

    I'm not a guru on Python and DelphiFMX so I can mistake in anything but debugging:
     

    >>> import DelphiFMX as fmx
    >>> img = fmx.Image(None)
    >>> bmp = img.Bitmap
    >>> bmp.Handle
    >>> bmp.Width = 200
    >>> bmp.Height = 200
    >>> c = bmp.Canvas
    >>> r = fmx.RectF(0,0,10,10)
    >>> c.FillText(r, 'hello', True, 1, [], ['Center'], ['Center'])

    the FindMethod "find" FillRect and first ARect parameter in FMX is a Record when
    Python call to c.FillText manages R as a class so the arguments check stops at the first argument with an error.

     

    Waiting for GURU info 🙂


  12. Seems TTextAlign is not available in DelphiFMX library :

     

    Microsoft Windows [Versione 10.0.19045.2965]
    (c) Microsoft Corporation. Tutti i diritti sono riservati.

    P:\>pip list
    Package                Version
    ---------------------- ------------
    delphifmx              1.0.6

     
     
    NameError: name 'TTextAlign' is not defined
    Traceback (most recent call last):
      File "D:\x\develop\qem\cnc_api_client_core_1\python\api_client_fmx_demo\api_client_fmx_demo_desktop_view.py", line 692, in __on_timer_update
        canvas.FillText(r, 'hello world', False, 1, [], TTextAlign.Center, TTextAlign.Center)
                                                        ^^^^^^^^^^
    NameError: name 'TTextAlign' is not defined
     
    *** Remote Interpreter Reinitialized ***
    >>> import delphifmx as fmx
    >>> dir(fmx)
    ['Abort',
     'Action',
     'ActionList',
     'AdapterListView',
     'AniIndicator',
     'AppearanceListView',
     'Application',
     'Arc',
     'ArcDial',
     'BaseBindScopeComponent',
     'BaseLinkingBindSource',
     'BaseObjectBindSource',
     'BaseValueRange',
     'BasicAction',
     'BasicBindComponent',
     'BindComponentDelegate',
     'BindingsList',
     'BitmapTrackBar',
     'Bounds',
     'BufferedFileStream',
     'BufferedLayout',
     'Button',
     'BytesStream',
     'Calendar',
     'CalloutPanel',
     'CalloutRectangle',
     'CameraComponent',
     'CaretRectangle',
     'CheckBox',
     'CheckColumn',
     'Circle',
     'Collection',
     'ColorBox',
     'ColorButton',
     'ColorComboBox',
     'ColorListBox',
     'ColorPanel',
     'ColorPicker',
     'ColorQuad',
     'Column',
     'ComboBox',
     'ComboColorBox',
     'ComboEdit',
     'ComboEditBase',
     'CommonCustomForm',
     'Component',
     'ContainedAction',
     'ContainedActionList',
     'ContainedBindComponent',
     'Control',
     'ControlSize',
     'CornerButton',
     'CreateComponent',
     'CurrencyColumn',
     'CustomAction',
     'CustomActionList',
     'CustomBindingsList',
     'CustomBufferedLayout',
     'CustomButton',
     'CustomCalendar',
     'CustomColorComboBox',
     'CustomComboBox',
     'CustomComboEdit',
     'CustomControlAction',
     'CustomCornerButton',
     'CustomDateEdit',
     'CustomDateTimeEdit',
     'CustomEdit',
     'CustomEditBox',
     'CustomForm',
     'CustomGrid',
     'CustomLinkControlToField',
     'CustomLinkListControlToField',
     'CustomLinkPropertyToField',
     'CustomListBox',
     'CustomListView',
     'CustomMediaCodec',
     'CustomMediaPlayerAction',
     'CustomMemo',
     'CustomMemoryStream',
     'CustomMultiView',
     'CustomNumberColumn',
     'CustomPath',
     'CustomPopupForm',
     'CustomPopupMenu',
     'CustomPresentedFramedScrollBox',
     'CustomPresentedFramedVertScrollBox',
     'CustomPresentedHorzScrollBox',
     'CustomPresentedScrollBox',
     'CustomPresentedVertScrollBox',
     'CustomPrototypeBindSource',
     'CustomScrollBox',
     'CustomSwitch',
     'CustomTimeEdit',
     'CustomTrack',
     'CustomValueRange',
     'CustomValueRangeAction',
     'CustomViewAction',
     'DateColumn',
     'DateEdit',
     'DateTimeColumn',
     'DateTimeColumnBase',
     'DelphiDefaultContainer',
     'DelphiDefaultIterator',
     'DelphiMethod',
     'DialogService',
     'Edit',
     'Ellipse',
     'Expander',
     'ExpanderButton',
     'FMXBindNavigateAction',
     'FMXBindNavigateApplyUpdates',
     'FMXBindNavigateCancel',
     'FMXBindNavigateCancelUpdates',
     'FMXBindNavigateDelete',
     'FMXBindNavigateEdit',
     'FMXBindNavigateFirst',
     'FMXBindNavigateInsert',
     'FMXBindNavigateLast',
     'FMXBindNavigateNext',
     'FMXBindNavigatePost',
     'FMXBindNavigatePrior',
     'FMXBindNavigateRefresh',
     'FileExit',
     'FileHideApp',
     'FileHideAppOthers',
     'FileStream',
     'FloatColumn',
     'FlowLayout',
     'FmxObject',
     'Form',
     'Frame',
     'FramedScrollBox',
     'FramedVertScrollBox',
     'GetProcessDpiAwareness',
     'GlyphColumn',
     'GradientEdit',
     'Grid',
     'GridLayout',
     'GridPanelLayout',
     'GroupBox',
     'HandleStream',
     'HintAction',
     'HorzScrollBox',
     'IDABORT',
     'IDCANCEL',
     'IDCLOSE',
     'IDCONTINUE',
     'IDHELP',
     'IDIGNORE',
     'IDNO',
     'IDOK',
     'IDRETRY',
     'IDTRYAGAIN',
     'IDYES',
     'Image',
     'ImageColumn',
     'ImageControl',
     'IntegerColumn',
     'IsDpiAware',
     'Label',
     'Layout',
     'Line',
     'LinkControlDelegate',
     'LinkControlToField',
     'LinkControlToFieldDelegate',
     'LinkListControlToField',
     'LinkPropertyToField',
     'LinkPropertyToFieldDelegate',
     'ListBox',
     'ListBoxItem',
     'ListView',
     'ListViewBase',
     'MB_ABORTRETRYIGNORE',
     'MB_APPLMODAL',
     'MB_DEFBUTTON1',
     'MB_DEFBUTTON2',
     'MB_DEFBUTTON3',
     'MB_DEFBUTTON4',
     'MB_HELP',
     'MB_ICONASTERISK',
     'MB_ICONERROR',
     'MB_ICONEXCLAMATION',
     'MB_ICONHAND',
     'MB_ICONINFORMATION',
     'MB_ICONQUESTION',
     'MB_ICONSTOP',
     'MB_ICONWARNING',
     'MB_NOFOCUS',
     'MB_OK',
     'MB_OKCANCEL',
     'MB_RETRYCANCEL',
     'MB_SYSTEMMODAL',
     'MB_TASKMODAL',
     'MB_YESNO',
     'MB_YESNOCANCEL',
     'MainMenu',
     'Media',
     'MediaPlayer',
     'MediaPlayerControl',
     'MediaPlayerCurrentTime',
     'MediaPlayerPlayPause',
     'MediaPlayerStart',
     'MediaPlayerStop',
     'MediaPlayerValue',
     'MediaPlayerVolume',
     'Memo',
     'MemoryStream',
     'MenuBar',
     'MenuItem',
     'MultiView',
     'NumberBox',
     'Object',
     'ObjectViewAction',
     'OpenDialog',
     'PaintBox',
     'Panel',
     'PascalInterface',
     'PascalRecord',
     'Path',
     'PathLabel',
     'Persistent',
     'Pie',
     'Point',
     'PointF',
     'Popup',
     'PopupColumn',
     'PopupMenu',
     'Position',
     'PresentedFramedScrollBox',
     'PresentedFramedVertScrollBox',
     'PresentedHorzScrollBox',
     'PresentedListView',
     'PresentedScrollBox',
     'PresentedTextControl',
     'PresentedVertScrollBox',
     'ProgressBar',
     'ProgressColumn',
     'PrototypeBindSource',
     'RadioButton',
     'Rect',
     'RectF',
     'Rectangle',
     'ResourceStream',
     'RoundRect',
     'SaveDialog',
     'ScaledLayout',
     'Screen',
     'ScrollBar',
     'ScrollBox',
     'SearchBox',
     'Selection',
     'SelectionPoint',
     'SetHighDpiAware',
     'SetProcessDpiAwareness',
     'Shape',
     'Size',
     'SizeF',
     'SizeGrip',
     'SmallScrollBar',
     'SpeedButton',
     'SpinBox',
     'Splitter',
     'StatusBar',
     'Stream',
     'StringColumn',
     'StringGrid',
     'StringStream',
     'Strings',
     'StyleBook',
     'StyleManager',
     'StyleStreaming',
     'StyledControl',
     'Switch',
     'SysCommonAction',
     'TabControl',
     'TabItem',
     'Text',
     'TextControl',
     'Thumb',
     'TimeColumn',
     'TimeEdit',
     'Timer',
     'ToolBar',
     'Touch',
     'Track',
     'TrackBar',
     'ValueRange',
     'ValueRangeAction',
     'VarParameter',
     'VertScrollBox',
     'ViewAction',
     'VirtualKeyboard',
     'WindowClose',
     '__doc__',
     '__file__',
     '__loader__',
     '__name__',
     '__package__',
     '__spec__',
     'crAppStart',
     'crArrow',
     'crCross',
     'crDefault',
     'crDrag',
     'crHSplit',
     'crHandPoint',
     'crHelp',
     'crHourGlass',
     'crIBeam',
     'crMultiDrag',
     'crNo',
     'crNoDrop',
     'crNone',
     'crSQLWait',
     'crSize',
     'crSizeAll',
     'crSizeNESW',
     'crSizeNS',
     'crSizeNWSE',
     'crSizeWE',
     'crUpArrow',
     'crVSplit',
     'fmCreate',
     'fmOpenRead',
     'fmOpenReadWrite',
     'fmOpenWrite',
     'fmShareCompat',
     'fmShareDenyNone',
     'fmShareDenyRead',
     'fmShareDenyWrite',
     'fmShareExclusive',
     'ssAlt',
     'ssCtrl',
     'ssDouble',
     'ssLeft',
     'ssMiddle',
     'ssRight',
     'ssShift']
    >>> 

     

     


  13. OK Bitmap can be modified not, but I was not able to find how to use TCanvas.FillText with Python DelphiFMX.

    Any try to pass arguments give me:

    Traceback (most recent call last):
      File "D:\x\develop\qem\cnc_api_client_core_1\python\api_client_fmx_demo\api_client_fmx_demo_desktop_view.py", line 690, in __on_timer_update
        canvas.FillText(r, 'hello world', False, 100.0, None, 'Center', 'Center')
    TypeError: "FillText" called with invalid arguments.

     

            # update tab digital inputs/outputs values
            if self.TabControl.ActiveTab == self.TabDIO:
                bitmap = self.DIOImage.Bitmap
                bitmap.Width = int(self.DIOImage.Width)
                bitmap.Height = int(self.DIOImage.Height)
                bitmap.Clear(0xFF000000)
                canvas = bitmap.Canvas
                r = RectF(8 + 15, 10, bitmap.Width - 8, bitmap.Height - 10)
                # from delphi FMX documentation
                # procedure FillText(
                #       const ARect: TRectF;
                #       const AText: string;
                #       const WordWrap: Boolean;
                #       const AOpacity: Single;
                #       const Flags: TFillTextFlags;
                #       const ATextAlign: TTextAlign;
                #       const AVTextAlign: TTextAlign = TTextAlign.Center
                #   ); virtual;
                canvas.FillText(r, 'hello world', False, 100.0, None, 'Center', 'Center')


     


  14. Hi all.

    There is a way to modify Bitmap contents (actually create content) of a DelphiFMX Image.Bitmap to add a text ?

    I've tried:

                bitmap = self.DIOImage.Bitmap
                bitmap.Width = int(self.DIOImage.Width)
                bitmap.Height = int(self.DIOImage.Height)
                bitmap.Clear(0xFF000000)
                canvas = bitmap.Canvas
                r = RectF(8 + 15, 10, bitmap.Width - 8, bitmap.Height - 10)
                ??? canvas.FillText(r, 'Hello World', False, 100, 0, 0, 0) ???

    But the image remains EMPTY and doesn't show anything...

×