Hello Guest it is April 18, 2024, 05:08:57 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - AutomaticInvest-worker1

Pages: 1
1

Hello,

  I would have a question related to adding VB code to a button on a Mach3 screen

  If the code of the button is

LoadFile("C:\Mach3\GCode\code2.tap")
RunFile()

  then only the loading will be done, without running the code of the loaded file


  But if the code is

LoadFile("C:\Mach3\GCode\code2.tap")
Sleep(3000)
RunFile()

  the after the file is loaded, it is soon also run, after about 3 seconds

  which tells me that it is needed to wait for the loading to finish before it can be run

  So, with this in mind I modified the code to

LoadFile("C:\Mach3\GCode\code2.tap")
While (IsLoading())
   Sleep(100)
Wend
RunFile()

  where the while loop runs until loading is complete, but I get the same problem as with the 2 lines of code shown above, that is the same as with

LoadFile("C:\Mach3\GCode\code2.tap")
RunFile()

  Can somebody explain me how to get the file running after loading ?

  -- regards

Pages: 1