Click here to Skip to main content
15,908,776 members

Comments by Georg Kohler (Top 22 by date)

Georg Kohler 22-Oct-23 23:55pm View    
it would not let me post this initially
below is the error message

=== Pre-bind state information ===
LOG: DisplayName = Cognex.Explorer.Support, Version=5.4.471.0, Culture=neutral, PublicKeyToken=6b9774afddb09935
 (Fully-specified)
LOG: Appbase = file:///C:/DEV2_KOHLER/_KDM_DEV/_KDM20_5717_TUBEWELDER/bin/
LOG: Initial PrivatePath = NULL
Calling assembly : Cognex.InSight, Version=5.4.471.0, Culture=neutral, PublicKeyToken=6b9774afddb09935.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\DEV2_KOHLER\_KDM_DEV\_KDM20_5717_TUBEWELDER\bin\Kohler Motion Control.vshost.exe.Config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Cognex.Explorer.Support, Version=5.4.471.0, Culture=neutral, PublicKeyToken=6b9774afddb09935
LOG: Attempting download of new URL file:///C:/DEV2_KOHLER/_KDM_DEV/_KDM20_5717_TUBEWELDER/bin/Cognex.Explorer.Support.DLL.
LOG: Attempting download of new URL file:///C:/DEV2_KOHLER/_KDM_DEV/_KDM20_5717_TUBEWELDER/bin/Cognex.Explorer.Support/Cognex.Explorer.Support.DLL.
LOG: Attempting download of new URL file:///C:/DEV2_KOHLER/_KDM_DEV/_KDM20_5717_TUBEWELDER/bin/Cognex.Explorer.Support.EXE.
LOG: Attempting download of new URL file:///C:/DEV2_KOHLER/_KDM_DEV/_KDM20_5717_TUBEWELDER/bin/Cognex.Explorer.Support/Cognex.Explorer.Support.EXE.
Georg Kohler 13-Feb-18 20:48pm View    
I did change it as suggested and it started acting like one would expect .. in the end I changed the calling Thread so that I now can wait direct for the flag without using async calls at all - I feel a lot better about this approach - & but I did learn something :-)
Thanks !
Georg Kohler 13-Feb-18 15:50pm View    
Isn't that what i already had ? .. I must have missed something
-I'll give it a try and let you know
Georg Kohler 13-Feb-18 14:05pm View    
Another Method following the Wait_move

Problem is timing as the wait might be very short (5ms is what i see now)
I could use a simple loop with a delay in the main thread but that makes it unresponsive with short delays (using sleep)
I was hoping for a cleaner solution :-)

"doSomething" is just for me to cancel the move if something goes wrong
Georg Kohler 13-Feb-18 13:09pm View    
Ismoving is modified by another thread that's handling the moving of the axis.
After commanding the axis there is a short delay before they actually start usually a few ms but if we never start the move the main thread is the only thing that can stop the process (by pushing the stop button on the GUI and canceling out of the wait loop)

We do like to pick up the change of the isMoving flag as fast as possible because the move might be super short (10 ms or so)

Async call seemed the right thing to do (if it worked)

I know it's not working because the next method is called before the wait task finished - even after reading trough hours of online pages I really don't understand how this actually works ..

Any ideas on how to accomplish this without blocking the main thread 
I'm open to any ideas