Hello Guest it is September 23, 2023, 09:38:19 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - mrprecise44

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 »
dspMC/IP Motion Controller / Re: DSPMC Macro
« on: December 13, 2013, 09:35:07 PM »
Anilam should have the technical info you need, with an explanation of the sequence involved. I am sure the scales had a specific software routine for setting machine Ref Zero point, which certainly is not like the basic sub-routine in the dspmc controller software.

As I understand macro's and/or ModBus, neither is fast enough to accurately place the Z channel location after it goes Hi.
There is something missing in this equation.

The two marks must be made to work in sync, for placing the axis Ref point. There is a reason the two marks are 10cm apart.
I have a dspmc controller, and use the CNC mill original ref switch, and the encoder Z channel to set the "Machine Zero" point. This is on a 1985 commercial CNC machine I retrofitted a few years ago after the original controller went bellly up. The original machine method for setting "Machine Home" is exactly as it is done today. No macro's involved.

Also, the Ref micro switch is not a limit switch. My machines have 3 micro switches per axis; the Ref micro switch trips slightly before the limit switch for that axis is reached. Once the Ref switch has set "Ref axis" cycle in motion, it does not trigger again, unless you re-run the Ref cycle for that axis. The limit switches are almost never tripped, unless you forcibly jog into them, due to settings in "Homing and Limits."

It could be, the 2 Anilam "Z" channels 10cm apart are made to work in sync, with the first one tripped being a signal to slow the machine, and approach the second Z channel as one being the Ref "Machine Zero" point. This would allow a faster speed in the Ref cycle, without overshooting the target Z channel. Then all the machine limit parameters could be written into a table, based on machine axis travel.

Some set-ups use one of the Limit switches as a Ref switch, but that is not as accurate for repeat-ability. A lot of Mach3 users do not have encoders, or need them for the kind of work they do.

Maybe another forum member with the same setup using glass scales will have the answer. I am just making an educated guess.


dspMC/IP Motion Controller / Re: DSPMC Macro
« on: December 13, 2013, 06:15:19 PM »

The reference signal (the Z channel) is for setting the "Machine Zero" on a CNC machine. After the referencing of the machine, you can jog the machine to any position within the physical limits of the machine and set your "Work Zero". For accurate work, this is where you would use an Edge Finder, or a digital probe, to set you X0.00, Y0.00, and Z0.00 for the job. For most users, this will be the G54 offset from Machine zero, and the DRO's will read 0.0000 in all axis that have been referenced when you set the Zero for that job. You can also set multiple "Work" offsets if you have several fixtures, G54, G55 ... etc, with programs appropriate for each given fixture. All these offsets become written into the Mach3 "Offsets Table."

If you are at the "Work Zero", by clicking on the "Machine Zero" button, you will see the actual distance in inch or millimeters your work zero for each axis is from the "Machine Zero" of that particular axis, after the machine has been "Referenced."

Many people do not bother with this procedure, and just move to where they want the Job zero to be and click Ref All. This works if there are no reference switches, and/or a machine does not have shaft encoders, such as a stepper motor machine. However, there are also "Hybird" stepper motor drives that utilize encoders.

The purpose of the encoder Z channel for machine referencing is to provide a repeatable, fixed, reference point that can be re-established after a machine/computer shutdown, as at the end of the day, and reset the Machine Zero the next time the CNC is started to the exact point it was before. Since the Encoder is fixed to the machine leadscrew, the Z channel is a known point in the machine travel which never changes. Thus, the job fixture you have on the machine can be used without needing to re-indicate the X,Y,Z positions since the "Work Zero (G54) has been established already, and is in the machine memory, and stored in the "Work Offsets" in the Mach3 program. When restarting the machine, you "Ref All", which Mach3 will automatically perform, and then the "Goto Zero" command will move to the exact point of your "Work Zero".

