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, 05:38:26 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
General Mach Discussion
SystemWaitFor help... Need Mach to wait for a signal!
Pages:
1
Go Down
« previous
next »
Author
Topic: SystemWaitFor help... Need Mach to wait for a signal! (Read 320 times)
0 Members and 2 Guests are viewing this topic.
ASC
Active Member
Offline
Posts: 64
SystemWaitFor help... Need Mach to wait for a signal!
«
on:
March 07, 2011, 01:17:13 PM »
Hey guys, embarking on another fun Mach project and I've hit a snag.
The system is going to be a pick, place and solder machine with integrated dispensing of adhesive and solder paste. I'm trying to use Mach to control the motion and a PLC to control the actuators and timing for the pick/place/solder head.
I've tried writing a macro that does the following:
1)turns on a Mach3 output that enables the PLC
2)waits until a PLC output triggers a Mach3 input before motion can continue
here is said macro:
ActivateSignal(output1) 'triggers PLC to start PICK cycle
Sleep(100)
DeactivateSignal(output1)
SystemWaitFor(input1) 'PLC program is complete, Mach may continue
So far everything works, Mach moves the system to its specified coordinates, the halts and the PLC program executes, however when it is complete, the system is stopped. I can see input 1 being triggered on the diagnostics page but the macro never completes. Am I executing the systemwaitfor command improperly?
Any suggestions or ideas are more than welcome!
Logged
Mr. Creosote
Overloaded
Global Moderator
Offline
Posts: 3,072
Re: SystemWaitFor help... Need Mach to wait for a signal!
«
Reply #1 on:
March 07, 2011, 02:04:04 PM »
ActivateSignal(output1) 'triggers PLC to start PICK cycle
Sleep(100)
DeactivateSignal(output1)
SystemWaitFor(input1) 'PLC program is complete, Mach may continue
DoOEMButton 1000
Might put this at the end and try it.
«
Last Edit: March 07, 2011, 02:07:45 PM by Overloaded
»
Logged
"I haven't failed. I've just found 10,000 ways that won't work." Edison
"You cannot help men permanently by doing for them what they could and should do for themselves."
Abe Lincoln
ASC
Active Member
Offline
Posts: 64
Re: SystemWaitFor help... Need Mach to wait for a signal!
«
Reply #2 on:
March 07, 2011, 03:14:46 PM »
That did do it! Also found that manually pressing the start button allowed it to continue. This is much better though as I want this machine to run with as little operator input as possible.
Also I figured out a work around macro;
ActivateSignal(output1) 'triggers PLC to start PICK cycle
While IsActive(input1)
Wend
DeActivateSignal(output1)
This works the same as the previous script as long as input1 is set to active low!
Logged
Mr. Creosote
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...