1 / 37

3 Arithmetic functions

Presentation links page for lesson three. 3 Arithmetic functions. Introduction to arithmetic. Basic functions (+, -, *, /). Combining operations. Trigonometry functions. Square root Absolute value. ROUND FIX FUP (rounding functions). Priority of arithmetic operators. Example.

rhea-dodson
Télécharger la présentation

3 Arithmetic functions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Presentation links page for lesson three 3 Arithmetic functions Introduction to arithmetic Basic functions (+, -, *, /) Combining operations Trigonometry functions Square root Absolute value ROUNDFIXFUP(rounding functions) Priority of arithmetic operators Example

  2. Introduction To Arithmetic Just about anything that can be done on a scientific calculator can be done in a custom macro program Add Subtract Multiply Divide Square root Logarithms Sine Cosine Tangent Arc tangent Rounding

  3. 23 23 2 3 Introduction To Arithmetic For those functions that are not included in custom macro: Square: 23 times 23 Cube: 23 times 23 times 23 You can usually come up with a way to calculate longhand

  4. Basic arithmetic operations Equality Add Subtract Multiply Divide = + - / * #100 = 4. #101 = 2+2 #102 = 5-1 #103 = 2*2 #104 = 8/2 Variable #100 equals 4 in all expressions

  5. 10 Combining operations You can combine operations into an expression Multiplication has a higher priority than addition 6 #101 = 4 + 3 * 2 14 Again, multiplication is done first – otherwise the result would be 14

  6. 14 Combining operations If you want to force the addition to be done first, use brackets to surround the addition operation #101 = [4 + 3] * 2 7 More on brackets later

  7. Trigonometry Functions Sine #101 = SIN[30] Result: #101 is set equal to 0.5

  8. #101 45 deg 2.5R Trigonometry Functions Y component of hole location Sine #101 = SIN[45] * 2.5

  9. Trigonometry Functions Cosine #101 = COS[30] Result: #101 is set equal to 0.86602

  10. #101 45 deg 2.5R Trigonometry Functions X component of hole location Cosine #101 = COS[45] * 2.5

  11. Trigonometry Functions Arc cosine #101 = ACOS[.86602] Result: #101 is set equal to 30

  12. #101 ? #102 Trigonometry Functions Angle needed Side adjacent and hypotenuse known Arc cosine #103 = ACOS[#102/#101]

  13. Trigonometry Functions Tangent #101 = TAN[30] Result: #101 is set equal to 0.5773

  14. ? 10 1.5 Trigonometry Functions Side opposite needed Angle and side adjacent known Tangent #101 = TAN[10] * 1.5

  15. Trigonometry Functions Arc tangent #101 = ATAN[.5] / [.75] Result: #101 is set equal to 33.6874

  16. #101 ? #102 Trigonometry Functions Angle needed Arc tangent Side adjacent and side opposite known #103 = ATAN[#101] / [#102]

  17. Square Root #101 = SQRT[9] Result: #101 is set equal to 3.0

  18. c a b 2 2 2 c = a + b Square Root Pythagorean theorem #101 #102 #103=SQRT[#101*#101 + #102*#102]

  19. Absolute Value Absolute value renders unsigned (positive) value #101 = ABS[2-5] Result: #101 is set equal to 3.0

  20. Z Absolute Value User could enter positive or negative value Result is Z-1.0, regardless of entry polarity ? Z-1.0 G65 P1000 … Z1.0 ... O1000 . . . G01 Z-[ABS[#26]] F4.5

  21. Rounding Result is next closest integer #101 = ROUND[3.2] #101 is set to 3 #101 = ROUND[3.8] #101 is set to 4

  22. #19 #7 Rounding Rounding is helpful when determining the number of passes #101=ROUND[#19/#7] #7=#19/#101

  23. 0.25 0.85 Rounding

  24. 0.25 0.85 Rounding Recalculated depth per peck ensures consistent depth per peck #17 This renders three even passes of 0.2833 each #7 #101 = ROUND[#7/#17] (3 passes) #17 = #7/#101 (0.2833)

  25. 0.125 0.69 Rounding #17 This renders six even passes of 0.115 each #7 #101 = ROUND[#7/#17] (6 passes) #17 = #7/#101 (0.115)

  26. #17 #26 Rounding #101= ROUND[#26/#17] Use ROUND when you don’t care if the recalculated depth of cut is greater or less than the initial specification #17= #26 / #101

  27. Round Down (FIX) FIX rounds down to next lower integer #101 = FIX[3.8] #101 is set to 3

  28. 0.125 0.69 => original doc Round Down (FIX) #17 Use FIX when you want to specify a MINIMUM depth of cut. The recalculated depth will always be GREATER than the specified value. #7 #101 = FIX[#7/#17] (5) #17 = #7/#101 (0.138)

  29. Round Up (FUP) FUP rounds up to next higher integer #101 = FUP[3.2] #101 is set to 4

  30. 0.125 0.69 =< original doc Round Up (FUP) #17 Use FUP when you want to specify a MAXIMUM depth of cut. The recalculated depth will always be LESS than the specified value. #7 #101 = FUP[#7/#17] (6) #17 = #7/#101 (0.115)

  31. 1) 2) 3) 4) [ ] Functions * then / + then - Priority Of Arithmetic Operations Here is the full priority of arithmetic operations Anything in brackets will be done first Higher level functions (sine, cosine, etc) done second Multiplication and division done third Addition, then subtraction are done last

  32. 3 1 2 Priority Of Arithmetic Operations Example #102 = COS[#1] * [#18 + #20]

  33. Fixed jaw Workpiece moving jaw Example A vise has a fixed jaw and moving jaw Workpiece Y center position varies based upon diameter… Center Y position changes based upon diameter

  34. Fixed jaw moving jaw Example …small workpiece… Center Y position changes based upon diameter Workpiece

  35. Fixed jaw moving jaw Example …large workpiece Center Y position changes based upon diameter Workpiece

  36. X0 Y0 Fixed jaw dia moving jaw Example Formula to determine Y center position Center Y position changes based upon diameter [dia/d] / COS[45] 45 dia/2 Workpiece

  37. Fixed jaw dia moving jaw Example Related custom macro commands Center Y position changes based upon diameter O0001 (Custom macro B) #101=3.25 (diameter) . . G00 X0 Y-[#101/2 / COS[45]] . . . . . X0 Y0 [dia/d] / COS[45] 45 dia/2 Workpiece

More Related