![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| General CAM Discussion Discuss CAD/CAM software and Design software methods here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
I have a program written in basic that generates gcode based on user input. my problem is sometimes the output looks like this: G0 X 4.525002 Y-1.400002 Their is no reason that .000002 should be added to these numbers, it just randomly appears. All of my variables are dimensioned as single can anyone help? |
|
#2
| ||||
| ||||
| You need to round them off or truncate them to a certain number of decimals. I haven't used Qbasic, so can't tell you how to do it.
__________________ Gerry Mach3 2010 Screenset http://home.comcast.net/~cncwoodworker/2010.html (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#3
| ||||
| ||||
| If you want to post the qbasic program here, I'll take a look and let you know where to round it at.
__________________ Matt San Diego, Ca ___ o o o_ [l_,[_____], l---L - □lllllll□- ( )_) ( )_)--)_) (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#5
| |||
| |||
| Here is the file how would I format output when the print statement looks like this: PRINT #1, "G0 X"; X(m) - XA - 1.875; " Y"; RT(j, m) - YA - .75 Its a pretty long program, the first few pages are just menu commands though. |
| Sponsored Links |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |