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:27:33 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
Third party software and hardware support forums.
PoKeys
(Moderator:
NeoTO
)
External LEDs to Indicate MPG1 Axis
Pages:
1
Go Down
« previous
next »
Author
Topic: External LEDs to Indicate MPG1 Axis (Read 973 times)
0 Members and 1 Guest are viewing this topic.
PeterB
Active Member
Offline
Posts: 7
External LEDs to Indicate MPG1 Axis
«
on:
January 30, 2011, 03:01:14 PM »
I wish to have 3 LEDs to indicate the axis driven by MPG1
I have set up the Mach3 Ports & Pins Outputs 1/2/3 to Port 10 and the PoKeys pin numbers 23/24/25 which have the LEDs
I have tested the PoKeys interface using a brain input of MPG JOG (OEMLED 57) and a brain output of Output 1. The LED on pin 23 goes on and off correctly in sync with the screen LED.
How do I input the 'MPG 1 Drives X Axis', 'MPG 1 Drives Y Axis', and 'MPG 1 Drives Z Axis' LEDs into the Brain as the OEM numbers 59/60/61 do not appear on the drop down menu?
Any help would be appreciated.
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: External LEDs to Indicate MPG1 Axis
«
Reply #1 on:
January 30, 2011, 03:34:33 PM »
do a work around, in your macropump, look at those LEDs, then if they are on, map them to a ULED, and then in brains, map yoru uled to your putputs.
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/
PeterB
Active Member
Offline
Posts: 7
Re: External LEDs to Indicate MPG1 Axis
«
Reply #2 on:
January 31, 2011, 04:59:56 PM »
Scott
I have inserted the following macropump:
Dim MPGXLED
MPGXLED = GetOEMLED(59)
SetUserLED(2101,MPGXLED)
I have enabled the macropump in General Config and restarted Mach 3
I altered my brain input to OEMLED 2101 but the PoKeys LED stopped functioning (Couldn't see how to select a brain input of ULED 2101)
I have also tried SetUserLED(2023, MPGXLED) in the macropump to map directly to PoKeys, and altered the PoKeys Config Plugin to map this pin range. Still no LED activity.
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: External LEDs to Indicate MPG1 Axis
«
Reply #3 on:
January 31, 2011, 06:38:50 PM »
Look at the PoKeys "OEM" screen set, you will see that the user leds range 2101 is used by the pokeys, so your macropump nad pokeys are fighting over the same range.
Do this Map your MPG leds to (ULED range 1501-1503, to represent x, y and z mpg axis that are on), in your macropump. BTW: after you think you have enabled your macro pump to run, DOUBLE CHECK after reboot that it did indeed RUN, ie. look on the gen config dialog and see if the macro pump check box is still ticked.
in your brain,
ULED1501->NoOp->"Your output, or other ULED" this run would for instance map XMPG LED (using the ULED1501 that was mapped from MP), to what ever you want to output that to.
NOTE: the PoKeys.set on the PoKeys, matrix pages has in labels what ULEDS it is using..... in the Plugin config, you can "Remap" from the OEM ULED ranges to what ever range you want to, but just realize the PK OEM screen will not work if you map outside what the ULEDs it uses....
NOTE2: REMEMBER that when ever you modify a brian, while mach is runnig (and save it), you will HAVE to do a RELOAD all brains, and them make sure it is enabled!!!!! EACH and EVERY time you edit a brain!!!!!!!!
scott
«
Last Edit: January 31, 2011, 06:40:56 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/
PeterB
Active Member
Offline
Posts: 7
Re: External LEDs to Indicate MPG1 Axis
«
Reply #4 on:
February 05, 2011, 03:47:48 PM »
Scott,
I interpreted your advice as follows:
Macropump code:
MPGXLED = GetOEMLED(59) ‘MPG drives X Axis LED
SetUserLED(1501,MPGXLED)
Brain code
OEMLED:1501 --- No-Operation --- Output 1
Ports and Pins > Output Signals
Output #1 Enabled Port 10 Pin Number 25 Active Low
PoKeys55
Pin 25 digital output
The LED does not work.
I believe the problem is in the macropump and I have spent several hours experimenting with just the X Axis.
If I programme the macropump as:
MPGXLED = OEMLED(59) ‘MPG drives X Axis LED
Set OEMDRO(800,MPGXLED) ‘The X Axis DRO
The result is a 0 or -1 depending on whether the MPG drives X Axis LED is Off or On
This surprised me as I thought the Mach3 screen LEDs would output a binary 0 or 1.
I then wrote the following macropump test code:
MPGXLED = GetOEMLED(59) ‘MPG drives X Axis LED
SetUserLED(1501, MPGXLED) ‘Load User LED
Var = GetUserLED(1501) ’Read User LED
SetOEMDRO(800,var) ‘The X Axis DRO
The X Axis DRO stopped showing the digital value of the LED.
I then inserted logic to change the -1 to +1 and the X Axis DRO started working
I then rewrote my macro pump code as follows:
MPGXLED = GetOEMLED(59) ‘MPG drives X Axis LED
If MPGXLED = -1 THEN
MPGXLED = 1
End If
SetUserLED(1501,MPGXLED)
The PoKeys LED started working correctly. Eureka!
I was also able to configure the PoKeys Plug-In and map pin 25 directly as follows:
MPGXLED = GetOEMLED(59) ‘MPG drives X Axis LED
If MPGXLED = -1 THEN
MPGXLED = 1
End If
SetUserLED(2024,MPGXLED) ‘Direct pin 25 mapping.
The Po-Keys LED continued to work and indicated correctly after I inverted pin 25 in PoKeys.
It was a simple matter to duplicate the code for MPG drives Y Axis LED and the Z Axis LED.
For someone who had not heard of the exciting world of macropumps or brains before, this forum topic has been an interesting and challenging learning experience.
Why does Mach 3 use 0 and -1 for its LED logic?
Logged
zafarsalam
Active Member
Offline
Posts: 145
Re: External LEDs to Indicate MPG1 Axis
«
Reply #5 on:
June 27, 2011, 08:44:21 PM »
I use this code to do the same thing.
In pokeys0 Cfg:
Uled base range start # - 2001
Use ULED range 1 output - from 3 to 11
Invert Output - checked
In brain I have put:
OEMLED:59 - No Operation, Pass Signal - OEMLED:2004
OEMLED:60 - No Operation, Pass Signal - OEMLED:2005
OEMLED:61 - No Operation, Pass Signal - OEMLED:2006
I have connected LED's to 3.3V and connectors 4,5 and 6. Works perfectly. I don't think we need to go through macropump and assigning outputs on port 10 for that.
Zafar
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...