On a CNC machine with Encoders, there is a Reference Switch, and an Encoder Z channel. The Reference switch is located near a given axis physical limit, with a little space left. When you tell the machine "Ref X", or Ref All", the machine will move towards the particular reference switch until the switch is tripped. This micro-switch signal informs the system to reverse direction, and move at a slow speed until the Encoder Z channel is seen. Since the Z channel is a "Once per revolution signal" it is as accurate in repeatability as the resolution of the Encoder, or in your case, the Scale resolution. This Z channel is far finer resolution than the repeatability of any mechanical micro switch, which may be off a few thousands of an inch each time it is tripped, or even one or two thousands of an inch. The reference switch is necessary so the machine does not look for the Z channel until it is near the machine physical limit, and within one revolution of the leadscrew. This Machine Zero can usually be repeatably accurate to .0001 inch. The Z channel signal is ignored except when doing a "Reference" on that axis

The Z channel signal happens in such a brief space distance that it cannot be seen with a simple voltmeter. The machine electronics detects the signal because it is simply waiting for a digital transition from a 0 (no signal) to a digital 1 (voltage signal Hi), which can happen in milli-seconds. At this point the machine software automatically sets the Machine Zero.

Regarding your glass scales, I suggest you read the procedure the manufacturer wrote regarding machine referencing, which should be similar to a rotary encoder system.
This procedure is basic to all commercial CNC machines.


It may be possible.

I am still unclear on the reasoning to use an arduino, ethernet shield, writing arduino code, etc.

Mach3 will drive 3 axis simultaneously, or one axis singly, in any direction (or Vector in the case of 2 or 3 axis), and rate you decide upon. CAD programs, some even free (Draftsight is a superb freebie) can produce dxf files from a line drawing, which can be converted into a G-code by a CAM program (I like CamBam), loaded and run.

There are topics in this forum describing how to package multiple programs and run them automatically in a "batch file" manner.

Much (maybe even most) of what is now done with Mach3 doesn't involve "hand writing" of G-code, except some specific scripts like running multiple programs as above.


The pokeys ethernet version I/O board can be controlled via a web interface. Check out www.poscope.com, and read up on their software "PoBlocks."
However, it is not at all clear why you want to eliminate Mach3 from the equation. It would be fairly simple to write a short program to move all the axis in any sequence, and repeat with a loop function.
Also, there is a ModBus arduino sketch available in the ModBus section of the forum making the arduino a PLC via the serial port. Also, as you must know, there are versions of the arduino that are ethernet capable. The arduino ModBus still has to comm with Mach3 via brains.

Perhaps a little more explanation would be of interest to the forum. Also, you might expand on this issue in the pokeys forum section. Pokeys is introducing a new software version later this month. Neo discusses it in the pokeys section.

It sounds interesting.


General Mach Discussion / Re: Serial input to Mach3
« on: December 10, 2013, 03:00:27 PM »
The ModBus tutorial by zafarsalam is: topic # 22982.

General Mach Discussion / Re: Serial input to Mach3
« on: December 10, 2013, 04:25:57 AM »
Mach3 will read serial data from ModBus output.

You have to check the box in the first page of; Config/ Ports and Pins/Engine Configuration ...Ports & Pins.

Lower right corner box:
check;  ModBus InputOutput Support,
check; ModBus Plugin Supported.

Then you must enable the correct port in:
Config/ General Config; Lower left box "Serial Output, check the serial port#, input BaudRate in the box, select 8-bit 1stop.

Now open "Function Cfg's" on Menu; scroll down to "Setup Serial ModBus Control", and click open the page, "ModBus Configuration".

Fill in the boxes at the top of the page; Port Num:, Baud Rate,

Each ModBus input signal will be listed in one of the Cfg # rows. You can write in a brief description in the "Device" column.

When these are filled in, you can test your I/O with the "Test ModBus" box. In the case of an Analog input, you will see the values change as you turn the potentiometer.

Read the example in the ModBus section of the forum, written by Zafar. He has a complete step by step with pictures of setting up an Analog feedrate including the Brains. You need to write a brain, to input your ModBus analog input into an OEM code input.

