Hello Guest it is April 23, 2024, 08:04:51 AM

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.


Messages - Steffen_Engel

Pages: « 1 2 3 4 »
21
Mach SDK plugin questions and answers. / Re: Pluging and Macro interaction?
« on: December 23, 2009, 10:54:15 PM »
I think, VBA in a Plugin is not possible.

But the access to all of the Mach3-Functions you have in VBA you have in the plugin too. The only thing it is in C, not VBA.

eg
in VBA:
Code: [Select]
Call SetOEMDRO (818, GetOEMDRO (818) * 1.1)in C in aPlugin:

Quote
scripter.SetOEMDRO(818, scripter.GetOEMDRO (818) * 1.1);

VB should be possible, but not VBA I think.

In both cases you have to compile those scripts or you have to build your own interpreter.

That's all, not more, not less.

Bye, Steffen


22
Mach SDK plugin questions and answers. / Re: Pluging and Macro interaction?
« on: December 22, 2009, 12:23:43 AM »
Code in your Plugion is just a Plugin-Code.
All Functions available in Mach3-VBA are available to the plugin in the Mach3-Interface.


External calls to Macros in the xml I don't know.

Bye, Steffen

23
Mach SDK plugin questions and answers. / Re: Machine control via USB
« on: November 11, 2009, 11:20:28 AM »
I must say, I didn't check for the parameter usage and didn't check it for correct work, it's just from the Mach customization wiki, where you can get the P Q and R Parameter with Param1(), Param2() and Param3()

The part with the call to the DLL is checked, I use it in my Plugins.

For method with Param1 check the wiki

Good luck,

Steffen

24
Mach SDK plugin questions and answers. / Re: Machine control via USB
« on: November 11, 2009, 09:30:00 AM »
Hi Karsten,

the way I would do this:

use Macros in the G-Code for your parametersettings.

So as an example : switch Welding Current to 10 Amperes

M10001 P10

then there is a file M10001.m1s with the code

Code: [Select]
Declare Sub SetCurrent Lib "WeldControl" (ByVal Parameter1 As Double)
DIM Ampere as double

Ampere = Param1()

Call SetCurrent (Ampere)

And at last the plugin will have:

Code: [Select]
EXTERN_C DLLEXPORT void SetCurrent (double ampere)
{
  // set the current with USB-Calls
}

Bye, Steffen

25
Mach SDK plugin questions and answers. / Re: Pluging and Macro interaction?
« on: November 09, 2009, 09:50:54 AM »
Hi Matty,

there is another way to call functions in Plugins: you can export DLL-Functions and call them from VB.
it has the advantage to calling your plugin in a private way without a broadcast to all plugins like NotifyPlugins

As an Example:

in your DLL (the plugin) you have a function

Code: [Select]
EXTERN_C DLLEXPORT void MyPluginFunction (long Parameter1, long parameter2)
{
  // Do what you want
}

Then in a script with VB from Mach3 you can call it the following way:

Code: [Select]
Declare Sub MyPluginFunction  Lib "PlugInName" (ByVal Parameter1 As Long, ByVal Parameter2 As Long)
Call MyPluginFunction (1, 2)

Bye, Steffen

26
Great, I'm happy to hear about that.

At the moment I'm using Visual Studio 2005 for any project but Mach3. It will be fine to have one VS-Installation only.

Here I've got 3 Plugins uner development which i can transfer to VS2005 to check for function.

Steffen

27
Hi,

joining the wiki is no more possible since there was vandalism at the wiki, see here

Since there is no mailaddress to ask for I asked webmaster@machsupport.com and a few hours later I had an account.

Remember to say that you want to join the wiki for editing.

bye, Steffen

28
Hi,

I believe, that's a nice idea, but what about reality of our comments?

If I'd comment some variables with the content of "I think I understood the function of this variable" it mustn't be right at all.
Especially the risks of cross-effects are at least dangerous.
I love the Plugins I've build until now, but all the time I've got a strange feeling of the problems that may arise, when using that straight forward solutions I've made.

I'd take part in the project of commenting the variables, but there should be Art and Brian to check for everything that

Would they?

Bye, Steffen

29
Hi,

this would be ok for my example, but not for general.

I use abstration of situations (oop), so the check for the break does not know at all, what movement has to be done.

At the moment there are two useable solutions:
-clear the error message and check if there ha arised a new message
-use the plugins notify and ensure, the plugin is active

If there would beĀ  a way to activate a plugin by the plugin itself, it would be great.

Bye, Steffen

Hum, I believe, this is no good english, hope you understand...

30
Hi Lee,

But it's normal, that movement will stop (in this example at position x=1000 ;))
I',m looking for a detection of the user aborting the function.

At the moment there is a solution by the callback function Notify but the problem is, that the plugin has to be activated to get Notify.

So now I'll insert a check for he plugin to be activated with a message to the user to ativy it, it necessary.

Bye, Steffen




Pages: « 1 2 3 4 »