1062/1063 for CNC control, G-Code interpretor suggestion?

What do you need Phidgets to do for you?
ccBjorn
Fresh meat
Posts: 2
Joined: Tue Nov 09, 2010 2:46 pm
Contact:

1062/1063 for CNC control, G-Code interpretor suggestion?

Postby ccBjorn » Tue Nov 09, 2010 3:12 pm

I am looking for the electronics to build a CNC machine, the Phidget 1062 is attractive but there is no software for it to run G-Code.

However, the old CNC Pro, which is a solid software for interpreting G-Code and sending it over a parallel port to a CNC machine, is now open-sourced. It is written in Borland C++

More information and source code is available here:
http://tech.groups.yahoo.com/group/CNCPro/

Could CNC Pro be ported to support Phidgets stepper drivers?

User avatar
Patrick
Lead Developer
Posts: 3064
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: 1062/1063 for CNC control, G-Code interpretor suggestion

Postby Patrick » Wed Nov 10, 2010 10:45 am

Probably, but you will have trouble synchronizing the steppers.

-Patrick

ccBjorn
Fresh meat
Posts: 2
Joined: Tue Nov 09, 2010 2:46 pm
Contact:

Re: 1062/1063 for CNC control, G-Code interpretor suggestion

Postby ccBjorn » Wed Nov 10, 2010 10:52 am

Syncing two or more 1063 I guessed will be problematic, but will there be problems with two or three steppers connected to a single 1062 also?

User avatar
Patrick
Lead Developer
Posts: 3064
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: 1062/1063 for CNC control, G-Code interpretor suggestion

Postby Patrick » Wed Nov 10, 2010 2:03 pm

There is no hardware-level syncing, so commands for separate motors arrive is separate USB messages.

-Patrick

RobertCrabb
Fresh meat
Posts: 1
Joined: Tue May 08, 2012 11:21 am
Contact:

Re: 1062/1063 for CNC control, G-Code interpretor suggestion

Postby RobertCrabb » Tue May 08, 2012 11:24 am

Imports System.IO
Imports System.IO.Ports
Imports System.Threading
Imports Phidgets.stepper

Public Class Form1
Shared _continue As Boolean
Shared _serialPort As SerialPort

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
SerialPort1.Close()
SerialPort1.PortName = "com10" 'change com port to match your Arduino port
SerialPort1.BaudRate = 9600
SerialPort1.DataBits = 8
SerialPort1.Parity = Parity.None
SerialPort1.StopBits = StopBits.One
SerialPort1.Handshake = Handshake.None
SerialPort1.Encoding = System.Text.Encoding.Default 'very important!
End Sub


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
SerialPort1.Open()
SerialPort1.Write("x")
SerialPort1.Close()
End Sub


Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
SerialPort1.Open()
SerialPort1.Write("y")
SerialPort1.Close()
End Sub
End Class


Now can you help me with the "G-Code" Interpreter?

crob.09@live.ca
Phidgetsian
Posts: 5
Joined: Tue Jan 18, 2011 5:05 pm
Contact:

Re: 1062/1063 for CNC control, G-Code interpretor suggestion

Postby crob.09@live.ca » Mon May 14, 2012 11:15 am

Hi,
I am having the same problem, I have no idea how to have the VB program run threw the code line by line and export the information to the micro.
I have been trying Arduino and figured if I find a sketch that interprets the "G code" being sent to it.
Honestly I would rather use a Phidgets I/O board along with the library they provide, the question is, what does that library look like.
Ultimately it would be awesome if mach3 could be interfaced using Phidgets and if there was a VB 2010 based program that runs Just G code alone.
How do you send packets to the Phidget i/o board using:

SerialPort1.Open()
SerialPort1.Write("run")
SerialPort1.Close()

or

SerialPort1.Open()
SerialPort1.Write("x")
SerialPort1.Close()

To jog the X axis a couple of steps or revolutions.

I can import the "G code" using VB and a .txt file, just need to know how to export the data.

crob.09@live.ca
Phidgetsian
Posts: 5
Joined: Tue Jan 18, 2011 5:05 pm
Contact:

Re: 1062/1063 for CNC control, G-Code interpretor suggestion

Postby crob.09@live.ca » Sat Aug 25, 2012 10:56 am

I have more information, I started this a few years ago and received limited help like most people just getting started.
Unfortunately at the time not much literature existed on programming a Phidget but there was lots of information on how an Arduino works.
The code I supplied before communicates with a Sketch written for the Arduino, usually written in C language, because there is a sketch written by you and installed onto the micro processor by you, you can define what I/O does what, for example if you want "X" to be I/O "0" and Y to be I/O "1" you can define it.
Phidgets on the other hand requires a programmer to develop a GUI only, the library is already written for you, the sketch has already been installed on the Micro.
To help with our software problem:
This is using a Tracking Bar, you can define the motor I/O's like this:

TrackBar1.SetRange((stepper.steppers(1).CurrentMin * 100.0), (stepper.steppers(0).CurrentMax * 100.0)) (This is for Motor 0)

TrackBar2.SetRange((stepper.steppers(1).CurrentMin * 100.0), (stepper.steppers(1).CurrentMax * 100.0))

TrackBar3.SetRange((stepper.steppers(1).CurrentMin * 100.0), (stepper.steppers(2).CurrentMax * 100.0))

TrackBar4.SetRange((stepper.steppers(1).CurrentMin * 100.0), (stepper.steppers(3).CurrentMax * 100.0))

Now how do you get the motor to move using a simple button is beyond me, but I will try to figure it out, currently I can run a motor by clicking a button but the Trackbar needs to be set first.

Hope this helps, and hope someone can help me.

Thanks,

Rob
http://whatisacnc.com

alex12345
Fresh meat
Posts: 1
Joined: Tue Sep 17, 2013 5:24 am
Contact:

Re: 1062/1063 for CNC control, G-Code interpretor suggestion

Postby alex12345 » Tue Sep 17, 2013 5:40 am

Dear developers,
is it possible to get GCode Interpreter for Phidgets stepper controllers on vba?
Thanks

josepho3412
Fresh meat
Posts: 1
Joined: Sun Aug 03, 2014 11:14 pm
Contact:

Re: 1062/1063 for CNC control, G-Code interpretor suggestion

Postby josepho3412 » Wed Apr 29, 2015 11:12 pm

At any language I suggest to try first read files with a kind of "made-dictionnary" of g-code to do interpretation for most frequent commands. Then, you can redirect (inside the same program) the outputs into the functions of phidgets: steppers, interfacekit or others. I worked very well for me. I'm moving 4 motors and checking and controlling temperature, current, and others analogical devices at fly. :)


Return to “Phidgets”

Who is online

Users browsing this forum: No registered users and 0 guests