Keyboard Shortcuts
ctrl + shift + ? :
Показати всі комбінації клавіш
ctrl + g :
Не доступний для безкоштовних груп.
ctrl + shift + f :
Знайти
ctrl + / :
Сповіщення
esc to dismiss
Лайки
- MachCNC
- Повідомлення
Пошук
Updated photo album Fraser CNC
#photo-notice
Group Notification
fraserneville@... updated the photo album Fraser CNC : Some views of my 3D printed machine. The controller is an Arduino using the V3 controller board and my old drivers. Bed area is about 400 X 600mm Z is about 80mm |
Added photo album Fraser CNC
#photo-notice
Group Notification
fraserneville@... added the photo album Fraser CNC : general view of my #D printed machine. |
Re: Leaving MachCNC behind me.
ANy pic's of yer new setup ? thanks animal On 12/9/24 12:42 PM, fraserneville via
groups.io wrote:
|
Leaving MachCNC behind me.
Hi all.
Firstly, thanks to all those whose advice helped me all those years ago setting up my first CNC machine.
Two disasters impacted my early use- my laptop with a parallel port got stolen and the insurance wouldn't replace it with a similar item.
I solved this by building a desktop using a core board that included parallel. Unfortunately, a mouse plague meant that the innards of this got eaten and wrecked.
When researching a replacement, I found that for my needs at least it was cheaper and easier to use Open-Source, USB oriented software now.
I had dismantled my original CNC and rebuilt it with one using 3D printed parts. This one is bigger and more accurate.
Anyway, thanks again to the community and good times with your CNC-ing!
Cheers,
Neville
|
Re: script brain
On Wed, Sep 18, 2024 at 04:14 AM, Stephen Muscato wrote:
hello everyone in the meantime, I racked my brain :o) and I managed to make my relay work I just renamed the OEM code of a led on the "Ports and Pins" side I understood their usefulness to do external actions thanks for the info ++ gilles |
Re: script brain
I wrote a script many years ago and don't remember much. Have you tried "Ports & Pins" you can select outputs there. Could you describe in more detail what you are trying to do? I understand activate a relay, but "when a led is on" I don't understand. Steve
On Monday, September 16, 2024 at 06:51:42 AM CDT, perso.gilles via groups.io <perso.gilles@...> wrote:
hi
i'm starting the brain script and i'm stuck on how to activate a relay when a led is on a helping hand please ++ |
Micro Switch CNC Shield V3
--
Hi everyone , I need some help with the home_sense and the pins associated for micro switches. The page says that the correct pins are GPIO 18 and GPIO21 (CNC Shield V3) but the last one doesnt exist. And then , I use another pins which fix this error but it continues failling when the switch is pressed |
wxtimer
Is the wxtimer working as in the older versions of mach4 i still see the wxpanel and wxtimer event in the screenload script, but if i create a button and do a timer:Start(10) i get a message box saying there was a script error no other messages do you have to start the timer differently it used too work... or do you have to use the timers attached to the scr.StartTimer(0,100,1) only now
thanks gary |
Re: angle calculation g68
Atan[3]/[20] works in Mach3 Gcode, not in an external card. If you have Mach3 on a PC with no connection to a controller or machine then you can use:
G90 #50=Atan[3]/[20] g0 A#50 and the DRO for the 4th axis will show the correct angle. If I then use G68 A0 B0 R#50 you can see the Local System has changed to +8.5 This is on my laptop that I use for work away from my workshop. As I said though, you need to have the 4th axis enabled. |
Re: angle calculation g68
hello Martin
I thank you very much for the time you take to help me
I managed to turn the drawing on the screen with the following commands
Code “G68 A0 B0 R” & Final result
Sleep(150)
doOEMButton (160)
I finish this way of doing things and then I start again by trying your method with the G31
but as said above, the function (atan) does not work for me why is it the grand mistere
I think that the function is not implemented in the Chinese controller card that I use
fortunately, I have an AXBB-E ready to be assembled
I will soon start testing on my machine, I test with the F7 command of the Mach3 VB editor and it seems to work |
Re: angle calculation g68
Glad I could help with the angle calculation. Here is something to consider. If you are not currently using the A axis you can make use of it. The A axis is rotation about the linear X axis and uses DRO 803. You can set the A axis to be active, write a value into the A axis DRO and then when you leave the script it will be there for you to see on screen.
There is also the option to do the angle calculation in Gcode using G31. When you probe using G31 the values of X Y and Z at the probing point are written to parameters #2000, #2001, #2002. For example set up parameters #50 = 0 (X axis change, you could set this to 20) #51 = 0 (Y axis change, may not be needed) #52 = 0 (Z axis change, you could set this to 3) #53 = 0 (slope, may not be needed) #54 = 0 (angle) #1000 = 0 (temporary variable) #1001 = 0 (temporary variable, may not be needed) #1002 = 0 (temporary variable) So go to your first probing point, set your own temporary variables to the values at the probing point. #1000=#2000 #1001=#2001 (may not be needed) #1002=#2002 Go to your second probing point then the axis changes will be given by: #50 = #2000 - #1000 #51 = #2001 - #1001 (may not be needed) #52 = #2002 - #1002 You may need to change the order of the variables in the subtraction if the angle comes out as negative when you want it to be positive. You can then calculate the angle of the probed face using Atan in Gcode #54 = Atan[#52]/[#50] Once again I have not checked this out on my machine. If I was setting this up I would probe using Z axis movement, not X axis movement. For a shallow slope a small variation in Z axis positioning will give a large variation in the X axis result, in this case at a ratio of 20:3. So if you move the Z axis and it is 0.01mm out of position then the X axis probe error will be in the ratio of 20:3, 0.0667mm. If you move the X axis and have an error in position of 0.01mm then probe in the Z axis then the error will be smaller in the ratio of 3:20 so 0.0015mm If doing this in Gcode and not using the A axis you can also use G0 A #54 to set the A axis DRO to the calculated angle (make sure you are in G90 absolute mode for this or you will get odd results). |
Re: angle calculation g68
hello Martin
I implemented the function calls the Taylor series
it worked well now, I don't think the measurements for angles less/greater than 20° are
justified for me the maximum could be less than 10°
now that the script is functional, I will look at how to integrate the result into the gcode
if you have an idea, I'm interested |
Re: angle calculation g68
It never occurred to me that they did not implement Atan in Mach3 scripts since it is a standard VB function. There is a simple work around though using what are known as the Taylor Series for trig functions so the solution for finding the angle in degrees is:
slope=Zdifference/20
Angle = 180*(slope-(slope^3)/3+(slope^5)/5-(slope^7)/7+(slope^9)/9)/3.14159
This is good to about 7 decimal places for angles below 20° so should be good enough for your needs. Once again I have not tried implementing it in Mach3 but it should work as it is using simple multiplication and division that I know works. If the exponent ^ does not work then just use slope*slope*slope for slope^3 etc. Based on what you did previously you should recognise the 180 and the 3.142589 for converting radians to degrees. If you want better accuracy beyond 20° you just need to add more terms to the series increasing the exponent by 2 each time and alternating + and - . There is an issue of diminishing returns as you increase the angle, You need far more terms to get reasonable accuracy up to 35° for example. When you get as far as -(slope^15)/15 you are down to an accuracy of 2 decimal places for the angle 35°, one decimal place at about 38°. |
Re: angle calculation g68
Hi
after several attempts Atan is not taken into account in the GCode, it is possible that the function is not implemented in the controller card (Chinese) I fell back on this formula AB = 100' distance
BC = 5' distance Y
angle = Tan(BC/AB) 'angle in radian
MsgBox(angle/(2*3.14159/360) & " degrees") 'result converted to °
here is the macro as it stands which needs to be checked, all criticism is good to take
for the moment it is functional on the X Dim angleX As Double
Const rechercheMax = 10
Const degagement = 5
Const deplacementMaxPointB = 20 'un GETOEMDRO(1001) sera utilise plus tard pour choisir la deplacementMaxPointB
Const vitesseRapide = 1000
Const vitesseApproche = 100
Const vitesseLente = 50
YDro1 = 0
YDro2 = 0
'deplacementMaxPointB = GETOEMDRO(1001) ' distance max à parcourir
SETOEMDRO(800,0) 'Mise à 0 de l'axe X
SETOEMDRO(801,0) 'Mise à 0 de l'axe Y
While isMoving()
Wend
'******************* 1er MESURE *******************
CODE "G31 Y"& rechercheMax &" F"& vitesseApproche
While isMoving()
Wend
YDro1 = GetOEMDRO(801)' Lit la valeur de Y
YDro1= YDro1 - degagement ' nouvelle valeur de Y
CODE "G1 Y" & YDro1 & "F"& vitesseRapide
While isMoving()
Wend
CODE "G31 Y"& rechercheMax &" F"& vitesseLente
While isMoving()
Wend
YDro1= GETOEMDRO(801) ' Lit la valeur de Y
YDro1= YDro1 - degagement ' nouvelle valeur de Y
CODE "G1 Y" & YDro1 & "F" & vitesseRapide
While isMoving()
Wend
'******************* 2éme MESURE *******************
code "g1 x" & deplacementMaxPointB &" F"& vitesseRapide 'Deplacement pour la 2éme mesure
CODE "G31 Y"& rechercheMax &" F" & vitesseApproche
While isMoving()
Wend
YDro2 = GetOEMDRO(801)' Lit la valeur de Y
YDro2= YDro2 - degagement ' nouvelle valeur de Y
CODE "G1 Y" & YDro2 & " F" & vitesseRapide
While isMoving()
Wend
CODE "G31 Y"& rechercheMax &" F"& vitesseLente
While isMoving()
Wend
YDro2= YDro2 - degagement ' nouvelle valeur de Y
CODE "G1 Y" & YDro2 & " F"& vitesseRapide
While isMoving()
Wend
'******************* CACUL FINAL DE L'ANGLE ************************************
YDifference = YDro2-YDro1
MsgBox ("La difference sur X est de: " & YDifference & "mm")
angleX = Tan(YDifference/deplacementMaxPointB) 'angle en radian
MsgBox("L'angle sur X est de: " & angleX/(2*3.14159265359/360) & " degres") 'resultat converti en degres
|
1 - 20 з 155590
Повідомлення
Більше
Додаткові параметри
Більше
to navigate to use esc to dismiss