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, 11:23:43 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
Brains Development
SERIAL INPUT AND BRAINS
Pages:
1
Go Down
« previous
next »
Author
Topic: SERIAL INPUT AND BRAINS (Read 2650 times)
0 Members and 2 Guests are viewing this topic.
dhookings
Active Member
Offline
Posts: 36
SERIAL INPUT AND BRAINS
«
on:
January 21, 2008, 12:21:52 PM »
Still new to all this.
The second hand cnc machine I have has push buttons for jogging. I would like to use these in Mach3. Am I right in thinking I have three main options?
1) Buy a parallel port card which can be configured for approx a dozen more inputs.
2) Buy an expensive modbus interface with everything done for me.
3) Make my own rs232 interface, communicating through the Serial Monitor.
Option three would be my preferred option as I would easily be able to programme an AVR to monitor switches and send and receive data. This would turn out very cheap for me and would be available for more sophistication on both inputs and outputs as I get more used to milling and time becomes available.
Is there an rs232 buffer in Mach3 that is accessible from Brains, and if so, where would I find information on it?
TIA
Dave
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: SERIAL INPUT AND BRAINS
«
Reply #1 on:
January 21, 2008, 03:35:10 PM »
currently, you can only send OUT infomation on "Send Serial" type stuff. You cant read a serial port, directly.
Currently you options are for getting control inputs: second parallel port, Keygrabber, PLC's, Peters Mod IO board, Aurturos Mobus board(s), and cube logic that I am aware of.
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/
dhookings
Active Member
Offline
Posts: 36
Re: SERIAL INPUT AND BRAINS
«
Reply #2 on:
January 22, 2008, 04:48:22 AM »
Thanks Scott, somewhere to start.
So, presumably, I could send out a simple byte to read row one, get my AVR to connect that row to logic 0, then read that row of four or five inputs on the second parallel port. This would enable as many switches as the timing cycle would allow. I am thinking of such things as preset jog rates, spindle stop/start etc. This could also lead to a 4 x 16 lcd character display of DROs.
The last parallel port card I bought cost less than 17GBP and the cost of an AVR board is down to time mainly.
So unless any of the other options are more sensible for me and assuming there are no problems with my plan A, I'll start experimenting. I get the feeling that the send serial part of the excercise would need to be executed by a macro pump and visual basic?
Thanks again
Dave
Logged
dhookings
Active Member
Offline
Posts: 36
Re: SERIAL INPUT AND BRAINS
«
Reply #3 on:
January 26, 2008, 07:15:34 AM »
As an update to this, I dismantled a usb joystick, connected the external switches and used keygrabber. I can now jog from these external switches. I have also routed some of the spare joystick switches to oemtriggers. What I want is to have three switches with preset jog rates, 4%,40% and 100%. I have checked that the oemtriggers are working by using one to turn jog mode on and off. I have also written a one line macro that puts 4% in the oemdro (number 3) and that works. What I have not been able to do is combine those two processes so that pushing the external switch alters the slow jog rate. I suspect that oem 277 may be involved but I can't figure how. I have now started trying to use a brain, but I still can't find the way of loading a dro with a value.
One of my problems is that my access to broadband is at work but the machine is at home. So I have to watch the videos at work and try to remember them when I get home.
If anyone can help with this final problem that should keep me quiet for a whille.
Dave
Logged
jimmybondi
Active Member
Offline
Posts: 29
Re: SERIAL INPUT AND BRAINS
«
Reply #4 on:
January 26, 2008, 09:28:28 AM »
Hi Dave,
Quote from: dhookings on January 21, 2008, 12:21:52 PM
2) Buy an expensive modbus interface with everything done for me.
who told you that Modbus have to be expensive ?
I'm using on 3 machines
CubLoc
CB280 and I'm glad what this device will do :-)
An additional LPT costs roundabout 10$, and you're limited in number of ports - so the 30 oder 40$ for a PLC are nearly related
Frank
Logged
dhookings
Active Member
Offline
Posts: 36
Re: SERIAL INPUT AND BRAINS
«
Reply #5 on:
January 26, 2008, 11:50:07 AM »
Initially I looked on Google and all the modbus interfaces seemed to be around $100 or more. But that is academic now as I have the joystick working the jog controls and am within a whisker of achieving everything I'm after. I just need to marry up an oemtrigger to a piece of code.
On looking further, I notice that there appears to be a discrepancy between what it says in the customizing pdf and the drop down box for buttons in the brains termination dialogue. In customizing, oem code 277 is said to be the trigger for oemtriggermacro to run, so that is what I put in system hotkeys. In brains, oem code 277 is shown as feedrate++, and that is what happens when I press my joystick switch. But I can't find anything in brains to give me oemcode to trigger the macro.
Dave
Logged
dhookings
Active Member
Offline
Posts: 36
Re: SERIAL INPUT AND BRAINS
«
Reply #6 on:
January 28, 2008, 05:40:25 AM »
I now have everything working as required, but using a macro pump not brains. I have to say that help for this Mach system is very fragmented, and often out of date. I found a function 'isactive()' from a forum post. The customize pdf gives oemtriggers 1 to 3 as signals 29 to 31 but nothing for 4 and above. I took a chance on 4 being 32 etc. and that worked. Oh to be able to click on help and find an alphabetical list of subs and functions with syntax and examples.
Dave
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...