Start read by name loop.: reads the vUINT variable synchronously (by variable name) in a For loop (duration approx.Start write loop.: writes the vUINT variable synchronously (by address) in a For loop (duration approx.Start read loop.: reads the vUINT variable synchronously (by address) in a For loop (duration approx.The following actions are started with a mouse click on the corresponding buttons: Using File -> New, a new ADS-Client connection and the associated GUI windows can be created. Start the associated PLC project Sample.pro and MDIAPP.exe. However, other synchronization mechanisms can also be used. As a result, the main thread was decoupled from the ADS threads. ![]() The Child window functions were similarly implemented in a separate unit: CHILDWIN.PAS / CHILDWIN.DFM.Ĭommunication between the GUI (Child window) and the ADS thread was realized with the aid of WM messages (PostThreadMessage/SendMessage functions). ![]() The ADS thread functions were implemented in a separate unit: AdsThread.pas. The application can be used as a starting point for your own implementations. ![]() The application demonstrates how ADS function calls (longer actions) can be outsourced to a separate thread without blocking the main thread. Each Child window (GUI) has its own ADS thread (ADS port for data communication) in which the extended ADS functions are called. The application is a simple Delphi-MDI application. Sample with extended functions (for multithreaded applications)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |