Products for USB Sensing and Control
It is currently Tue May 21, 2013 5:48 am

All times are UTC - 7 hours [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Tue Nov 09, 2010 3:12 pm 
Offline
Fresh meat

Joined: Tue Nov 09, 2010 2:46 pm
Posts: 2
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?


Top
 Profile Send private message  
 
PostPosted: Wed Nov 10, 2010 10:45 am 
Offline
Lead Developer
User avatar

Joined: Mon Jun 20, 2005 8:46 am
Posts: 2345
Location: Canada
Probably, but you will have trouble synchronizing the steppers.

-Patrick


Top
 Profile Send private message  
 
PostPosted: Wed Nov 10, 2010 10:52 am 
Offline
Fresh meat

Joined: Tue Nov 09, 2010 2:46 pm
Posts: 2
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?


Top
 Profile Send private message  
 
PostPosted: Wed Nov 10, 2010 2:03 pm 
Offline
Lead Developer
User avatar

Joined: Mon Jun 20, 2005 8:46 am
Posts: 2345
Location: Canada
There is no hardware-level syncing, so commands for separate motors arrive is separate USB messages.

-Patrick


Top
 Profile Send private message  
 
PostPosted: Tue May 08, 2012 11:24 am 
Offline
Fresh meat

Joined: Tue May 08, 2012 11:21 am
Posts: 1
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?


Top
 Profile Send private message  
 
PostPosted: Mon May 14, 2012 11:15 am 
Offline
Phidgetsian

Joined: Tue Jan 18, 2011 5:05 pm
Posts: 5
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.


Top
 Profile Send private message  
 
PostPosted: Sat Aug 25, 2012 10:56 am 
Offline
Phidgetsian

Joined: Tue Jan 18, 2011 5:05 pm
Posts: 5
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


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group