After a bit of trial and error, you will get it working. Also have a look at some of the Mach3 videos regarding Modbus.



Modbus / Re: Arduino, Homann, Cubloc,etc.. Comparison
« on: November 23, 2013, 02:19:28 AM »
Hello rkonnen:

I just noticed this thread tonight, and will give some feedback.
There are several kinds of Modbus devices available, and as far as I know, they all work.
Perhaps the most common usage for Modbus is installing a potentiometers for Feedrate override, and Spindle override.

My first Modbus device used was the Cubloc brand. If you check out their website, they have a wide variety of boards. Programming the board is done with the CuBasic program, which is able to monitor and debug your program logic. Cubloc uses Ladder Logic, and/or Basic. They are the only ones to use a combination of Ladder and Basic, which run simultaneously. After your program is working, it becomes a stand-alone board, connected <> the serial port. If your computer does not have a serial port, you can use a serial converter that makes a USB port a virtual serial port. Cubloc has an excellent manual, which can be downloaded, or purchase the paperback copy. The prices are very reasonable. A medium Cubloc setup will run about $100.00 They have starter kits with everything necessary to set up a working Modbus system with Potentiometers, pushbuttons, LED's, Serial ports for programming and communication.

The other Modbus system I have used is the Arduino single board computer. If you have not looked at, or used the Arduino it is a complete system of boards using a version of "C", to do amazing stuff with your computer. It is known worldwide, and has a huge customer base. The array of boards is quite large, and many different companies make them under license. The original Arduino ran at 8MHz, but the more common ones run at 16MHz. The latest versions are using an advanced chip that runs at 85Mhz. The board runs on 5v. The Arduino forum is an excellent source of engineering/electronic advice by knowledgable experts. The basic Arduino board can communicate with Mach3 through the USB port using a version of Modbus available on this forum. The basic boards cost from $35.00 US to 65.00. The Arduino Mega 2560 has over 50 I/O ports, including 15 analog/serial, and PWM conversion. The Arduino Modbus setup is probably the lowest cost way to use Modbus with Mach3, and maybe the easiest. Some versions of Windows do not run the Arduino IDE properly. The XP works well though. Many of the newest versions of Windows seem to have strange problems though. 

Whatever Modbus you use, the interface to Mach3 will need to use "Brains" to drive the appropriate OEM code.

As with all things in electronics and interfacing devices, there is a learning curve.


The more I use CamBam, the more impressed I am with it's capabilities. What I did not mention is the writer of CamBam is a one man show, and he frequently comments, and answers questions on the forum. When he produces a new variation of some part of the program, he puts it out as a beta version, and the power users comment on what they think. After a while, perhaps a month or so, that version becomes the newest edition. Also, users write small "apps" to add on the the program, that do particular things, like adding an orthogonal view or some such thing. Also, the "Help" file is second to none, in CAM software.


The best explanation of G-codes is the book;

CNC Programming Handbook, 3rd. Edition: Peter Smid.
It is available on Amazon.com.

If you make some programs using wizards, or CamBam, the code will run. Study the finished code, watch it in the Mach3 scree as it runs, and simultaneously  read the sections in the Programming Handbook to make sense of what was produced.

Commercial CNC machines from different companies, often do not share identical G-code, to perform the identical task. This goes back to the early days of CNC, when controllers were proprietary, custom designed; a total black-box. Much of that has changed with a PC becoming the main engine of the controller. The CAM programs on the market all have "Post Processors" to output G-code that will run different makes of machine controllers. This alone can become a long, difficult process getting a retro-fit machine to run.

If the CNC machine tool industry followed one single standard, and adhered to common rules of G-code useage, things would be vastly different. Such is not the case.

In the field of shipping and navigation, aircraft and navigation, strict rules are followed, and legally binding.

Mach3 has been developed based on Fanuc G-code useage.  

There are many videos out there produced by various CAD/CAM companies, but they are designed to sell you their program. I don't think watching those videos will teach much about actual G-code useage. That is a learning process all in itself.

