cncwebsim icon indicating copy to clipboard operation
cncwebsim copied to clipboard

Unknown measurement units

Open Carnaxus opened this issue 6 years ago • 3 comments

There is absolutely no documentation anywhere on which measurement unit this simulator uses. I pasted in code designed for inch measurements, but the toolpath looks completely wrong.

Carnaxus avatar Feb 06 '18 01:02 Carnaxus

After poking around some more, it seems that your simulator is simulating the workpiece by diameter, but the turning movements by radius. This leads to the toolpaths being offset from the workpiece by half the workpiece's diameter. Most CNC lathes use diameter-based coordinates, so for example if my workpiece was half an inch in diameter and I told the machine to move to X 0.31, it would in fact move to 0.155, thus bringing the diameter of the workpiece to 0.31". Your simulator, on the other hand, goes to the absolute position of 0.31, meaning that there is no engagement with my half inch workpiece due to the actual workable radius of the part being only a quarter inch, or 0.25".

Carnaxus avatar Feb 06 '18 04:02 Carnaxus

@Carnaxus the lathe simulator is supposed to work on a didatic CNC FANUC 21i-T lathe. To define which unit you want to use, you need to set G20 (for mm, maybe already inferred) or G21 (for inches, maybe not implemented). G90 code is probably inferred too and defines the absolute coordinates programming, and that's why you get unexpected toolpath behaviour (it's not wrong, just different than what you expected). Please refer to this table and choose the correct configuration codes to the simulator behave the way you want.

arthurbeggs avatar Feb 08 '18 17:02 arthurbeggs

Now I'm having a whole new issue: The simulator straight up doesn't work anymore in Chrome, and doesn't render anything in Firefox.

Arg.

Carnaxus avatar Feb 10 '18 21:02 Carnaxus