Huge thanks man, it worked now! But, if I kill both windows from mpf game engine window with kill command CRTL + C, it kill both windows and my COM4 connection and can't work anymore untill I boot my Cobrapin connection. But, when I terminate my MPF MC window with mouse in right corner, it kill game engine also, and I can start it again normally command mpf both! It might be my code, because this part I have tested yet. I haven't even checked how those both should stop in right way :)
2022-10-05 11:35:27,608 : INFO : YamlMultifileConfigLoader : Machine config file #1: config.yaml
2022-10-05 11:35:27,608 : INFO : ConfigProcessor : Loading config from cache: C:\Users\aslak\AppData\Local\Temp\a0da40bb4ac72fc142af0ef80a717128.mpf_cache
2022-10-05 11:35:27,687 : INFO : ConfigProcessor : Loading config from cache: C:\Users\aslak\AppData\Local\Temp\d1a7ca7de8681a6a2bb3dff017b23ec0.mpf_cache
2022-10-05 11:35:27,687 : INFO : ConfigProcessor : Loading config from cache: C:\Users\aslak\AppData\Local\Temp\316ffff2cd22eae9acf8e1247f7fc240.mpf_cache
2022-10-05 11:35:27,687 : INFO : Machine : Mission Pinball Framework Core Engine v0.56.0-dev33
2022-10-05 11:35:27,687 : INFO : Machine : Command line arguments: {'no_load_cache': False, 'create_config_cache': True, 'bcp': True, 'configfile': ['config.yaml'], 'force_assets_load': False, 'jsonlogging': False, 'logfile': 'logs\\2022-10-05-11-35-27-mpf-DESKTOP-H96JD62.log', 'pause': False, 'production': False, 'text_ui': True, 'loglevel': 15, 'consoleloglevel': 20, 'force_platform': None, 'syslog_address': None, 'mc_file_name': None, 'no_sound': False}
2022-10-05 11:35:27,687 : INFO : Machine : MPF path: C:\Users\aslak\.local\pipx\venvs\mpf\lib\site-packages\mpf
2022-10-05 11:35:27,687 : INFO : Machine : Machine path: C:\pinball\your_machine
2022-10-05 11:35:27,687 : INFO : Machine : Platform: win32
2022-10-05 11:35:27,687 : INFO : Machine : Python executable location: C:\Users\aslak\.local\pipx\venvs\mpf\Scripts\python.exe
2022-10-05 11:35:27,687 : INFO : Machine : Python version: 3.9.13 (64-bit)
2022-10-05 11:35:27,687 : INFO : Machine : Initialise MPF.
2022-10-05 11:35:27,843 : INFO : OPP : Connecting to com4 at 115200bps
2022-10-05 11:35:27,952 : INFO : OPP : Init of OPP board 0 done
2022-10-05 11:35:27,952 : INFO : OPP : Connecting to com5 at 115200bps
2022-10-05 11:36:16,256 : INFO : Machine : Starting the main run loop.
2022-10-05 11:36:16,257 : INFO : Machine : Shutting down...
2022-10-05 11:36:16,258 : INFO : EventManager : Event: ======'shutdown'====== Args={}
2022-10-05 11:36:16,268 : ERROR : OPP : Stop called on serial connection com4
2022-10-05 11:36:17,279 : INFO : root : MPF run loop ended.