In actual CNC machining work, much more time will be spent learning the intricacies of a given CAD/CAM program than what a particular G-code means.

In the past, CNC machine memory was extremely costly, and often had limits of the total amount a machine could read. Today, memory is virtually unlimited, running into multiple millions of lines of G-code, as in graphic carving or engraving programs, or very complex 3D sculpting. Mach3 can handle up to 10 million lines of code in one program.


Welcome to Mach3 menglor:

Starting out in CNC machining today is much easier than in the past, where it was necessary to learn G-codes and link them together into a program; test run the program cutting air to detect any major mistakes you very likely made, such as trying to cut the vise in half, before committing the cutter to metal. Many shops made a part from wax or high-density foam before actual machining. A misplaced decimal point or typing “4” instead of “3” could mean disaster. The amount of time to produce a working, final CNC program was agonizing, and mentally exhausting. 

Advances in computers, i.e. high speed processors, massive memory, color graphics, CAD/CAM programs and variants of CAD changed the world of machining forever. Today you can watch your program gobble away a "virtual" chunk of material, transforming it into your part using all the cutters and drills you chose. And the best part is you can do more work, in a tiny fraction of time and expense than ever before, and see it all “Virtually” before you cut actual material.

CAD programs besides making a drawing, output DXF files for a shape, or holes/pockets/bolt hole patterns quickly and accurately. The CAM program reads the DXF file, and outputs your G-code.
For CAD drawing I use DraftSight, an absolutely fantastic free CAD program, produced by the makers of Solid Works, Dassault Systemes, of France. Solid Works is a high-end, world class program. There is a learning curve to all CAD/CAM programs, but is time well spent if one is serious about doing CNC machine work.

There are many good CAM programs to produce your G-code. Personally, I like CamBam and CutViewer, partly due to price, but there are many to choose from. CamBam has a 30 day free trial, a forum, very thorough Help file with graphics, and a post-processor tailored for Mach3. CutViewer, also with a free trial entry, works from within CamBam, enabling you to jump back and forth, and edit until you like what you see. In CutViewer, your "virtual" material can be crashed into, cut in half, or otherwise destroyed, but the program will stop and show you where the code line is, no matter how many thousands of lines of G-code into the program it happened. You can measure any section of a finished “Virtual” part, zoom in to see a detail, speed it up, slow it down, to see every move a cutter makes.

Mach3 has built in "Wizards", created over the years by knowledgeable Mach3 users and donated to the community, that can perform many common functions, and write the code directly into a Mach3 program, creating the G-code for you; answer the prompts, and run it on the screen before cutting anything. Pockets, drill patterns, keyways, arcs, face milling etc.

The "Mach3 Addons" are licensed wizards for $50.00, which are more refined than the freebies, with a similar look and feel. Log onto the "new" website advertised at the top of the Mach3 Forum page.You can do multiple kinds of routines with multiple tools, and they are linked together into one single program automatically.  You can create a complex machining operation involving many tools in minutes!
The "Mill Wizard" is another stand-alone program of wizards, licensed at $75.00. This is a variation of the Addons, with more advanced features. Both of these wizards have their place in the family. Both of these programs and the free wizards are opened from within Mach3.

The wizards are not sold as “CAD/CAM" programs, but actually are for machining frequent tasks, i.e.  drilling bolt patterns, facing, pocketing, slotting, keyways, arcs, circles, etc., and can be zoomed, rotated, tested "virtually." The writers have demos, and step by step pages you can study on the site.

There are lots of "freeware" CNC programs out there on the internet, but in my opinion the Mach3 wizards and licensed wizards are superb, worth every penny, and won't strain the budget. They are fast, accurate, very intuitive to use, and well thought out. The  amount of finished G-code cranked out in seconds is impressive.   

When you get deeper into CNC, there are more powerful 3D CAD programs available, at much greater cost of course. Engraving, photo artwork, lithophanes, 3D/ 4-axis carving, are all doable with Mach3 and home shop machines.


Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 »