helicalYZ()

Describe

Use clockwise arcs or counterclockwise to draw the helical lines. The direction is seen from the positive direction of the X-axis where the circular motion occurs.
This method uses the center mode to control the helical path and uses the positive and negative values ​​of the rotation angle to select clockwise or counterclockwise.
If you want to know about various exercise methods, please refer to the exercise method explanation page for details.

Grammar

machine.helicalYZ(cY, cZ, dstX, theta); machine.helicalYZ(cY, cZ, dstX, theta, feedrate);

Parameter

machine: It is an object of Machine. .

cY: The Y coordinate of the center of the circle in the center mode. .

cZ: Z coordinate of the center of the circle in the center mode. .

dstX: Target X coordinate, that is, when the arc is moved, the axis is moved to the target coordinate. .

theta: The angle to rotate, use positive value clockwise, and negative value counterclockwise. .

feedrate: Feed speed, the last recorded feed speed will be used when no parameters are transferred. .

Return

bool:

true: The machine exists and is created successfully.
false: The machine does not exist or failed to create.

Example

Set the basic parameters of the machine and spiral the machine on the YZ plane.

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

29

30

31

32

33

34

35

36

37

38

39

40

41

#include "Motion86.h"

 

// Generate machine objects. You can use up to three machines, machine 0~2, each with three axes.

Machine machine(0);

 

// Stepper Motor enable pin。

int EnablePin = 4;

 

void setup() {

  while (!Serial);

  pinMode(EnablePin, OUTPUT);

 

  // If necessary, the direction of motion of the axis can be reversed.

  // In this example, you need to reverse the direction of the x-axis and the y-axis.

  machine.config_ReverseDirection(AXIS_X);

  machine.config_ReverseDirection(AXIS_Y);

 

  // PPU (pulse per unit) is a virtual unit of length, which is determined according to different requirements.

  // In this example, the unit length of the x-axis is set to 80 pulses, which corresponds to 1 mm in actual application.

  machine.config_PPU(AXIS_X, 80.0);

  machine.config_PPU(AXIS_Y, 80.0);

  machine.config_PPU(AXIS_Z, 1600.0);

 

  // Before controlling, the machine must be started.

  machine.machineOn();

  machine.setDefaultFeedrate(400);

 

  // Start the stepper motor.

  digitalWrite(EnablePin, LOW);

}

 

void loop() {

  // Move both circles clockwise from center (0, 0, 10) to (10, 0, 0).

  machine.helicalYZ(0, 10, 10, TWO_PI * 2, true);

 

  // Move both circles counterclockwise from their center at (10, 0, 10) to (0, 0, 0).

  machine.helicalYZ(0, 10, 0, TWO_PI * 2, false);

   

  // Wait until the planned movement is completed.

  while (machine.isMoving());

}

See also

helicalXY()
helicalXZ()


Function library reference

The text of the 86Duino reference follows the Creative Commons Attribution-ShareAlike 3.0 License. Code examples in reference materials have been published in the public domain.