Thanks Thanks:  0
Likes Likes:  0
Needs Pictures Needs Pictures:  0
Picture(s) thanks Picture(s) thanks:  0
Page 1 of 2 12 LastLast
Results 1 to 15 of 30
  1. #1
    Join Date
    May 2003
    Location
    Perth WA
    Posts
    3,784

    Default Console the ModIO Method

    Just in case you thought I have been resting I have been doing work on the Modio interface along with a few other jobs and events. Being a total novice I first needed to understand how these things worked.
    A lot of what I read went in one ear and out the other so next plan was to get some expert help and see it working.

    I took the unit to an Electronics Engineer and in a very short time an MPG, Potentiometer, Switch and led were working - too easy for him so now I have no excuse to get it going.

    So that I am not cheating I disconnected everything and ignored the macropump he wrote and started from scratch. There is no point doing this project unless I can do it all myself and understand how it works.

    So connecting the switches, etc is real easy - its mechanical and you can compare to a schematic to see if you have it right. There are enough led indicators on the ModIO and the LCD panel give you feedback to make sure the connections are right.
    Getting the Modio to communicate with mach3 wasn't too bad either as I just followed Peter Homann's instructions and it was fairly straight forward. Mach3 has a custom setup for his Modio so that helps a lot too.

    Getting the switches and other machanical bits to actually get Mach3 to work is a whole different ball game. Typical of Mach3 there are a couple of ways of doing this. I know Visual basic so I started writing code in a macropump to make things work. Two nights of struggling with the commands and my ignorance I have the MPG working, a potentiometer changing the Feed Rate and the X,Y and Z dro's displaying on the LCD panel. As is usual it was the VB syntax that got me and most of the time I have spent trying to format the LCD display - padding the DRO reading to push the next axis to a new line. To prove it can be done see the attached photo. Next step is to get the other bits working.

    I did say Mach3 has a couple of ways of interfacing commands to the Modio and the other method is brains. Funny name but from my understanding it is more of a graphical interface to Mach3 and is also able to communicate much faster than a macropump. This is too much for me to try to do both methods so unless anyone can help me with brains I will keep plodding along with a macropump. I would be really interested to see a couple of brains working the ModIO as I do find it easier to understand if I see practical examples.
    I am avoiding getting too technical at the moment as I am not sure of a lot of things yet so until I gain confidence in what I am doing ask questions and I will answer the best I can.

    I have attached a photo of my ModIo lashed together while I work on it. Before I can design the console I need to work out what I can do with the ModIO. I have a 17 inch monitor with a resistive touchscreen as well as lots of switches, led's and an Mpg and I will try to make this a bells and whistles job.

    Peter Homann has been a great backup and nothing seems to be a problem for him so hopefully soon I will have a better understanding and will not need to pester him as much.
    Cheers,
    Rod

  2. # ADS
    Google Adsense Advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many





     
  3. #2
    Join Date
    Feb 2008
    Location
    NOWRA
    Posts
    648

    Default

    Love the look of the small LCD screen DRO. Great Job, keep it up.

    Daniel

  4. #3
    Join Date
    Jul 2008
    Location
    Willunga, Adelaide, South Australia
    Posts
    196

    Default

    Fantastic Rod
    can't wait to see it as you progress.
    You have given me hope that with my total lack of electronic know-how, even i might be able to follow you along succesfully.
    many cheers
    Noel

  5. #4
    Join Date
    May 2003
    Location
    Perth WA
    Posts
    3,784

    Default

    Hi Noel,
    Make no mistake I am probably the worst person on this forum to have a go at this so I am sure you will be able to follow along.
    I am being a bit cagey about it as i do not want to give wrong information so hang in there and I will eventually get this down in laymans terms.
    Cheers,
    Rod

  6. #5
    Join Date
    May 2003
    Location
    Perth WA
    Posts
    3,784

    Default

    I have been wondering what is so good about the ModIO compared to the Pokeys. The Pokeys is a breeze to hook up and cetainly a lot easier that ModIO. They are both software controlled by Mach3 so there is no difference there. It does make you wonder why I am bashing my head around all this new terminolgy and fighting with the electrickery bit of the ModIo but something I read last night expalined it to me.

    The ModIO has a feature that enables a thing called a charge pump. Yeah another flash name for an interface to your machine and spindle. This works in a way that if the communication from the computer stops it shuts down your machine. If you only have software control on your machine and the plug to your computer is pulled (yeah I have tripped over the lead before) or your machine locks up then your machine will continue to operate. The charge pump wiill detect the computer failure and automatically shut down your machine. A very handy feature and one that justifies to me the value of going the ModIO path.
    Cheers,
    Rod

  7. #6
    Join Date
    May 2005
    Location
    Cockatoo Vic
    Posts
    996

    Default

    Rod

    The charge pump you describe is a standard Mach feature.

    See "ports and pins" - outputs. Also Mach Mill User Guide PDF section 4.13

    A lot of the BoBs that you can buy for the LPT have circuitry on board to make use of the charge pump.

    Once the charge pump signal is lost then the BoB will cut the enable signal to the drives and-or other actions.

    A good safety feature perhaps but not limited to the ModIO.

    One thing that would make me interested in the ModIO is the LCD that you showed earlier.

    I can imagine that in a pendant that shows the DROs or maybe the axis selected for MPG or some other feedback that is in the palm of your hand (pendant).

    Greg

  8. #7
    Join Date
    May 2003
    Location
    Perth WA
    Posts
    3,784

    Default

    Hi Greg,
    It is good to have you around to clarify these things. I am going to leave the charge pump till last while I work out all the inputs first.
    My task tonight is to get the axis selction working through a 12 position switch. Peter has a switch set up on a board that has 390 ohm resistors between the pins so you only need one input and the voltage change is detected by the Modio/Mach3. A clever way of getting 12 inputs through one pin. It will take me five minutes to hook up and the rest of tonight to program it. I will make all this code available once it is tested on a machine but usual scaredy cat rider - all care but no responsibility.
    Cheers,
    Rod

  9. #8
    Join Date
    May 2003
    Location
    Perth WA
    Posts
    3,784

    Default

    I must admit to being a little baffled by the ModIO but last night things started to come together.
    I got the 12 postion switch working by modifying a bit of code Peter had in his ModIO manual. I now have the LCD panel, Potentiometer and 12 way switch working on the following code. The MPG works by settings the inputs in Mach3 to match the ModIO terminals.
    Not being 100 percent confident I am posting it in hope that somebody can scan it and make suggestions should there be any gremlins in there.

    Option Explicit
    'Feed Rate Override variables
    Dim fro As Integer
    Dim lastfro As Integer

    'lcd variables
    Dim axisID As Integer
    Dim LCDString As String
    Dim SVal As String
    Dim axisName As String

    'Jog Mode variables
    Dim MPGAxis As Integer
    Dim State As Integer

    'Feed Rate Override Potentimeter
    fro=getinput(64) 'read analogue 1
    fro=(fro*95.0)/(1024.0/3) 'range 5 to 300 percent
    lastfro=getDRO(21) 'used to average the reading due to fluctuations in pot
    setDRO 21,Round((fro+5*lastfro)/6,0) 'sets the value in Mach3

    'Setting Jog Mode through Analogue 2
    MPGAxis=GetInput(65) 'analogue 2 input through Modio
    Select Case MPGAxis
    Case<47 DoOEMButton(276) 'switch is off so defaults Mach3 to continuous jog on start up
    State=0
    Case<140
    If GetOEMLED(14)=0 Then 'tests if for continuous jog
    DoOEMButton(276) 'sets contiuous jog
    End If
    If State<>1 Then
    Speak"Continuous"
    End If
    State=1
    Case<233
    If GetOEMLED(15)=0 Then 'tests for step mode jog
    DoOEMButton(275) 'sets step mode jog
    End If
    If State<>2 Then
    Speak"Step"
    End If
    State=2
    Case<326
    If GetOEMLED(57)=0 Then 'tests for MPG mode
    DoOEMButton(327) 'sets MPG mode
    End If
    If GetOEMLED(59)=0 Then 'test for X axis
    DoOEMButton(185) 'sets X axis
    End If
    If State<>3 Then
    Speak "X"
    End If
    State=3
    Case<419
    If GetOEMLED(57)=0 Then 'tests for MPG mode
    DoOEMButton(327) 'sets MPG mode
    End If
    If GetOEMLED(60)=0 Then 'tests for Y axis
    DoOEMButton(186) 'sets Y axis
    Speak "y"
    End If
    State = 4
    Case>=419
    If GetOEMLED(57)=0 Then 'tests for MPG mode
    DoOEMButton(327) 'sets MPG mode
    End If
    If GetOEMLed(61)=0 Then 'tests for Z axis
    DoOEMButton(187) 'sets Z axis
    Speak"Z"
    End If
    State=5
    End Select
    'Note there are 7 additional cases availalbe on switch values 512,605,698,791,884
    '977 and 1023 as I am only using 5 of the 12 positions on the switch

    'LCD display
    LCDString="" 'Clears LCD String
    'update the LCD
    For axisID = 0 To 2
    Sval=Right(" " & Format(getdro(axisID),"+0.0000;-0.0000")&String(17-Len(Format(getdro(axisID),"+0.0000;-0.0000"))," "),18)
    'gets the dro value for the axis then pads the right end with spaces so it formats on each line of the LCD display
    axisName=Mid("XYZABC",axisID+1,1) 'selects the axis
    LCDString=LCDString & axisName & ":" &SVal ' strings the axis name and value
    Next axisID
    SetModIOString(6,0,0,LCDString) 'writes it to the dro
    Cheers,
    Rod

  10. #9
    Join Date
    May 2003
    Location
    Perth WA
    Posts
    3,784

    Default

    A couple more nights working the scripts and help again from Peter has resulted in a move forward so that I now have LED lamps and input switches working on the ModIO.
    I have added another 12 position switch to set the step increment and a switch to reset the feedrate to 100% as well as LED's to indicate machine conditions. See photo of lash up.

    The VB code is getting longer and I will not post any more of it until this project is finished. Don't be put off by the VB code as there is a perfectly good plugin you can install that avoids all the mumbo jumbo of writing code. I am one of those difficult people that if I can't achieve it myself then I don't get any satisfaction from the project.

    Now I am over the learning curve things are clearer and I am in a position to start designing the console panel. I have cut steel tube and dropped it off to get welded for a stand to attach to Morphy. I have done some research and found a bi-fold arm for a LCD TV which will be suitable for mounting the console - I hope. There will be an aluminum tray underneath the console to hold a mini keyboard and a mouse. A 17 inch touchscreen will add to the arsenal. So there will be three options - ModIO operated switches on the console, keyboard/mouse combo and touchscreen controls.

    Ah well if you are going to do it you may as well go the full monte.

    As I will not be using my exisiting console which has a computer mounted inside it (see photos) I need to think of a suitable computer and where to mount it on Morphy. I have a couple of options and more on that when I get my act together there. I am sure my son will appreciate the old console to operate Obott.
    Cheers,
    Rod

  11. #10
    Join Date
    Dec 2008
    Location
    Melbourne
    Posts
    269

    Default

    Hi Rod,

    Sounds like it is starting to come together. I'm looking forward to seeing the metal work.

    Cheers,

    Peter.

  12. #11
    Join Date
    May 2003
    Location
    Perth WA
    Posts
    3,784

    Default

    Knocked up the carcase for the console tonight out of 1mm galvo sheet. Nothing special but by making it it has fixed the size to 500mm by 400mm and 65mm deep. I had to get SWMBO to swing on the bender with me as I didn't have any lighter gauge material on hand.

    It is heavy already so I hope my console support arm is up to the task.

    The way I have designed this I will be able to position the console over the table of the router to be able to access the controls when setting up a job then swing it ouside the machine while the job is running. This will mean I do not need at pendant. If you make enough of these you end up getting it right eventually.

    I am waiting on some switches so not much more I can do until they arrive. They are triangular buttons normally used on Video Arcade machines so I hope they are as good as the photos on ebay as they will be perfect for jogging switches.

    I have quite a bit of lathe work for another job so it will be a good opportunity to tackle that tomorrow therefore there will probably be nothing more on this thread until later in the week.
    Cheers,
    Rod

  13. #12
    Join Date
    Jul 2006
    Location
    Bundaberg, QLD
    Age
    56
    Posts
    502

    Default

    Nice work Rod. I must get around to making one of those pan brakes one day.

  14. #13
    Join Date
    May 2003
    Location
    Perth WA
    Posts
    3,784

    Default

    The switches came today but unfortunately a little large for the space I have available. They are 43mm along the flats and would have been terrific being different colours (five flavours) and led internal lamps. You can also slip the clear cover off and put a printed label in there. See photo

    Never to be beaten I say so back up plan was a set of Arcade joysticks in the same parcel. Just modifed one of them and pleased with the result. Cut off about 25mm from the stem and turned and polished a slick aluminum gear shifter.
    I think I will be playing race cars instead of machining.
    Photo shows before and after. I will use one for X and Y and the other for Z and maybe A if I get around to it.
    Cheers,
    Rod

  15. #14
    Join Date
    Jan 2006
    Location
    Moss Vale NSW
    Age
    80
    Posts
    317

    Default

    Rod,
    I 'luv' the joystick ... that is something I can really relate to! Must be my deprived childhood (no X boxes back then!). Did you get these from your Chinese ebay man?

    These would work OK with the Pokeys system as well wouldn't they?

    Cheers,

    Alan
    4 out of 3 people have trouble with fractions.

  16. #15
    Join Date
    May 2005
    Location
    Cockatoo Vic
    Posts
    996

    Default

    Quote Originally Posted by Zoot View Post

    These would work OK with the Pokeys system as well wouldn't they?
    Pokeys has five analogue inputs. Say two for FRO and Spindle OR, That leaves one input for each of three axis.

    Having never played with one of these joysticks I am not sure whether they need one input per axis or two. I am guessing they need two.

    Rod you are the procurement or ebay king.

    Where do you get these joysticks? Might have a play with some.

    Greg

    EDIT: On closer inspection I think these are microswitch operated joysticks. (Rod can confirm that) Therefore analogue inputs are not applicable. I jumped to the conclusion that they were proportional.

    So any of the 55 available digital inputs would be fine. Four per joystick.

    You could combine that with a separate pot or dial, to one analogue input to provide the jogging speed control. That should work OK.

Page 1 of 2 12 LastLast

Similar Threads

  1. Console the Key Emulator Method
    By rodm in forum CNC Machines
    Replies: 133
    Last Post: 14th October 2014, 11:49 AM
  2. WIP - Lowline TV console
    By Fuzzie in forum FURNITURE, JOINERY, CABINETMAKING - formerly BIG STUFF
    Replies: 85
    Last Post: 27th February 2011, 09:05 PM
  3. Console - Group Tutorial
    By rodm in forum CNC Machines
    Replies: 48
    Last Post: 4th August 2009, 10:53 PM
  4. Centre console
    By philzero44 in forum BOAT BUILDING / REPAIRING
    Replies: 8
    Last Post: 30th November 2008, 01:02 AM
  5. Beginner making car console. Veneer advice
    By rrrestore in forum WOODWORK - GENERAL
    Replies: 2
    Last Post: 31st March 2008, 08:46 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •