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 27, 2012, 11:02:51 PM
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
VB and the development of wizards
Simple macro to activate output then deactivate it in MDI & Gcode?
Pages:
1
Go Down
« previous
next »
Author
Topic: Simple macro to activate output then deactivate it in MDI & Gcode? (Read 558 times)
0 Members and 2 Guests are viewing this topic.
natefoerg
Active Member
Offline
Posts: 97
Simple macro to activate output then deactivate it in MDI & Gcode?
«
on:
June 07, 2011, 10:48:01 PM »
I am trying to write a VB script (macro I believe they are called) That will open and close my air collet closer.
I already have Mach3 running a Macro that runs a toolchanger. this is air operated, and uses one solenoid and a stepper motor.
I have a M06 macro running it that uses this command " ActivateSignal(OutPut2)" and also uses DeActivateSignal(OutPut2) one allows the solenoid to pressurize the air cylinder and the other depressurises it.
How can I write a macro that does this-
(I want to call it something like M101)
I want to be able to either MDI a command like CC0 for (collet closer open) and CC1 for (collet closer closed) or to have CC0 or CC1 placed into my Gcode file.
I want CC0 to ActivateSignal(OutPut3) and CC1 to DeActivateSignal(OutPut3)
I believe that I need to have the Macro stored in C/Mach3/Macros/Mach3Turn. Is this correct?
I know how to wire the solenoids, plumb the air, configure Mach ports&pins for the outputs, but for the life of me I cant figure out how to write this macro. It seems like it should be so easy, but I cant figure it out.
Any input you can provide would be great!
Best,
Nate.
Logged
natefoerg
Active Member
Offline
Posts: 97
Re: Simple macro to activate output then deactivate it in MDI & Gcode?
«
Reply #1 on:
June 08, 2011, 01:02:02 PM »
Anyone help me out?
Pretty please with sugar on top...
Logged
natefoerg
Active Member
Offline
Posts: 97
Re: Simple macro to activate output then deactivate it in MDI & Gcode?
«
Reply #2 on:
June 08, 2011, 02:50:08 PM »
So I have been trying lots of things. Reading everything I can find and I thought I might be able to do this-
Write a macro called M99
ActivateSignal(OUTPUT2)
Sleep 100000
Store that macro in C/Mach3/Macros/mach3turn/m99.m1s
Execute this Macro by typing m99 into the MDI box.
I have tried this and it does not activate the output led on the diagnostics page.
Here is my output configuration-
Output number 1 (checked) Port 1 Pin 16 Active low (unchecked)
Any thoughts? I suspected that this macro would activate the output, but I have had no luck yet...
Logged
natefoerg
Active Member
Offline
Posts: 97
Re: Simple macro to activate output then deactivate it in MDI & Gcode?
«
Reply #3 on:
June 08, 2011, 04:00:10 PM »
Perhaps I should not have named it M99! M999 appears to work to make an output active...
Logged
BR549
Active Member
Offline
Posts: 2,557
Re: Simple macro to activate output then deactivate it in MDI & Gcode?
«
Reply #4 on:
June 09, 2011, 11:05:20 AM »
YOU need to use a M# higher than M100. Below that is reserved for internal use.
You are on track just remember in your Gcode side you will be required to use a MACRO call as anything like CC0 or CC1 is not allowed
M100 open , M101 close
WHy the LONG sleep? That would be 100 seconds .
Just a thought, (;-) TP
Logged
natefoerg
Active Member
Offline
Posts: 97
Re: Simple macro to activate output then deactivate it in MDI & Gcode?
«
Reply #5 on:
June 10, 2011, 08:46:55 AM »
Thanks BR549. The sleep was because I copied the code from somewhere else. It has been removed.
Logged
Pages:
1
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...