Home
Downloads
Mach3
Plugins
CAM Post Processors
Screensets
Purchase
Support
Forum
Tutorial Videos
Documentation
Yahoo Group
Mach Wiki
Resources
Contact Us
Links
CNCZone
German Forum
Italian Forum
Korean Forum
Portugese (Brazil) Forum
Russian Forum (RSK CNCROUTER)
Thai Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 25, 2012, 10:29:54 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Select from and to languages
Chinese-simp to English
Chinese-trad to English
English to Chinese-simp
English to Chinese-trad
English to Dutch
English to French
English to German
English to Greek
English to Italian
English to Japanese
English to Korean
English to Portuguese
English to Russian
English to Spanish
Dutch to English
Dutch to French
French to English
French to German
French to Greek
French to Italian
French to Portuguese
French to Dutch
French to Spanish
German to English
German to French
Greek to English
Greek to French
Italian to English
Italian to French
Japanese to English
Korean to English
Portuguese to English
Portuguese to French
Russian to English
Spanish to English
Spanish to French
Machsupport Forum
Mach Discussion
Mach SDK plugin questions and answers.
Pluging and Macro interaction?
Pages:
1
2
»
Go Down
« previous
next »
Author
Topic: Pluging and Macro interaction? (Read 1350 times)
0 Members and 1 Guest are viewing this topic.
Matty Zee
Active Member
Offline
Posts: 38
Pluging and Macro interaction?
«
on:
October 26, 2009, 06:27:35 PM »
Hi,
I've just started writing a plugin and everythig is going well so far. I understand how i can implement most of my requirements in my plugin but one thing has me stumped. Can Macros call functions that i write as part of my pluging?
For example, if i write a class in my plugin to talk to a serial port device and poll it during the 'update()' call. But then if i want a specific message to be sent to the device on say and spindle start/stop (M30/M31?) how do i do that? Can i put a function call to my plugin in the M31 Macro? but one is a VB script the other C++ library.
Cheers
MattyZee
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: Pluging and Macro interaction?
«
Reply #1 on:
October 27, 2009, 07:12:50 PM »
Yes, you can send numeric messages from VB to your Plugin.
Lets say you want to send the number 6000, and when your plugin gets that number in the MyNotify section you do what ever with it.
in VB you send: "NotifyPlugins(6000)" (without the quotes).
scott
Logged
Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
Matty Zee
Active Member
Offline
Posts: 38
Re: Pluging and Macro interaction?
«
Reply #2 on:
October 28, 2009, 07:29:53 AM »
Thanks for the reply scott.
So how does my plugin know that message is for it? What happens if i send a NotifyPlugins(x) where x is a number another pluging uses?
Logged
Steffen_Engel
Active Member
Offline
Posts: 29
Chattanooga, TN, USA
Re: Pluging and Macro interaction?
«
Reply #3 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:
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:
Declare Sub MyPluginFunction Lib "PlugInName" (ByVal Parameter1 As Long, ByVal Parameter2 As Long)
Call MyPluginFunction (1, 2)
Bye, Steffen
Logged
mjtooba
Active Member
Offline
Posts: 6
Re: Pluging and Macro interaction?
«
Reply #4 on:
December 20, 2009, 02:05:50 PM »
hi,how we can execute mach3 script via plugin ?
stored script in my plugin code or my settings (xml).
i want to execute various script in my plugin without using any macro code or any thing else, just running script like macropump.
Logged
Steffen_Engel
Active Member
Offline
Posts: 29
Chattanooga, TN, USA
Re: Pluging and Macro interaction?
«
Reply #5 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
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: Pluging and Macro interaction?
«
Reply #6 on:
December 22, 2009, 11:30:50 AM »
If you want to run a "Macro" from the plugin, then in your C code when ever the condition is met to run it have this line:
Code("M888"); // where "888.m1s" is your macro number that has the code you want to execute.
Inside Mach MAD plugin, I have a dialog window that allows you to type in and "run VB", to Mach 3, but it is really for Diagnostics/testing.
like Steffen said above, you can do all mach functions from within the plugin though.
scott
«
Last Edit: December 23, 2009, 01:10:44 PM by poppabear
»
Logged
Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
mjtooba
Active Member
Offline
Posts: 6
Re: Pluging and Macro interaction?
«
Reply #7 on:
December 23, 2009, 01:26:50 AM »
ok
thanks,i trying to implement Code(M*********) but i can't used "code(M*********)" function in VBA during CNC running a program,i think when cnc is running ,any M Code must be executed via RS274 interpreter ? it is true. or its my fault.
i interested "run VB" like mechanism that able to run simple "VB" script in my plugin and can be edited via plugin.i found script header and class declaration in "include" folder but not yet using that.
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: Pluging and Macro interaction?
«
Reply #8 on:
December 23, 2009, 01:13:04 PM »
I am sorry, but I really dont understand what you want......... or what exactly your saying.
This is NOT meant as an insult in any way, but is there a friend of yours who could put your questions
into better English so I could understand what your asking?
scott
Logged
Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
mjtooba
Active Member
Offline
Posts: 6
Re: Pluging and Macro interaction?
«
Reply #9 on:
December 23, 2009, 02:04:21 PM »
i want to use VBA in my plugin.
how to access VBA interpreter class and objects ?
i can't use code(""); function.
Logged
Pages:
1
2
»
Go Up
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Mach Discussion
-----------------------------
=> General Mach Discussion
=> Mach3 under Vista
=> Quantum
=> Mach SDK plugin questions and answers.
===> Finished Plugins for Download
=> VB and the development of wizards
=> Brains Development
=> Video P*r*o*b*i*n*g
=> Mach Screens
===> Screen designer tips and tutorials
===> Works in progress
===> Finished Screens
===> Flash Screens
===> JetCam screen designer
===> Machscreen Screen Designer
===> CVI MachStdMill (MSM)
=> Feature Requests
=> Non English Forums
===> Italian
===> French
===> Spanish
===> Chinese
===> German
===> Russian
===> Romanian
===> Japanese
===> Vietnamese
=> FAQs
-----------------------------
*****VIDEOS*****
-----------------------------
=> *****VIDEOS*****
-----------------------------
General CNC Chat
-----------------------------
=> Share Your GCode
=> Show"N"Tell ( What you have made with your CNC machine.)
=> Building or Buying a Wood routing table.. Beginnners guide..
=> Show"N"Tell ( Your Machines)
-----------------------------
G-Code, CAD, and CAM
-----------------------------
=> G-Code, CAD, and CAM discussions
=> LazyCam (Beta)
-----------------------------
Third party software and hardware support forums.
-----------------------------
=> LazyTurn
=> GearoticMotion Preliminary testing
=> Tempest Trajectory Planner
=> Contec
=> dspMC/IP Motion Controller
=> HiCON Motion Controller
=> Third party software and hardware support forums.
=> Galil
=> Newfangled Solutions Wizards
=> Mach3 and G-Rex
=> Mesa
=> Modbus
=> NC Pod
=> PoKeys
=> SmoothStepper USB
=> Sieg Machines
=> Promote and discuss your product
-----------------------------
Tangent Corner
-----------------------------
=> Tangent Corner
=> Competitions
=> Polls
=> Bargain Basement
-----------------------------
Support
-----------------------------
=> Downloads
===> XML files
===> Post Processors
===> Macros
===> Tutorials
===> Others
===> Beta Brains
===> Screen Sets
===> Documents
===> MACH TOOL BOX
=> One on one phone support.
=> Forum suggestions and report forum problems.
-----------------------------
Mach4
-----------------------------
=> Mach4 pre-Alpha Testing
Loading...