[Tutor] Tkinter and threading
Marco Soldavini
magyar1886 at gmail.com
Thu Jun 2 16:01:16 EDT 2016
Thanks for you answers!
On Thu, Jun 2, 2016 at 6:39 PM, Peter Otten <__peter__ at web.de> wrote:
>> For example a state machine with a var state which can have some
>> discrete string values (like RUNNING, STOPPED, PAUSED, ABORTED, IDLE)
>> and a text element on the gui that reports that state.
>>
>> So a button cause a transition > the python loop (not the gui loop)
>> detects the transition and changes the state var value > the gui
>> refresh its value on screen.
>>
>> I wrote some code to try it without threading but it does not give the
>> expected result as it seems the button update status action is already
>> triggered. I am missing some basic point here
>
> Indeed your problem has nothing to do with threads.
>>
Yes i know it could be done without threads, but for study reason i
want to separate the logic from representation (the HMI). That's how
usually program industrial machines. HMI serves only to display and
change variables, not to execute logic.
I want to build a mockup of a machine I saw at work, with statuses and alarms.
More information about the Tutor
mailing list