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 28, 2012, 12:00:21 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
External LED's
Pages:
1
Go Down
« previous
next »
Author
Topic: External LED's (Read 1473 times)
0 Members and 1 Guest are viewing this topic.
HillBilly
Active Member
Offline
Posts: 181
External LED's
«
on:
January 05, 2007, 04:32:33 PM »
I am trying to interface some panel indicators. I thought I had it with this line running in the macropump:
If GetLED (4) Then ActivateSignal (OUTPUT10) Else DeActivateSignal (OUTPUT10) 'Cycle Start
So I added more like this:
If GetLED (4) Then ActivateSignal (OUTPUT10) Else DeActivateSignal (OUTPUT10) 'Cycle Start
If GetLED (5) Then ActivateSignal (OUTPUT11) Else DeActivateSignal (OUTPUT11) 'Feed Hold
If GetLED (57) Then ActivateSignal (OUTPUT12) Else DeActivateSignal(OUTPUT12) 'MPG
The fist line is the only one that works. I must be missing something, or is there a better way of doing this?
Darek
Logged
Ron Ginger
V4 Screen Contributor
Offline
Posts: 568
Re: External LED's
«
Reply #1 on:
January 05, 2007, 08:27:30 PM »
I think you may need some End IF statements. Try
If GetLED (4) Then 'Cycle Start
ActivateSignal (OUTPUT10)
Else
DeActivateSignal (OUTPUT10)
End If
If GetLED (5) Then 'Feed Hold
ActivateSignal (OUTPUT11)
Else
DeActivateSignal (OUTPUT11)
End If
As you have it your second line only gets executed if the first ELSE is true.
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: External LED's
«
Reply #2 on:
January 05, 2007, 09:11:39 PM »
I thought the format was: GetOEMLed()
not GetLed()
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/
Ron Ginger
V4 Screen Contributor
Offline
Posts: 568
Re: External LED's
«
Reply #3 on:
January 05, 2007, 10:06:26 PM »
You are right, I was looking at the IF...THEN.... END IF problem, I didnt look at the GetLED
Logged
HillBilly
Active Member
Offline
Posts: 181
Re: External LED's
«
Reply #4 on:
January 06, 2007, 09:24:15 AM »
Thanks neighbor (poppabear),
GetOEMLED(57) took care of the MPG indicator. Still working on getting feedhold to output.
Darek
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: External LED's
«
Reply #5 on:
January 06, 2007, 06:35:25 PM »
'Hey Hillbilly,
'No, problem.
'On your feedhold, I did something like this with my macro pump (signal coming in off of a PLC),
'I dropped a UserLED on the screen also a counter DRO on a back screen:
'Macropump
x=GetUserDRO(1002) 'x starts at 0
If IsActive(INPUT4) Then 'your trigger input
SetUserLED(1002,1) 'turns on your panel feed hold active led
SetUserDRO(1002,1) 'sets DRO 1002 to 1
Else
SetUserLED(1002,0) 'when input off resets LED, and DRO to 0
SetUserDRO(1002,0)
End If
'BOTH these conditions (below), need to be true for your feed hold to push.
'This is so the Macro pump will not continue to "Push" the feed hold button each time it runs (10/sec).
If GetUserLED(1002) And X=0 Then
DoOEMButton(1001) 'Feed hold
End If
'It is kinda indirect, but it keep the macro pump from continuing to mash the feed hold.
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/
HillBilly
Active Member
Offline
Posts: 181
Re: External LED's
«
Reply #6 on:
January 08, 2007, 10:45:08 AM »
I will have to digest that through the single stepper ( VB script editor.). I am still working on getting my VB legs. So far I have basically been borrowing code.
After looking over the default screens I noticed there is not a feedhold LED implimented.
Darek
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...