Using 1 motor driver wouldn't be a good idea,
though a common enough method for running 2 motors so that they step in unison,
but in reverse direction of each other, for machines with wide...
Type: Posts; User: bernster
Using 1 motor driver wouldn't be a good idea,
though a common enough method for running 2 motors so that they step in unison,
but in reverse direction of each other, for machines with wide...
I'm gonna leave this thread for now and just before I go,
there's a couple of small points I need to post.
The very 'raw' G-code I posted is in fact extremely bad code.
I would not to attempt...
Hi doorknob,
Sorry to hear about the bad weather you guys are getting.
We get our fair share here also from time to time.
Anyhow, I hope you can find something useful in my posts.
As far as my position on the suitability of implementing Python to create a machine indexer is concerned,
there is a very real possibility that Python may not be a suitable candidate.
I have spent...
High Ron,
From the beginning, I did mention that were easy ways to get results.
The long way to get there was for those not yet used to Python and that
many small things may be learned within the...
As for the Indexer, which is yet to be covered,
I'm still running time trials with Python's output,
based on calls to the operating system and although
my original tests appeared to be ok, I have...
Here is also a few lines of very 'raw' G-code, you could use to
see just what 'theParse' will do with it.
To make use of the G-code,
open notepad then copy and paste the G-code to it.
PyNC will...
Here is a real working example of 'theParse'
I have tested this and it works just fine.
First thing to do is;
Delete the function 'def theParse():' from the original 'PyNC' program.
Then copy...
Hi there 4lowie,
Only because I use this, I am of course biased in my opinion at least to the electronics, you could look at a local G540 unit for driving your stepper motors, you can get your...
Here we arrive at;
def theParse():
We have come a long way to get here.
But, I must write a few things first, before I can proceed further.
This part of the program is 'the engine'.
But...
Before I move on to theParse():
I want to look at a very small command that you will have seen
'scattered', liberally throughout the entire PyNC program.
This small command is;
time.sleep()
...
Import a G-code file
--------------------
def getimportList():
As mentioned earlier the enumeration and listing of files in the folder
named 'import files', is practically the same as def...
We'll now move on to;
Load values from a ncv configuration file
-----------------------------------------
From the main menu item '5',
the call for 'def getncvList():' is made.
At this point,...
You will find the function.... def getimportList():
practically the same as.... def getncvList():
getimportList(), enumerates and lists any files found in the import files folder.
This is the...
From def getncvList():
which is to give us back an enumerated list of files within a folder,
this is the sort of result you would be expected to end up with;
0 this is a file.txt
1 this is...
Display a list of files in a directory /(DIR) /(folder)
-------------------------------------------------------
Now we look at the function;
def getncvList():
This is a very small function, but...
Naming a file for the Windows os environment
--------------------------------------------
Sometimes you want to name a file using more than 1 word
in the string.
You can just go ahead and use...
In the function... def userinPut():
we start out with calling... Openupdatencv()
The program will imediately run the function and open the file;
'updatencv.prg'
showchngeInstrctns()
This...
We'll take a look at some of the aspects of the program.
At the very top of the program, there is the roadmap for
the ncv configuration file.
It is also used to create a blank ncv file.
The...
It seems that PyNC wins.
Being busy these last couple of weeks, I've lost some ground
with this project, so I decided it was better to script a large peice of
the program and post it.
It is fully...
How to construct raw input properly to gather information.
----------------------------------------------------------
Getting information from a user and storing this in a file
can be important...
Back again,
and thanks for the feedback Gary.
The HPGL converter is successful and now in use. Only 1 small 'bug' needed fixing.
It was a minor problem but it took some time to come...
Big apologies to anyone reading my posts.
I have been busy these last weeks, so I've had no spare time.
I have just concluded a new program for the translation of G-code to HPGL.
This is of course...
I need to briefly review a previous post where I referred to;
'checkifilethere'
Here is the code from that post.
import os.path
try:
checkifilethere = open('c:/temp/trial.txt','r')...
We know already that 'variables' store values and
are also used to 'call' on functions.
Functions can also 'call' other functions.
This is a call to a function;
fredOne()
We just state the...
Lets look at a simple menu.
I have placed the menu inside 'main'
We run a menu within a 'while' loop.
The 'while' loop will run forever until an 'event'
causes it to stop.
I was going to...
Lets take a look at the 'Program Main' function.
When we run a complete program, we want it to begin at a place
where we can tell it to perform anything we have given it the ability
to do so....
these are our topics covered so far;
------------------------------------------
1: import the needed python process modules
2: open a file to read
3: search function(method)
4: all search...
Let's look at how to create a DIR ... file folder for Windows
Below is a function 'method' to create new file folders
This is of course not indented, it's just to show the codelines.
def...
Just a little note on Python code writing.
This may seem 'child like', but programs and computers are 'child like' in many ways.
In a small way, we could think about Python as being like the...