Using ADDax too add a 200mS sine wave to a motion.

Using ADDax too add a 200mS sine wave to a motion.

The simplest sine generator is the MOVECIRC. It controls 2 axes but each axis is doing a sine or cosine.

BASE(0,10) ' put the second axis up out of the way.
MOVECIRC(0,0,10,0,0) ' do a sine of amplitude 10

Use the SPEED parameter to set the frequency. For amplitude 10, the effective distance of the circle is the circumference which is 2 x 10 x PI. =62.83. So for one cycle in 200 msecs, that's 62.83 x 5 per second = 315 and therefore needs a speed of 315. SPEED is in user units per second.

Alternatively you can build a sine CAM profile in the TABLE and run CAM.

my_units = 50

t_index = 1000
FOR theta = 0 TO 360
TABLE(t_index, SIN(theta * PI / 180) * my_units)
t_index = t_index + 1
NEXT theta

' period is dist_factor / SPEED
' frequ = 1 / period
SPEED = 1000
ACC(SPEED * 1000)
REPEAT
CAM(1000, 1360, amplitude, 200) AXIS(x) ' 200/1000 = 0.2 seconds
UNTIL
    • Related Articles

    • Create a cam

      Piecewise curve generation. The piesewise curve uses 5th degree polynomial interpolation between positions. The 5th degree polynomial has 6 unknowns so in order to solve it we need 6 data values. For a profile consisting of 2 points these are Point 1 ...
    • EURO 404 - Motion Problem at SERVO_PERIOD 250

      A motion problem could occur when running MC403, MC405, Euro404 or Euro408 at 250 usec servo period. The moves would stop (buffers frozen) and an uncommanded movment could occur on one axis in an XY pair. The issue occured very infrequently and was ...
    • MC202 controller and Motion Perfect

      For the MC202 you must use Motion Perfect 2. Motion Perfect versions 3, 4 and 5 are for the later generation of Motion Coordinators that connect using Ethernet. I am running this version of Motion perfect 2 on my Windows 10 PC. You need a COM port on ...
    • Closed loop with an external encoder

      To make this work, both axes must be CSV servo type. The Delta ASDA-A2 can be set to CSV with DRIVE_MODE AXIS(0) = 2. DRIVE_PROFILE can be 0 or 1. The encoder is the tricky part. You must also make that a servo axis, so I suggest you create an ...
    • Motion Perfect problem when SCOPE command is used

      When running the SCOPE command in a program, I think Motion Perfect doesn't like the SCOPE command being issued over and over when I run it. It seems more stable when I comment the SCOPE command out after it's ran once. ...